login
A046432
2 steps needed to reach a prime under "Sum of digits raised to its digits' powers" procedure.
3
3, 69, 96, 123, 132, 203, 213, 222, 230, 231, 302, 312, 320, 321, 334, 343, 433, 447, 456, 465, 469, 474, 477, 496, 546, 564, 566, 577, 645, 649, 654, 656, 665, 689, 694, 698, 744, 747, 757, 774, 775, 777, 869, 896, 946, 964, 968, 986, 1022, 1038, 1048
OFFSET
1,1
COMMENTS
The sequence is infinite because the numbers of the form m = 111...111 with 10^(p-1) digits, p prime, are terms. - Marius A. Burtea, Oct 27 2019
LINKS
EXAMPLE
a(n)=69 -> 6^6 + 9^9 = 387467145 is composite but 3^3 + 8^8 + 7^7 + 4^4 + 6^6 + 7^7 + 1^1 + 4^4 + 5^5 = 18474623 is prime.
MATHEMATICA
sdp[n_]:=Module[{idn=IntegerDigits[n]/.{0->1}}, Total[#^#&/@idn]]; Select[ Range[ 1100], Rest[PrimeQ[NestList[sdp, #, 2]]]=={False, True}&] (* Harvey P. Dale, Nov 10 2011 *)
PROG
(Magma) f:=func<n| &+[a[i]^a[i]:i in [1..#a]] where a is Intseq(n) >; [k:k in [1..1050] |not IsPrime(f(k)) and IsPrime(f(f(k))) ]; // Marius A. Burtea, Oct 27 2019
CROSSREFS
Cf. A046431.
Sequence in context: A279491 A264700 A124181 * A232326 A270869 A241222
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jul 15 1998
EXTENSIONS
Offset changed to 1 by Georg Fischer, Oct 27 2019
STATUS
approved