login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A178237
Smallest prime p of the form prime(n)+k^2 such that sum of digits(p) = prime(n).
1
2, 3, 5, 7, 47, 157, 593, 919, 599, 66593, 46687, 396937, 467897, 467899, 6969647, 16499897, 367488959, 598095997, 2977884967, 4977866987, 2797986889, 58888728979, 58987779959, 679585896989, 4989996468997
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