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
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 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Each column is periodic: T(n+A003418(k),k) = T(n,k). - Robert Israel, Feb 02 2016
LINKS
"ModernModest", Reddit discussion
EXAMPLE
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
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 *)
CROSSREFS
Sequence in context: A335234 A353854 A217467 * A107435 A196056 A161095
KEYWORD
tabl,nonn
AUTHOR
Peter Kagey, Jan 25 2016
STATUS
approved

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 April 18 06:24 EDT 2024. Contains 371769 sequences. (Running on oeis4.)