A130056 Primes prime(n) such that both of the numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 are primes.
7, 19, 37, 61, 67, 71, 97, 107, 127, 157, 229, 349, 419, 443, 673, 743, 751, 877, 937, 947, 967, 1009, 1039, 1063, 1553, 1609, 1637, 1913, 2311, 2381, 2417, 2437, 2687, 2753, 2969, 3067, 3079, 3137, 3313, 3559, 3803, 3911, 3919, 4111, 4157, 4507, 4621
Offset: 1
Keywords
Examples
a(1)=7 because (13^2 - 7^2)/2 - 1 = 59 and (13^2 - 7^2)/2 + 1 = 61 (59, 61 are both primes), a(2)=19 because (29^2 - 19^2)/2 - 1 = 239 and (29^2 - 19^2)/2 + 1 = 241, a(3)=37 because (43^2 - 37^2)/2 - 1 = 239 and (43^2 - 37^2)/2 + 1 = 241, ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A130761.
Programs
-
Maple
ts_p4:=proc(n) local a,b,i,ans; ans := [ ]: for i from 2 by 1 to n do a := (ithprime(i+2)^(2)-ithprime(i)^(2))/2-1: b := (ithprime(i+2)^(2)-ithprime(i)^(2))/2+1: if (isprime(a)=true and isprime(b)=true) then ans := [ op(ans), ithprime(i) ]: fi od; RETURN(ans) end: ts_p4(2000);
-
Mathematica
Prime/@Select[Range[700],AllTrue[(Prime[#+2]^2-Prime[#]^2)/2+{1,-1},PrimeQ]&] (* Harvey P. Dale, Nov 27 2022 *)
Comments