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!)
A266999 Smallest number m such that A266998(m) = n. 3

%I #8 Feb 21 2016 19:51:20

%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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:53 EDT 2024. Contains 371969 sequences. (Running on oeis4.)