cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A178237 #8 Jul 26 2013 04:47:10
%S A178237 2,3,5,7,47,157,593,919,599,66593,46687,396937,467897,467899,6969647,
%T A178237 16499897,367488959,598095997,2977884967,4977866987,2797986889,
%U A178237 58888728979,58987779959,679585896989,4989996468997
%N A178237 Smallest prime p of the form prime(n)+k^2 such that sum of digits(p) = prime(n).
%C A178237 It is still an open problem if there exist infinitely many primes of form k^2 + d (d integer, no negative square).
%C A178237 For n<=4, k=0 suffices: e.g. prime(1)+0^2=2 = sum of digits(prime(1)), so a(n)=prime(n).
%e A178237 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 A178237 (PARI) sod(n) = {digs = digits(n, 10); return (sum(j=1, #digs, digs[j]));}
%o A178237 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 A178237 Cf. A000040, A172035, A176111, A176790
%K A178237 base,nonn
%O A178237 1,1
%A A178237 Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 23 2010
%E A178237 a(5) corrected and sequence extended by _D. S. McNeil_, May 25 2010