OFFSET
1,1
COMMENTS
The trial number was 80 pairs of consecutive primes to produce seven primes. Oddly it seems more productive as the pairs of primes increase in value, rather unusual for generators of primes. Perhaps an extension will confirm this.
FORMULA
For two consecutive primes p and q, add them and subtract that amount from the nearest prime greater than p+q. Call this number d; then see whether p^2 + q^2 + d is a prime.
EXAMPLE
Take consecutive primes 31 and 37. The sum 31 + 37 = 68 and is three less than the next prime 71. Hence 31^2 + 37^2 + 3 = 961+1369+3=2333 which is a prime that belongs to the sequence.
MATHEMATICA
cp[{a_, b_}]:=a^2+b^2+NextPrime[a+b]-a-b; Join[{13}, Select[cp/@ Partition[ Prime[Range[500]], 2, 1], PrimeQ]] (* Harvey P. Dale, Nov 16 2013 *)
PROG
(PARI) p=2; forprime(q=3, 1e4, t=p^2+q^2+nextprime(p+q)-p-q; if(isprime(t), print1(t", ")); p=q)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, Jun 08 2007
EXTENSIONS
Extended, edited, and program added by Charles R Greathouse IV, Nov 11 2009
STATUS
approved