OFFSET
1,1
COMMENTS
It is still an open problem if there exist infinitely many primes of form k^2 + d (d integer, no negative square).
For n<=4, k=0 suffices: e.g. prime(1)+0^2=2 = sum of digits(prime(1)), so a(n)=prime(n).
EXAMPLE
a(13) = 467897 because its digitsum is 41 which is the 13th prime, it is of the form prime(13)+k^2 with k=684, and it is the least such prime.
PROG
(PARI) sod(n) = {digs = digits(n, 10); return (sum(j=1, #digs, digs[j])); }
a(n) = {k = 0; p = prime(n); while (! (isprime(q=p+k^2) && (sod(q) == p)), k++); return (q); } \\ Michel Marcus, Jul 26 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010
EXTENSIONS
a(5) corrected and sequence extended by D. S. McNeil, May 25 2010
STATUS
approved