OFFSET
2,1
COMMENTS
Inspired by a homework problem in Crandall and Pomerance, Prime Numbers.
EXAMPLE
23 = 10111 (base 2) and 1+1+1+1=4, 233 = 22122 (base 3) and 2+2+1+2+2=9, 337 = 1,12,12 (base 13) and 1+12+12=25.
MATHEMATICA
f[n_] := Block[{p = PrimePi[n] + 1}, While[ PrimeQ[Plus @@ IntegerDigits[Prime[p], n]], p++ ]; Prime[p]]; Table[ f[n], {n, 2, 70}] (* Robert G. Wilson v, Aug 21 2004 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John L. Drost, Aug 19 2004
EXTENSIONS
More terms from Robert G. Wilson v, Aug 21 2004
STATUS
approved