cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A337273 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n.

Original entry on oeis.org

0, 0, 0, 0, 3, 1, 10, 6, 15, 15, 36, 15, 55, 45, 55, 55, 105, 66, 136, 91, 136, 153, 210, 120, 231, 231, 253, 231, 351, 231, 406, 325, 406, 435, 465, 351, 595, 561, 595, 496, 741, 561, 820, 703, 741, 861, 990, 703, 1035, 946, 1081, 1035, 1275, 1035, 1275, 1128, 1378, 1431, 1596
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 10; There are 5 positive integers less than 7 that do not divide 7, {2,3,4,5,6}. Given this set, there are 10 pairs of positive integers, (s,t), such that s < t < 7. They are (2,3), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6), (4,5), (4,6) and (5,6).
a(8) = 6 as 8 has 4 divisors; 1, 2, 4 and 8 so 8-4 numbers below 8 are not divisors of 8. Indeed those numbers are 3, 5, 6, 7. As these are four numbers we can choose binomial(4, 2) = 6 pairs of distinct such numbers below 8 giving the term. - _David A. Corneth_, Sep 15 2020
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]
    a[n_] := Module[{m = n - DivisorSigma[0, n]}, m*(m-1)/2]; Array[a, 100] (* Amiram Eldar, Feb 04 2025 *)
  • PARI
    a(n) = binomial(n - numdiv(n), 2) \\ David A. Corneth, Sep 15 2020

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)).
a(n) = binomial(n - tau(n), 2) where tau(n) is the number of divisors of n (cf. A000005). - David A. Corneth, Sep 15 2020

A337588 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, but s | t.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 1, 4, 3, 8, 1, 12, 7, 10, 8, 19, 7, 23, 10, 21, 20, 31, 8, 34, 27, 32, 23, 46, 17, 52, 30, 46, 43, 52, 22, 69, 52, 59, 36, 79, 38, 85, 54, 65, 72, 95, 36, 98, 70, 92, 73, 114, 61, 108, 71, 110, 103, 132, 45, 142, 113, 112, 96, 139, 90, 161, 112, 143
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(11) = 8; There are 9 positive integers less than 11 that do not divide 11, {2,3,4,5,6,7,8,9,10}. Of these, there are 8 ordered pairs, (s,t), where s < t < 11 and s | t. They are (2,4), (2,6), (2,8), (2,10), (3,6), (3,9), (4,8) and (5,10).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[k/i] + Floor[k/i]) (Ceiling[n/k] - Floor[n/k])(Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling(k/i) + floor(k/i)).

A337679 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (s + t) | n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 4, 1, 5, 5, 4, 5, 7, 5, 8, 6, 8, 11, 10, 6, 11, 14, 12, 12, 13, 10, 14, 16, 16, 20, 16, 14, 17, 23, 20, 18, 19, 21, 20, 26, 21, 29, 22, 23, 24, 30, 28, 33, 25, 33, 28, 32, 32, 38, 28, 28, 29, 41, 34, 42, 34, 44, 32, 47, 40, 43, 34, 41, 35, 50, 44, 54
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 2; There are 5 positive integers less than 7 that do not divide 7, {2,3,4,5,6}. Of these numbers, there are two pairs, (s,t), such that s < t < 7 where (s + t) | 7. They are (2,5) and (3,4). So a(7) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[n/(i + k)] + Floor[n/(i + k)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling(n/(i+k)) + floor(n/(i+k))).

A337680 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (t - s) | (t + s).

Original entry on oeis.org

