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 11-16 of 16 results.

A274532 Irregular triangle read by rows: T(n,k) = sum of the elements of the k-th antidiagonal of the absolute difference table of the divisors of n.

Original entry on oeis.org

1, 1, 3, 1, 5, 1, 3, 7, 1, 9, 1, 3, 4, 13, 1, 13, 1, 3, 7, 15, 1, 5, 19, 1, 3, 10, 17, 1, 21, 1, 3, 4, 5, 11, 28, 1, 25, 1, 3, 16, 25, 1, 5, 7, 41, 1, 3, 7, 15, 31, 1, 33, 1, 3, 4, 13, 14, 47, 1, 37, 1, 3, 7, 7, 25, 39, 1, 5, 13, 53, 1, 3, 28, 41, 1, 45, 1, 3, 4, 5, 11, 12, 22, 61, 1, 9, 61, 1, 3, 34, 49, 1, 5, 19, 65
Offset: 1

Views

Author

Omar E. Pol, Jun 27 2016

Keywords

Comments

If n is prime then row n contains only two terms: 1 and 2*n-1.
Row 2^k gives the first k+1 positive terms of A000225, k >= 0.
Note that this sequence is not the absolute values of A273262.
First differs from A273262 at a(41).

Examples

			Triangle begins:
1;
1, 3;
1, 5;
1, 3, 7;
1, 9;
1, 3, 4, 13;
1, 13;
1, 3, 7, 15;
1, 5, 19;
1, 3, 10, 17;
1, 21;
1, 3, 4, 5, 11, 28;
1, 25;
1, 3, 16, 25;
1, 5, 7, 41;
1, 3, 7, 15, 31;
1, 33;
1, 3, 4, 13, 14, 47;
1, 37;
1, 3, 7, 7, 25, 39;
1, 5, 13, 53;
1, 3, 28, 41;
1, 45;
1, 3, 4, 5, 11, 12, 22, 61;
1, 9, 61;
1, 3, 34, 49;
1, 5, 19, 65;
...
For n = 18 the divisors of 18 are 1, 2, 3, 6, 9, 18, and the absolute difference triangle of the divisors is
1, 2, 3, 6, 9, 18;
1, 1, 3, 3, 9;
0, 2, 0, 6;
2, 2, 6;
0, 4;
4;
The antidiagonal sums give [1, 3, 4, 13, 14, 47] which is also the 18th row of the irregular triangle.
		

Crossrefs

Row lengths give A000005. Column 1 is A000012. Row sums give A187215.

