OFFSET
1,1
COMMENTS
Members of A038580 with a digit sum which is prime.
EXAMPLE
For k=6, prime(prime(prime(6))) = A038580(6)=179. The digit sum 1+7+9 = 17 is prime, so 179 is in the sequence.
MAPLE
read("transforms") ; A038580 := proc(n) ithprime(ithprime(ithprime(n))) ; end:
for n from 1 to 80 do if isprime(digsum(A038580(n))) then printf("%d, ", A038580(n)) ; fi; od: # R. J. Mathar, Aug 14 2009
MATHEMATICA
Select[Table[Nest[Prime, x, 3], {x, 1, 100}],
PrimeQ[Total[IntegerDigits[#, 10]]] &]
PROG
(PARI) sodip2(n, m) = /* m multiple nesting of prime(prime(prime..(n) */
{ local(s=0, a, x, y, j, p);
for(x=1, n, p=prime(x);
for(i=1, m, p=prime(p));
a=eval(Vec(Str(p))); y=sum(j=1, length(a), a[j]); if(isprime(y), print1(p", ")); )
}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Cino Hilliard, Jun 28 2009
EXTENSIONS
Edited by R. J. Mathar, Aug 14 2009
STATUS
approved