login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048161 Primes p such that q=(p^2+1)/2 is also a prime. 35
3, 5, 11, 19, 29, 59, 61, 71, 79, 101, 131, 139, 181, 199, 271, 349, 379, 409, 449, 461, 521, 569, 571, 631, 641, 661, 739, 751, 821, 881, 929, 991, 1031, 1039, 1051, 1069, 1091, 1129, 1151, 1171, 1181, 1361, 1439, 1459, 1489, 1499, 1531, 1709, 1741, 1811, 1831, 1901 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Primes which are a leg of an integral right triangle whose hypotenuse is also prime.

It is conjectured that there are an infinite number of such triangles.

The Pythagorean triple {p, (p^2 - 1)/2, (p^2 + 1)/2} corresponds to {a(n), A067755(n), A067756(n)}. - Lekraj Beedassy, Oct 27 2003

There is no Pythagorean triangle all of whose sides are prime numbers. Still there are Pythagorean triangles of which the hypotenuse and one side are prime numbers, for example, the triangles (3,4,5), (11,60,61), (19,180,181), (61,1860,1861), (71,2520,2521), (79,3120,3121). [Sierpiński]

We can always write p=(Y+1)^2-Y^2, with Y=(p-1)/2, therefore q=(Y+1)^2+Y^2. - Vincenzo Librandi, Nov 19 2010

p^2 and p^2+1 are semiprimes; p^2 are squares in A070552 Numbers n such that n and n+1 are products of two primes. - Zak Seidov, Mar 21 2011

REFERENCES

W. Sierpiński, Pythagorean triangles, Dover Publications, Inc., Mineola, NY, 2003, p. 6 MR2002669

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

H. Dubner and T. Forbes, Prime Pythagorean triangles, Journal of Integer Sequences, Vol. 4(2001), #01.2.3.

FORMULA

A000035(a(n))*A010051(a(n))*A010051((a(n)^2+1)/2) = 1. - Reinhard Zumkeller, Aug 26 2012

EXAMPLE

For p=11, (p^2+1)/2=61; p=61, (p^2+1)/2=1861.

For p(1)=3, the right triangle 3, 4, 5 is the smallest where 5=(3*3+1)/2. For p(10)=101, the right triangle is 101, 5100, 5101 where 5101=(101*101+1)/2.

MAPLE

a := proc (n) if isprime(n) = true and type((1/2)*n^2+1/2, integer) = true and isprime((1/2)*n^2+1/2) = true then n else end if end proc: seq(a(n), n = 1 .. 2000) # Emeric Deutsch, Jan 18 2009

MATHEMATICA

Select[Prime[Range[200]], PrimeQ[(#^2 + 1)/2] &] (* Stefan Steinerberger, Apr 07 2006 *)

a[ n_] := Module[{p}, If[ n < 1, 0, p = a[n - 1]; While[ (p = NextPrime[p]) > 0, If[ PrimeQ[(p*p + 1)/2], Break[]]]; p]]; (* Michael Somos, Nov 24 2018 *)

PROG

(PARI) {a(n) = my(p); if( n<1, 0, p = a(n-1) + (n==1); while(p = nextprime(p+2), if( isprime((p*p+1)/2), break)); p)}; /* Michael Somos, Mar 03 2004 */

(Haskell)

a048161 n = a048161_list !! (n-1)

a048161_list = [p | p <- a065091_list, a010051 ((p^2 + 1) `div` 2) == 1]

-- Reinhard Zumkeller, Aug 26 2012

(MAGMA) [p: p in PrimesInInterval(3, 2000) | IsPrime((p^2+1) div 2)]; // Vincenzo Librandi, Dec 31 2013

CROSSREFS

Cf. A067755, A067756. Complement in primes of A094516.

Cf. A017281, A154428, A010051, A065091, A005383.

Cf. A048270, A048295, A308635, A308636.  Primes contained in A002731.

Sequence in context: A284036 A172438 A023233 * A284034 A051642 A007671

Adjacent sequences:  A048158 A048159 A048160 * A048162 A048163 A048164

KEYWORD

nonn,easy,nice,changed

AUTHOR

Harvey Dubner (harvey(AT)dubner.com)

EXTENSIONS

More terms from David W. Wilson

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 22:25 EDT 2019. Contains 324361 sequences. (Running on oeis4.)