Programs

  • Mathematica
    Table[Map[Total, Table[#[[m - k + 1, k]], {m, Length@ #}, {k, m}], {1}] &@ NestWhileList[Abs@ Differences@ # &, Divisors@ n, Length@ # > 1 &], {n, 27}] // Flatten (* Michael De Vlieger, Jun 27 2016 *)

A359247 The bottom entry in the absolute difference triangle of the elements in the Collatz trajectory of n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0
Offset: 1

Views

Author

Michel Lagneau, Dec 22 2022

Keywords

Examples

			a(3) = 1 because the Collatz trajectory of 3 is T = [3, 10, 5, 16, 8, 4, 2, 1], and the absolute difference triangle of the elements of T is:
  3  . 10  .  5  . 16  .  8  .  4  .  2  .  1
     7  .  5  . 11  .  8  .  4  .  2  .  1
        2  .  6  .  3  .  4  .  2  .  1
           4  .  3  .  1  .  2  .  1
              1  .  2  .  1  .  1
                 1  .  1  .  0
                    0  .  1
                       1
with bottom entry a(3) = 1.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&];Flatten[Table[Collatz[n],{n,10}]];Table[d=Collatz[m];While[Length[d]>1,d=Abs[Differences[d]]];d[[1]],{m,100}]
  • PARI
    a(n) = my(list=List([n])); while (n!=1, if(n%2, n=3*n+1, n=n/2); listput(list, n)); my(v = Vec(list)); while (#v != 1, v = vector(#v-1, k, abs(v[k+1]-v[k]))); v[1]; \\ Michel Marcus, Dec 23 2022

Formula

a(2^n) = 1.

A187209 Sum of all terms of triangle of absolute differences of the divisors of n.

Original entry on oeis.org

0, 1, 2, 4, 4, 9, 6, 11, 12, 13, 10, 24, 12, 21, 30, 26, 16, 43, 18, 40, 40, 37, 22, 59, 40, 45, 50, 52, 28, 89, 30, 57, 60, 61, 86, 90, 36, 69, 70, 103, 40, 125, 42, 88, 140, 85, 46, 128, 84, 97, 90, 106, 52, 165, 130, 113, 100, 109, 58, 201
Offset: 1

Views

Author

Omar E. Pol, Aug 04 2011

Keywords

Comments

Note that if n is prime then a(n) = n - 1.

Examples

			a(10) = 13 because the divisors of 10 are 1, 2, 5, 10; the triangle of absolute differences is
1, 3, 5;
. 2, 2;
.   0;
and the sum of the terms of triangle is 1+3+5+2+2+0 = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Flatten[NestList[Abs[Differences[#]]&,Differences[Divisors[ n]], DivisorSigma[0,n]-1]]],{n,60}] (* Harvey P. Dale, Aug 10 2011 *)

Formula

a(n) = A187215(n) - A000203(n).

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 *)

A274533 Irregular triangle read by rows: T(n,k) = sum of the elements of the k-th column of the absolute difference table of the divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 5, 6, 6, 7, 7, 4, 6, 8, 8, 7, 9, 9, 4, 7, 10, 10, 11, 11, 4, 6, 8, 10, 12, 12, 13, 13, 8, 9, 14, 14, 11, 13, 15, 15, 5, 8, 12, 16, 16, 17, 17, 8, 11, 12, 15, 18, 18, 19, 19, 7, 10, 10, 15, 20, 20, 13, 17, 21, 21, 16, 13, 22, 22, 23, 23, 6, 7, 10, 12, 16, 20, 24, 24, 21, 25, 25
Offset: 1

Views

Author

Omar E. Pol, Jun 29 2016

Keywords

Comments

If n is prime then row n is [n, n].
It appears that the last two terms of the n-th row are [n, n], n > 1.
Note that this sequence is not the absolute values of A273263.
First differs from A273263 at a(38).

Examples

			Triangle begins:
   1;
   2,  2;
   3,  3;
   3,  4,  4;
   5,  5;
   4,  5,  6,  6;
   7,  7;
   4,  6,  8,  8;
   7,  9,  9;
   4,  7, 10, 10;
  11, 11;
   4,  6,  8, 10, 12, 12;
  13, 13;
   8,  9, 14, 14;
  11, 13, 15, 15;
   5,  8, 12, 16, 16;
  17, 17;
   8, 11, 12, 15, 18, 18;
  19, 19;
   7, 10, 10, 15, 20, 20;
  13, 17, 21, 21;
  16, 13, 22, 22;
  23, 23;
   6,  7, 10, 12, 16, 20, 24, 24;
  21, 25, 25;
  20, 15, 26, 26;
  ...
For n = 18 the divisors of 18 are 1, 2, 3, 6, 9, 18, and the absolute difference triangle of the divisors is
  1,  2,  3,  6,  9, 18;
  1,  1,  3,  3,  9;
  0,  2,  0,  6;
  2,  2,  6;
  0,  4;
  4;
The column sums give [8, 11, 12, 15, 18, 18] which is also the 18th row of the irregular triangle.
		

Crossrefs

Row lengths give A000005. Right border gives A000027. Row sums give A187215.

Programs

  • Mathematica
    Table[Total /@ Table[#[[m - k + 1, -k]], {m, Length@ #, 1, -1}, {k, m}] &@ NestWhileList[Abs@ Differences@ # &, Divisors@ n, Length@ # > 1 &], {n, 25}] // Flatten (* Michael De Vlieger, Jun 29 2016 *)

A359657 Least k such that A359247(k) = n, or 0 if no such k exists.

Original entry on oeis.org

5, 1, 136, 168, 141, 424, 1867, 680, 3981, 5800, 2216, 13648, 5763, 2728, 8872, 11944, 15752, 6824, 15219, 8352, 17064, 10920, 10400, 38407, 25105, 27304, 36879, 40501, 37077, 20323, 25635, 29073, 57611, 45795, 90197, 61741, 68735, 55319, 46645, 42549, 95412
Offset: 0

Views

Author

Michel Lagneau, Jan 10 2023

Keywords

Comments

Or least k such that the bottom entry in the absolute difference triangle of the elements in the Collatz trajectory of k is equal to n, or 0 if no such k exists.

Examples

			a(3) = 168 because the Collatz trajectory of 168 is T = 168 -> 84 -> 42 -> 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1  and the absolute difference triangle of the elements of T is:
   168  84  42  21  64  32  16  8  4  2  1
    84, 42, 21, 43, 32, 16,  8, 4, 2, 1
    42, 21, 22, 11, 16,  8,  4, 2, 1
    21,  1, 11,  5,  8,  4,  2, 1
    20, 10,  6,  3,  4,  2,  1
    10,  4,  3,  1,  2,  1
     6,  1,  2,  1,  1
     5,  1,  1,  0
     4,  0,  1
     4,  1
     3
with bottom entry = A359247(168) = 3.
		

Crossrefs

Programs

  • Mathematica
    nn=20000; Collatz[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; Flatten[Table[Collatz[n],{n,nn}]]; Do[k=1; Table[d=Collatz[m]; While[Length[d]>1,d=Abs[Differences[d]]]; If[d[[1]]==u&&k==1,Print[u," ",m];k=0],{m,nn}],{u,0,22}]
Previous Showing 11-16 of 16 results.