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-2 of 2 results.

A054531 Triangular array T read by rows: T(n,k) = n/gcd(n,k) (n >= 1, 1 <= k <= n).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 09 2000

Keywords

Comments

Sum of n-th row = A057660(n). - Reinhard Zumkeller, Aug 12 2009
Read as a linear sequence, this is conjectured to be the length of the shortest cycle of pebble-moves among the partitions of n (cf. A201144). - Andrew V. Sutherland, Nov 27 2011
The triangle of fractions A226314(i,j)/A054531(i,j) is an efficient way to enumerate the rationals [Fortnow]. - N. J. A. Sloane, Jun 09 2013

Examples

			Triangle begins
   1;
   2,  1;
   3,  3,  1;
   4,  2,  4,  1;
   5,  5,  5,  5,  1;
   6,  3,  2,  3,  6,  1;
   7,  7,  7,  7,  7,  7,  1;
   8,  4,  8,  2,  8,  4,  8,  1;
   9,  9,  3,  9,  9,  3,  9,  9,  1;
  10,  5, 10,  5,  2,  5, 10,  5, 10,  1;
  11, 11, 11, 11, 11, 11, 11, 11, 11, 11,  1;
  12,  6,  4,  3, 12,  2, 12,  3,  4,  6, 12,  1;
  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,  1;
		

Crossrefs

Cf. A050873, A164306, A226314, A277227 (row reversed, k=0..n-1).

Programs

  • Haskell
    a054531 n k = div n $ gcd n k
    a054531_row n = a054531_tabl !! (n-1)
    a054531_tabl = zipWith (\u vs -> map (div u) vs) [1..] a050873_tabl
    -- Reinhard Zumkeller, Jun 10 2013
    
  • Mathematica
    Table[n/GCD[n,k], {n,1,10}, {k,1,n}]//Flatten (* G. C. Greubel, Sep 13 2017 *)
  • PARI
    for(n=1,10, for(k=1,n, print1(n/gcd(n,k), ", "))) \\ G. C. Greubel, Sep 13 2017

A183110 Period-length of the ultimate periodic behavior of the orbit of a list [1,1,1,...,1] of n 1's under the mapping defined in the comments.

Original entry on oeis.org

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

Views

Author

John W. Layman, Feb 01 2011

Keywords

Comments

We use the list mapping introduced in A092964, whereby one removes the first term of the list, z(1), and adds 1 to each of the next z(1) terms (appending 1's if necessary) to get a new list.
This is also conjectured to be the length of the longest cycle of pebble-moves among the partitions of n (cf. A201144). - Andrew V. Sutherland

Examples

			Under the indicated mapping the list [1,1,1,1,1,1,1] of seven 1's results in the orbit [1,1,1,1,1,1,1], [2,1,1,1,1,1], [2,2,1,1,1], [3,2,1,1], [3,2,2], [3,3,1], [4,2,1], [3,2,1,1], ... which is clearly periodic with period-length 4, so a(7) = 4.
		

Crossrefs

Programs

  • Mathematica
    f[p_] := Module[{pp, x, lpp, m, i}, pp = p; x = pp[[1]]; pp = Delete[pp,1]; lpp = Length[pp]; m = Min[x, lpp]; For[i = 1, i ≤ m, i++, pp[[i]]++]; For[i = 1, i ≤ x - lpp, i++, AppendTo[pp, 1]]; pp]; orb[p_] := Module[{s, v}, v = p; s = {v}; While[! MemberQ[s, v = f[v]], AppendTo[s, v]]; s]; attractor[p_] := Module[{orbp, pos, len, per}, orbp = orb[p]; pos = Flatten[Position[orbp, f[orbp[[-1]]]]][[1]] - 1; (*pos = steps to enter period*) len = Length[orbp] - pos; per = Take[orbp, -len]; Sort[per]]; a = {}; For[n = 1, n ≤ 80, n++, {rn = Table[1, {k, 1, n}]; orbn = orb[rn]; lenorb = Length[orbn]; lenattr = Length[attractor[rn]]; AppendTo[a, lenattr]}]; Print[a];

Formula

It appears, but has not yet been proved, that a(n)=1 if n=t(k) and a(n)=k if t(k-1) < n < t(k) where t(k) is the k-th triangular number t(k) = k*(k+1)/2.
Showing 1-2 of 2 results.