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.

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.

This page as a plain text file.
%I A268057 #20 Jan 31 2023 11:22:48
%S A268057 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,
%T A268057 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,
%U A268057 1,1,2,1,3,2,2,2,2,1,1,2,2,2,3,2,3,4,3
%N 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.
%C A268057 Each column is periodic: T(n+A003418(k),k) = T(n,k). - _Robert Israel_, Feb 02 2016
%H A268057 Peter Kagey, <a href="/A268057/b268057.txt">Table of n, a(n) for n = 1..10000</a>
%H A268057 "ModernModest", <a href="https://www.reddit.com/r/math/comments/409dfe/does_anyone_know_anything_about_this_idea_i/">Reddit discussion</a>
%e A268057 T(5, 3) = 3 because the algorithm requires three steps to reach 0.
%e A268057   5 % 3 = 2
%e A268057   5 % 2 = 1
%e A268057   5 % 1 = 0
%e A268057 Triangle begins:
%e A268057   1
%e A268057   1 1
%e A268057   1 2 1
%e A268057   1 1 2 1
%e A268057   1 2 3 2 1
%e A268057   1 1 1 2 2 1
%e A268057   1 2 2 3 3 2 1
%e A268057   1 1 2 1 3 2 2 1
%e A268057   1 2 1 2 3 2 3 2 1
%e A268057   1 1 2 2 1 3 3 2 2 1
%e A268057   1 2 3 4 2 3 5 4 3 2 1
%e A268057   1 1 1 1 2 1 3 2 2 2 2 1
%p A268057 T:= proc(n,k) option remember; local m;
%p A268057      if k = 0 then 0 else 1 + procname(n,n mod k) fi
%p A268057 end proc:
%p A268057 seq(seq(T(n,k),k=1..n),n=1..30); # _Robert Israel_, Feb 02 2016
%t A268057 T[n_, k_] := T[n, k] = If[k == 0, 0, 1 + T[n, Mod[n, k]]];
%t A268057 Table[Table[T[n, k], {k, 1, n}], {n, 1, 30}] // Flatten (* _Jean-François Alcover_, Jan 31 2023, after _Robert Israel_ *)
%Y A268057 Cf. A003418, A048158, A107435, A268058, A268059, A268060.
%K A268057 tabl,nonn
%O A268057 1,5
%A A268057 _Peter Kagey_, Jan 25 2016