login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 6

%I #20 Jan 31 2023 11:22:48

%S 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 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 1,1,2,1,3,2,2,2,2,1,1,2,2,2,3,2,3,4,3

%N 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 Each column is periodic: T(n+A003418(k),k) = T(n,k). - _Robert Israel_, Feb 02 2016

%H Peter Kagey, <a href="/A268057/b268057.txt">Table of n, a(n) for n = 1..10000</a>

%H "ModernModest", <a href="https://www.reddit.com/r/math/comments/409dfe/does_anyone_know_anything_about_this_idea_i/">Reddit discussion</a>

%e T(5, 3) = 3 because the algorithm requires three steps to reach 0.

%e 5 % 3 = 2

%e 5 % 2 = 1

%e 5 % 1 = 0

%e Triangle begins:

%e 1

%e 1 1

%e 1 2 1

%e 1 1 2 1

%e 1 2 3 2 1

%e 1 1 1 2 2 1

%e 1 2 2 3 3 2 1

%e 1 1 2 1 3 2 2 1

%e 1 2 1 2 3 2 3 2 1

%e 1 1 2 2 1 3 3 2 2 1

%e 1 2 3 4 2 3 5 4 3 2 1

%e 1 1 1 1 2 1 3 2 2 2 2 1

%p T:= proc(n,k) option remember; local m;

%p if k = 0 then 0 else 1 + procname(n,n mod k) fi

%p end proc:

%p seq(seq(T(n,k),k=1..n),n=1..30); # _Robert Israel_, Feb 02 2016

%t T[n_, k_] := T[n, k] = If[k == 0, 0, 1 + T[n, Mod[n, k]]];

%t Table[Table[T[n, k], {k, 1, n}], {n, 1, 30}] // Flatten (* _Jean-François Alcover_, Jan 31 2023, after _Robert Israel_ *)

%Y Cf. A003418, A048158, A107435, A268058, A268059, A268060.

%K tabl,nonn

%O 1,5

%A _Peter Kagey_, Jan 25 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 18:56 EDT 2024. Contains 372277 sequences. (Running on oeis4.)