login
A241182
Smallest number requiring n steps to reach a prime under the "add a digit" process described in A241180.
12
1, 5, 3, 2, 22, 19, 4020, 4280, 22198, 22194, 22193, 31400, 221101, 360648, 370260, 604062, 604060, 1357201, 2010734, 2010733, 4652353, 4652352, 17051708, 17051707, 20831329, 20831323, 47326699, 47326692, 123346277, 256526120, 428045488, 436273045, 436273038
OFFSET
1,2
COMMENTS
The analogous sequence corresponding to A241181 is A336382. - Rémy Sigrist, Jul 25 2020
MATHEMATICA
A241180[n_] := Module[{c, nx},
c = 1; nx = n;
While[ !
AnyTrue[nx = Union[Flatten[nx + IntegerDigits[nx]]],
PrimeQ [#] && # > n &], c++];
Return[c]];
A241182[n_] := Module[{i = 1},
While[A241180[i] != n, i++];
Return[i]];
Table[A241182[i], {i, 8}] (* Robert Price, Mar 18 2019 *)
PROG
(C#) See Links section.
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Apr 23 2014
EXTENSIONS
a(5) corrected and a(6)-a(30) added by Hiroaki Yamanouchi, Sep 05 2014
More terms from Rémy Sigrist, Jul 26 2020
STATUS
approved