OFFSET
1,1
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..5000
EXAMPLE
26 -> 2^2 + 6^6 = 46660 -> 4^4 + 6^6 + 6^6 + 6^6 + 0^0 = 140225 -> 1^1 + 4^4 + 0^0 + 2^2 + 2^2 + 5^5 = 3391, which is prime, so 26 is a term.
MATHEMATICA
sop[n_] := Total[#^# & /@ (IntegerDigits[n] /. {0 -> 1})]; Select[ Range[825], Boole /@ PrimeQ[Rest[NestList[sop, #, 3]]] == {0, 0, 1} &] (* Jayanta Basu, Jun 25 2013 *)
PROG
(Magma) f:=func<n| &+[a[i]^a[i]:i in [1..#a]] where a is Intseq(n) >; [k:k in [1..900] |not IsPrime(f(k)) and not IsPrime(f(f(k))) and IsPrime(f(f(f(k))))]; // Marius A. Burtea, Oct 27 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jul 15 1998
STATUS
approved