0, 0, 0, 0, 3, 1, 9, 5, 10, 11, 22, 9, 30, 25, 27, 29, 46, 28, 55, 37, 53, 62, 73, 43, 77, 80, 78, 76, 103, 69, 115, 95, 112, 121, 121, 91, 148, 143, 144, 121, 168, 132, 180, 161, 158, 191, 202, 149, 208, 192, 215, 210, 237, 193, 237, 215, 253, 262, 273, 197, 289, 284, 264, 272
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 9; There are 9 positive integer pairs, (s,t), such that s < t < 7, neither s nor t divides 7, and where (t - s) | (t + s). They are (2,3), (2,4), (2,6), (3,4), (3,5), (3,6), (4,5), (4,6) and (5,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[(i + k)/(k - i)] + Floor[(i + k)/(k - i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling((k+i)/(k-i)) + floor((k+i)/(k-i))).

A337681 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (t - s) | (t * s).

Original entry on oeis.org

0, 0, 0, 0, 3, 1, 8, 3, 9, 9, 18, 6, 26, 22, 24, 22, 39, 23, 47, 31, 48, 54, 63, 30, 71, 71, 71, 64, 90, 60, 104, 82, 103, 109, 111, 74, 134, 130, 132, 103, 153, 121, 167, 149, 151, 177, 186, 122, 197, 181, 202, 194, 220, 180, 224, 194, 238, 244, 253, 167, 276, 272, 258, 253
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 8; There are 8 distinct positive integer pairs, (s,t), such that s < t < 7, where neither s nor t divides 7 and (t - s) | (t * s). They are (2,3), (2,4), (2,6), (3,4), (3,6), (4,5), (4,6) and (5,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[(i*k)/(k - i)] + Floor[(i*k)/(k - i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling((k*i)/(k-i)) + floor((k*i)/(k-i))).

A337682 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (s + t) | (s * t).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 3, 3, 2, 3, 4, 2, 5, 3, 5, 6, 6, 3, 7, 8, 6, 7, 9, 5, 12, 10, 11, 12, 11, 7, 15, 15, 14, 10, 17, 12, 19, 18, 14, 21, 21, 13, 22, 20, 22, 22, 23, 18, 23, 19, 25, 26, 26, 14, 31, 31, 26, 28, 31, 29, 34, 33, 33, 29, 36, 21, 39, 39, 34, 39, 39, 38
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(13) = 3; There are 3 distinct positive integer pairs, (s,t), such that s < t < 13 where neither s nor t divides 13, and where (s + t) | (s * t). They are (3,6), (4,12) and (6,12).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[(i*k)/(k + i)] + Floor[(i*k)/(k + i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling((i*k)/(i+k)) + floor((i*k)/(i+k))).

A337683 Number of distinct positive integer pairs, (s,t), with s < t < n such that neither s nor t divides n and the harmonic mean of s and t is an integer.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 0, 4, 3, 3, 4, 6, 2, 8, 5, 8, 9, 10, 3, 11, 11, 9, 10, 14, 7, 18, 14, 16, 17, 17, 9, 22, 21, 20, 13, 24, 16, 28, 25, 21, 31, 32, 19, 33, 28, 32, 31, 34, 25, 34, 28, 36, 37, 38, 17, 44, 43, 37, 40, 44, 40, 50, 47, 48, 39, 52, 28, 56, 55, 48, 55
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 2; There are 2 distinct positive integer pairs, (s,t), with s < t < 7 such that neither s nor t divides 7 and the harmonic mean of s and t is an integer. They are (2,6) and (3,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[2 (i*k)/(k + i)] + Floor[2 (i*k)/(k + i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k,  n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling(2*(k*i)/(k+i)) + floor(2*(k*i)/(k+i))).

A337684 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s, t, nor (s + t) divides n.

Original entry on oeis.org

0, 0, 0, 0, 2, 1, 8, 5, 13, 13, 32, 14, 50, 40, 51, 50, 98, 61, 128, 85, 128, 142, 200, 114, 220, 217, 241, 219, 338, 221, 392, 309, 390, 415, 449, 337, 578, 538, 575, 478, 722, 540, 800, 677, 720, 832, 968, 680, 1011, 916, 1053, 1002, 1250, 1002, 1247, 1096, 1346, 1393, 1568
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 8; There are 8 distinct positive integer pairs, (s,t), such that s < t < 7 where neither s, t, nor (s + t) divides n. They are (2,3), (2,4), (2,6), (3,5), (3,6), (4,5), (4,6) and (5,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(Ceiling[n/(k + i)] - Floor[n/(k + i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 80}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (ceiling(n/(i+k)) - floor(n/(i+k))).

A349360 Number of positive integer pairs (s,t), with s,t <= n and s <= t such that either both s and t divide n or both do not.

Original entry on oeis.org

1, 3, 4, 7, 9, 13, 18, 20, 27, 31, 48, 42, 69, 65, 76, 81, 123, 99, 156, 126, 163, 181, 234, 172, 259, 263, 286, 274, 381, 289, 438, 372, 445, 475, 506, 423, 633, 605, 640, 564, 783, 631, 864, 762, 801, 913, 1038, 796, 1087, 1011, 1138, 1102, 1329, 1117, 1336, 1212, 1441
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 15 2021

Keywords

Examples

			a(5) = 9; There are 9 positive integer pairs (s,t), with s <= t such that both s and t divide 5 or both do not. They are (1,1), (1,5), (2,2), (2,3), (2,4), (3,3), (3,4), (4,4), (5,5).
		

Crossrefs

Programs

  • Maple
    a:= n-> add(add(`if`(irem(n, j)>0 xor irem(n, i)=0, 1, 0), i=1..j), j=1..n):
    seq(a(n), n=1..57);  # Alois P. Heinz, Nov 15 2021
  • Mathematica
    a[n_] := Module[{d = DivisorSigma[0, n]}, n*(n+1)/2 - d*(n-d)]; Array[a, 100] (* Amiram Eldar, Feb 04 2025 *)
  • PARI
    a(n) = {my(d = numdiv(n)); n*(n+1)/2 - d*(n-d);} \\ Amiram Eldar, Feb 04 2025
  • Python
    from sympy import divisor_count
    def A349360(n):
        m = divisor_count(n)
        return m*(m-n) + n*(n+1)//2 # Chai Wah Wu, Nov 19 2021
    

Formula

a(n) = A184389(n) + A335567(n). - Alois P. Heinz, Nov 15 2021
a(n) = A000005(n)*(A000005(n)-n) + n(n+1)/2. - Chai Wah Wu, Nov 19 2021
a(p) = (p^2 - 3*p + 8)/2 for primes p. - Wesley Ivan Hurt, Nov 28 2021
Showing 1-9 of 9 results.