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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213995 Primes p=u^2+v^2 such that p+u or p+v is prime. 2
2, 5, 29, 37, 61, 89, 97, 157, 181, 197, 233, 317, 337, 349, 401, 457, 521, 557, 577, 593, 613, 701, 797, 829, 877, 1021, 1229, 1289, 1301, 1361, 1429, 1493, 1549, 1637, 1657, 1789, 1873, 1973, 2273, 2281, 2297, 2357, 2473, 2521, 2617, 2621, 2677, 2689, 2917, 3061, 3169, 3209, 3257, 3301 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

29=5^2+2^2 is in the sequence because 29+2=31 is prime.

MAPLE

f:= proc(p) local F;

  if not isprime(p) then return false fi;

  F:= GaussInt:-GIfactors(p)[2][1][1];

  isprime(p+abs(Re(F))) or isprime(p+abs(Im(F)))

  end proc:

select(f, [2, seq(i, i=5..10000, 4)]); # Robert Israel, Apr 14 2020

PROG

(PARI) list(lim)=my(L=List([2]), u2, p); for(u=2, sqrtint(lim\=1), u2=u^2; forstep(v=if(u%2, 2, 1), min(sqrtint(lim-u2), u-1), 2, if(isprime(p=u2+v^2) && (isprime(p+u) || isprime(p+v)), listput(L, p)))); Set(L) \\ Charles R Greathouse IV, Apr 14 2020

CROSSREFS

Subsequence of A002313.

Cf. A213996.

Sequence in context: A178322 A165161 A098858 * A134449 A103579 A161500

Adjacent sequences:  A213992 A213993 A213994 * A213996 A213997 A213998

KEYWORD

nonn,easy

AUTHOR

Thomas Ordowski, Jun 30 2012

EXTENSIONS

Terms >=61 by R. J. Mathar, Jun 30 2012

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 August 13 06:22 EDT 2020. Contains 336442 sequences. (Running on oeis4.)