login
Primes of the form p^2 + q^2 + A007918(p + q) - p - q, where p and q are consecutive primes.
0

%I #9 Nov 16 2013 11:03:14

%S 13,37,2333,51229,84131,141539,273821,591893,649813,744221,889877,

%T 911269,1065829,2146619,2205013,2766007,2913773,3090187,3348893,

%U 3374821,3505979,3942493,4095547,4885981,5766421,6125029,6336829

%N Primes of the form p^2 + q^2 + A007918(p + q) - p - q, where p and q are consecutive primes.

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

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

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

%t 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 *)

%o (PARI) p=2;forprime(q=3,1e4,t=p^2+q^2+nextprime(p+q)-p-q;if(isprime(t),print1(t","));p=q)

%K nonn

%O 1,1

%A _J. M. Bergot_, Jun 08 2007

%E Extended, edited, and program added by _Charles R Greathouse IV_, Nov 11 2009