OFFSET
1,3
COMMENTS
a(1)=0 because there is no prime with digital sum equal to 1, a(2)=1 because p(1)=2 is the least prime with digital sum equal to 2, a(3)=2 because p(2)=3 the only prime with digital sum equal to 3, a(3k>3)=0 because there is no prime with digital sum equal to 3 (besides p(2)=3), a(53)=77777 because p(77777)=989999 is the least prime with digital sum (9+8+9+9+9+9) equal to 53. For the first 1,000,000 primes, the maximal digital sum is 62 (for p(658445)=9899999).
MATHEMATICA
ta=Table[Plus@@IntegerDigits[Prime[i]], {i, 1000000}]; A104290={0, 1, 2, Table[If[Mod[k, 3]==0, 0, Position[ta, k][[1]]], {k, 4, 54}]}//Flatten
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Feb 28 2005
STATUS
approved