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
Harvey P. Dale, Table of n, a(n) for n = 1..1001
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
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jul 15 1998
EXTENSIONS
Offset changed to 1 by Georg Fischer, Oct 27 2019
STATUS
approved