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”).

Smallest prime p of the form prime(n)+k^2 such that sum of digits(p) = prime(n).
1

%I #8 Jul 26 2013 04:47:10

%S 2,3,5,7,47,157,593,919,599,66593,46687,396937,467897,467899,6969647,

%T 16499897,367488959,598095997,2977884967,4977866987,2797986889,

%U 58888728979,58987779959,679585896989,4989996468997

%N Smallest prime p of the form prime(n)+k^2 such that sum of digits(p) = prime(n).

%C It is still an open problem if there exist infinitely many primes of form k^2 + d (d integer, no negative square).

%C For n<=4, k=0 suffices: e.g. prime(1)+0^2=2 = sum of digits(prime(1)), so a(n)=prime(n).

%e 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.

%o (PARI) sod(n) = {digs = digits(n, 10); return (sum(j=1, #digs, digs[j]));}

%o a(n) = {k = 0; p = prime(n); while (! (isprime(q=p+k^2) && (sod(q) == p)), k++); return (q);} \\ _Michel Marcus_, Jul 26 2013

%Y Cf. A000040, A172035, A176111, A176790

%K base,nonn

%O 1,1

%A Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010

%E a(5) corrected and sequence extended by _D. S. McNeil_, May 25 2010