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

A268057 Triangle T(n,k), 1<=k<=n, read by rows: T(n,k) = number of iterations of A048158(n, A048158(n, ... A048158(n, k)...)) to reach 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 2, 1, 2, 3, 2, 3, 2, 1, 1, 1, 2, 2, 1, 3, 3, 2, 2, 1, 1, 2, 3, 4, 2, 3, 5, 4, 3, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 2, 2, 1, 1, 2, 2, 2, 3, 2, 3, 4, 3
Offset: 1

Views

Author

Peter Kagey, Jan 25 2016

Keywords

Comments

Each column is periodic: T(n+A003418(k),k) = T(n,k). - Robert Israel, Feb 02 2016

Examples

			T(5, 3) = 3 because the algorithm requires three steps to reach 0.
  5 % 3 = 2
  5 % 2 = 1
  5 % 1 = 0
Triangle begins:
  1
  1 1
  1 2 1
  1 1 2 1
  1 2 3 2 1
  1 1 1 2 2 1
  1 2 2 3 3 2 1
  1 1 2 1 3 2 2 1
  1 2 1 2 3 2 3 2 1
  1 1 2 2 1 3 3 2 2 1
  1 2 3 4 2 3 5 4 3 2 1
  1 1 1 1 2 1 3 2 2 2 2 1
		

Crossrefs

Programs

  • Maple
    T:= proc(n,k) option remember; local m;
         if k = 0 then 0 else 1 + procname(n,n mod k) fi
    end proc:
    seq(seq(T(n,k),k=1..n),n=1..30); # Robert Israel, Feb 02 2016
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, 0, 1 + T[n, Mod[n, k]]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 30}] // Flatten (* Jean-François Alcover, Jan 31 2023, after Robert Israel *)

A268058 Maximum value of n-th row of A268057.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 3, 3, 3, 3, 5, 3, 4, 4, 3, 3, 5, 4, 6, 4, 4, 5, 6, 3, 5, 4, 5, 4, 5, 4, 6, 4, 5, 6, 7, 4, 5, 6, 5, 4, 6, 4, 6, 5, 5, 7, 8, 4, 7, 5, 6, 5, 9, 5, 6, 5, 6, 6, 8, 4, 7, 6, 6, 5, 7, 5, 8, 7, 7, 7, 6, 4, 6, 6, 5, 7, 7, 6, 8, 5, 5, 6, 9, 5, 6, 6, 7
Offset: 1

Views

Author

Peter Kagey, Jan 25 2016

Keywords

Crossrefs

Programs

  • PARI
    P(a,b)=my(n); while(b, b=a%b; n++); n
    a(n)=my(t=1); for(b=2,n-1, t=max(P(n,b),t)); t \\ Charles R Greathouse IV, Nov 26 2016

Formula

Chase & Pandey prove that a(n) = O(n^e) for any e > 19/59 = 0.322..., improving on Kešelj, Erdős & Shallit, and Shallit. - Charles R Greathouse IV, Jan 13 2023

A268059 a(n) is the number of k such that A268057(n, k) = A268058(n).

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4, 2, 1, 1, 1, 1, 1, 2, 5, 1, 4, 2, 3, 5, 2, 1, 3, 2, 1, 1, 2, 5, 1, 4, 3, 1, 5, 2, 1, 1, 1, 1, 3, 1, 2, 1, 3, 2, 4, 1, 1, 2, 3, 2, 6, 2, 3, 1, 2, 1, 2, 1, 1, 1, 1, 6, 7, 5, 2, 7, 1, 5, 1, 2, 3, 10, 3, 2, 2, 2, 4, 2
Offset: 1

Views

Author

Peter Kagey, Jan 25 2016

Keywords

Crossrefs

Showing 1-3 of 3 results.