The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A257118 Smallest of three consecutive prime numbers each of which is the sum of two squares. 2
89, 389, 397, 449, 661, 757, 761, 929, 997, 1193, 1201, 1669, 2213, 2269, 2293, 2593, 2609, 2617, 2741, 3037, 3041, 3209, 3217, 3413, 3433, 3449, 3697, 3877, 4397, 4801, 5189, 5233, 5237, 5569, 5689, 5717, 6101, 6217, 6389, 6469, 6733, 6829, 6833, 6997, 7529 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence is a subsequence of A257117.
LINKS
EXAMPLE
389 = 10^2 + 17^2, 397 = 6^2 + 19^2, and 401 = 1^2 + 20^2, so 389 is a term.
397 = 6^2 + 19^2, 401 = 1^2 + 20^2, and 409 = 3^2 + 20^2, so 397 is a term.
MATHEMATICA
Prime/@SequencePosition[Table[If[Count[IntegerPartitions[n, {2}], _?(AllTrue[ Sqrt[#], IntegerQ]&)]>0, 1, 0], {n, Prime[Range[3000]]}], {1, 1, 1}, Overlaps-> All] [[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 08 2018 *)
PROG
(Python)
import sympy
def sumpow(sn0, n, p):
....af=0; bf=0; an=1
....sn1=sn0+n
....if n!=0:
........sn1=sympy.nextprime(sn0, n)
....while an**p<sn1:
........bnsq=sn1-(an**p)
........bn=sympy.ntheory.perfect_power(bnsq)
........if bn!=False and list(bn)[1]==p:
............af=an
............bf=list(bn)[0]
............an=sn1+100
........an=an+1
....return(af, bf)
s0=1; pw=2
while s0>0:
....a0, b0=sumpow(s0, 0, pw)
....a1, b1=sumpow(s0, 1, pw)
....a2, b2=sumpow(s0, 2, pw)
....if a0!=0 and a1!=0 and a2!=0:
........print(s0)
....s0=sympy.nextprime(s0)
CROSSREFS
Cf. A064716 (Smallest member of three consecutive numbers).
Cf. A257117 (Smallest member of two consecutive prime numbers).
Sequence in context: A143828 A253140 A142448 * A244777 A107192 A061372
KEYWORD
nonn,easy
AUTHOR
Abhiram R Devesh, Apr 25 2015
EXTENSIONS
Corrected and extended by and prior b-file replaced by Harvey P. Dale, Jul 08 2018
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 May 31 06:45 EDT 2024. Contains 372981 sequences. (Running on oeis4.)