login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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
Cf. A001481.
Sequence in context: A040144 A019395 A045448 * A359501 A045449 A296859
KEYWORD
nonn
AUTHOR
J. M. Bergot, Mar 05 2009
EXTENSIONS
More terms from Klaus Brockhaus, Mar 05 2009
More terms from Emeric Deutsch, Mar 07 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)