login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343158
a(n) is the smallest m such that A343156(m) = n, or -1 if no such m exists.
1
2, 4, 10, 35, 15, 34, 190, 290, 303, 395, 130, 465, 553, 265, 195, 663, 218, 582, 481, 858, 714, 418, 345, 530, 382, 1771, 1207, 2098, 3890, 1426, 2090, 4834, 4618, 627, 2321, 2163, 326, 866, 3302, 1298, 3886, 3094, 1086, 6130, 4807, 3646, 5181, 905, 3945, 5753
OFFSET
0,1
REFERENCES
Eric Angelini, W. Edwin Clark, Hans Havermann, Frank Stevenson, Allan C. Wechsler, and others, Postings to Math Fun mailing list, April 2021.
EXAMPLE
2 takes 0 steps to reach a prime, so a(0) = 2.
10 -> 25 -> 5 takes 2 steps to reach a prime (and no smaller number takes that many steps), so a(2) = 10.
35 -> 57 -> 319 -> 1129 takes 3 steps to reach a prime (and no smaller number takes that many steps), so a(3) = 35.
PROG
(PARI) is(m, n) = my(k=m); for(i=1, n, if(isprime(k), return(0), k=eval(concat(apply(t->Str(t), factor(k)[, 1]~))))); isprime(k);
a(n) = for(m=2, oo, if(is(m, n), return(m))); \\ Jinyuan Wang, Jul 16 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Apr 07 2021
EXTENSIONS
a(32)-a(42) from Hans Havermann, Apr 07 2021
a(43)-a(48) from Hans Havermann, Apr 08 2021
a(49) from Jinyuan Wang, Jul 16 2022
STATUS
approved