login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266999 Smallest number m such that A266998(m) = n. 3

%I

%S 1,10,4,12,6,3,2,11,5,18,7,13,9,19,8,17,115,3789

%N Smallest number m such that A266998(m) = n.

%C The next term is too large to include.

%H Michel Marcus, <a href="/A266999/b266999.txt">Table of n, a(n) for n = 0..17</a>

%F A266998(a(n)) = n and A266998(m) != n for m < a(n).

%t a266999={};

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

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

%t h[n_]:=Length[g[n]]-1;

%t a266998=h/@Range[10^6];

%t Do[AppendTo[a266999,First[Position[a266998,m]]],{m,0,Max[a266998]}];

%t a266999//Flatten

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

%o nbi(n) = {my(nb=0); while(n != 1, n = strd(n); nb++;); nb;}

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

%Y Cf. A266998.

%K base,more,nonn

%O 0,2

%A _Ivan N. Ianakiev_, Jan 10 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 29 04:57 EST 2020. Contains 331335 sequences. (Running on oeis4.)