login
A092740
Primes p such that p^2 - 1 is the sum of two consecutive primes.
2
3, 5, 11, 17, 19, 29, 43, 53, 79, 101, 113, 127, 137, 179, 251, 281, 349, 409, 419, 431, 449, 521, 569, 571, 577, 599, 643, 661, 677, 739, 797, 823, 853, 857, 883, 907, 941, 991, 1009, 1049, 1087, 1091, 1129, 1163, 1181, 1259, 1289, 1381, 1451, 1459, 1489
OFFSET
1,1
EXAMPLE
Sequence contains the prime 3 because 3+5+1 = 3^2, the prime 5 because 11+13+1 = 5^2, the prime 11 because 59+61+1 = 11^2, the prime 17 because 139+149+1 = 17^2, etc.
MAPLE
seq( ifactor(ithprime(x)+ithprime(x+1)+1), x=1..20); # check squares of primes
MATHEMATICA
f[n_] := Block[{k = Prime[n] + Prime[n + 1] + 1}, If[IntegerQ[ Sqrt[k]], k, 0]]; Select[ Sqrt[ f[ # ]] & /@ Select[ Range[10000], f[ # ] != 0 &], PrimeQ[ # ] &] (* Robert G. Wilson v, Apr 15 2004 *)
tspQ[n_]:=Module[{c=n^2-1}, NextPrime[c/2]+NextPrime[c/2, -1]==c]; Select[ Prime[ Range[250]], tspQ] (* Harvey P. Dale, Apr 30 2019 *)
PROG
(PARI) is(n) = precprime((n-1)/2)+nextprime(n/2) == n; \\ A001043
isok(p) = isprime(p) && is(p^2-1); \\ Michel Marcus, Mar 16 2019
CROSSREFS
Sequence in context: A279767 A125631 A045408 * A214296 A045409 A191206
KEYWORD
nonn
AUTHOR
Jorge Coveiro, Apr 12 2004
EXTENSIONS
Edited by Robert G. Wilson v and Don Reble, Apr 15 2004
STATUS
approved