login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238222 Numbers m with property that m^2 + (m+1)^2 and (m+1)^2 + (m+2)^2 are prime. 1
1, 4, 24, 29, 34, 69, 84, 99, 109, 224, 229, 259, 284, 289, 319, 389, 409, 474, 489, 494, 514, 589, 679, 694, 709, 749, 759, 844, 949, 1079, 1099, 1134, 1174, 1189, 1194, 1269, 1294, 1304, 1329, 1364, 1409, 1474, 1714, 1749, 1784, 1844, 1854, 1924, 2014, 2059, 2099, 2149 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Integers m such both m and m+1 are terms in A027861.

All corresponding primes are == 1 mod 4 (A002144 Pythagorean primes) and terms in A027862.

No such m such that also (m+2)^2 + (m+3)^2 is prime.

LINKS

Zak Seidov, Table of n, a(n) for n = 1..2000

EXAMPLE

1 is in the sequence because 1^2+2^2 = 5 and 2^2+3^2 = 13 are both prime.

4 is in the sequence because 4^2+5^2 = 41 and 5^2+6^2 = 61 are both prime.

MATHEMATICA

Reap[Do[If[PrimeQ[k^2+(k+1)^2]&&PrimeQ[(k+1)^2+(k+2)^2], Sow[k]], {k, 2000}]][[2, 1]]

Select[Range[2500], AllTrue[{#^2+(#+1)^2, (#+1)^2+(#+2)^2}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 25 2017 *)

PROG

(PARI) s=[]; for(m=1, 2500, if(isprime(m^2+(m+1)^2) && isprime((m+1)^2+(m+2)^2), s=concat(s, m))); s \\ Colin Barker, Feb 21 2014

CROSSREFS

Cf. A002144, A062067, A027862. Subsequence of A027861.

Sequence in context: A324517 A137980 A144137 * A180924 A176900 A166727

Adjacent sequences:  A238219 A238220 A238221 * A238223 A238224 A238225

KEYWORD

nonn

AUTHOR

Zak Seidov, Feb 21 2014

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 January 19 16:16 EST 2021. Contains 340270 sequences. (Running on oeis4.)