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!)
A266998 Number of iterations of the map "n -> sum of the triangular numbers whose indices are the digits of n" needed to reach 1. 2

%I #17 Jan 18 2016 09:21:35

%S 0,6,5,2,8,4,10,14,12,1,7,3,11,8,7,6,15,9,13,6,3,5,13,12,10,13,12,9,

%T 14,5,11,13,4,7,4,13,8,13,8,2,8,12,7,7,11,12,14,13,7,8,7,10,4,11,6,14,

%U 8,8,5,4,6,13,13,12,14,13,8,9,14,10

%N Number of iterations of the map "n -> sum of the triangular numbers whose indices are the digits of n" needed to reach 1.

%C Conjecture: 1 is reachable for every n. Verified for n up to 10^6. - _Ivan N. Ianakiev_, Jan 10 2016

%C Proof: For every n > 59, A267238(n) < n. - _Ivan N. Ianakiev_, Jan 15 2016

%e 6 iterations are needed to start from 2 and reach 1 (2->3->6->21->4->10->1), therefore a(2) = 6.

%t f[n_] := Total[IntegerDigits[n] * (IntegerDigits[n] + 1)/2];

%t g[n_] := NestWhileList[f[#] &, n, # > 1 &]; h[n_] := Length[g[n]] - 1;

%t h/@Range@100

%o (PARI) strd(n) = {my(d = digits(n)); sum(k=1, #d, d[k]*(d[k]+1)/2);}

%o a(n) = {my(nb=0); while(n != 1, n = strd(n); nb++;); nb;} \\ _Michel Marcus_, Jan 12 2016

%Y Cf. A007770, A266999, A267238 (the underlying map).

%K base,easy,nonn

%O 1,2

%A _Ivan N. Ianakiev_, Jan 09 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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)