|
|
A157750
|
|
Lesser of two consecutive primes p,q such that q^2 - p^2 + 1 = the square of a prime.
|
|
2
|
|
|
5, 11, 13, 19, 29, 41, 43, 71, 103, 151, 181, 229, 239, 349, 419, 461, 463, 491, 571, 859, 1069, 1429, 1483, 1583, 1721, 2549, 2969, 3079, 3191, 3319, 3331, 4003, 7177, 7193, 7309, 7873, 8009, 8161, 8849, 9127, 9283, 10729, 11779, 13567, 13693, 15809, 15959
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
One could generate a larger sequence using any three primes p,q,r such that p^2 + 1 = q^2 + r^2. One could consider these "almost prime Pythagorean triangles."
|
|
LINKS
|
|
|
EXAMPLE
|
For the consecutive pair (19,23), 23^2 - 19^2 + 1 = 169 = 13^2; thus 19 is in the sequence.
|
|
MAPLE
|
a := proc (n) if isprime(sqrt(nextprime(ithprime(n))^2-ithprime(n)^2+1)) = true then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 2000); # Emeric Deutsch, Mar 07 2009
|
|
MATHEMATICA
|
ltcpQ[{a_, b_}]:=PrimeQ[Sqrt[b^2-a^2+1]]; Select[Partition[ Prime[ Range[ 2000]], 2, 1], ltcpQ][[All, 1]] (* Harvey P. Dale, Jul 23 2021 *)
|
|
PROG
|
(PARI) list(lim)=my(v=List(), p=2, t); forprime(q=3, nextprime(lim\1+1), if(issquare(q^2-p^2+1, &t)&&isprime(t), listput(v, p)); p=q); Vec(v) \\ Charles R Greathouse IV, Jan 31 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|