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.

Previous Showing 21-22 of 22 results.

A273137 Absolute difference table of the divisors of the positive integers (with every table read by columns).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 1, 1, 2, 2, 4, 1, 4, 5, 1, 1, 0, 2, 2, 1, 2, 3, 3, 6, 1, 6, 7, 1, 1, 1, 1, 2, 2, 2, 4, 4, 8, 1, 2, 4, 3, 6, 9, 1, 1, 2, 0, 2, 3, 2, 5, 5, 10, 1, 10, 11, 1, 1, 0, 0, 1, 1, 2, 1, 0, 1, 2, 3, 1, 1, 3, 4, 2, 4, 6, 6, 12, 1, 12, 13, 1, 1, 4, 2, 2, 5, 2, 7, 7, 14, 1, 2, 0, 8, 3, 2, 8, 5, 10, 15
Offset: 1

Views

Author

Omar E. Pol, Jun 26 2016

Keywords

Comments

This is an irregular tetrahedron in which T(n,j,k) is the k-th element of the j-th column of the absolute difference table of the divisors of n.
The first row of the slice n is also the n-th row of the triangle A027750.
The bottom entry of the slice n is A187203(n).
The number of elements in the n-th slice is A000217(A000005(n)) = A184389(n).
The sum of the elements of the n-th slice is A187215(n).
If n is a power of 2 the subsequence lists the elements of the absolute difference table of the divisors of n in nondecreasing order, for example if n = 8 the finite sequence of columns is [1, 1, 1, 1], [2, 2, 2], [4, 4], [8].
Note that this sequence is not the absolute values of A273136.
First differs from A273136 at a(86).

Examples

			The tables of the first nine positive integers are
1; 1, 2; 1, 3; 1, 2, 4; 1, 5; 1, 2, 3, 6; 1, 7; 1, 2, 4, 8; 1, 3, 9;
.  1;    2;    1, 2;    4;    1, 1, 3;    6;    1, 2, 4;    2, 6;
.              1;             0, 2;             1, 2;       4;
.                             2;                1;
.
For n = 18 the absolute difference table of the divisors of 18 is
1, 2, 3, 6, 9, 18;
1, 1, 3, 3, 9;
0, 2, 0, 6;
2, 2, 6;
0, 4;
4;
This table read by columns gives the finite subsequence [1, 1, 0, 2, 0, 4], [2, 1, 2, 2, 4], [3, 3, 0, 6], [6, 3, 6], [9, 9], [18].
		

Crossrefs

Programs

  • Mathematica
    Table[Transpose@ Map[Function[w, PadRight[w, Length@ #]], NestWhileList[Abs@ Differences@ # &, #, Length@ # > 1 &]] &@ Divisors@ n, {n, 15}] /. 0 -> {} // Flatten (* Michael De Vlieger, Jun 26 2016 *)

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
Previous Showing 21-22 of 22 results.