login
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.
1
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,1
LINKS
EXAMPLE
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, ...
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 *)
CROSSREFS
Cf. A130761.
Sequence in context: A152540 A073859 A038847 * A136057 A177092 A023224
KEYWORD
nonn
AUTHOR
Jani Melik, Aug 01 2007
STATUS
approved