# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a213995 Showing 1-1 of 1 %I A213995 #22 Sep 02 2023 17:05:00 %S A213995 2,5,29,37,61,89,97,157,181,197,233,317,337,349,401,457,521,557,577, %T A213995 593,613,701,797,829,877,1021,1229,1289,1301,1361,1429,1493,1549,1637, %U A213995 1657,1789,1873,1973,2273,2281,2297,2357,2473,2521,2617,2621,2677,2689,2917,3061,3169,3209,3257,3301 %N A213995 Primes p=u^2+v^2 such that p+u or p+v is prime. %H A213995 Robert Israel, Table of n, a(n) for n = 1..10000 %e A213995 29=5^2+2^2 is in the sequence because 29+2=31 is prime. %p A213995 f:= proc(p) local F; %p A213995 if not isprime(p) then return false fi; %p A213995 F:= GaussInt:-GIfactors(p)[2][1][1]; %p A213995 isprime(p+abs(Re(F))) or isprime(p+abs(Im(F))) %p A213995 end proc: %p A213995 select(f, [2,seq(i,i=5..10000,4)]); # _Robert Israel_, Apr 14 2020 %t A213995 puvQ[{u_,v_}]:=Module[{p=u^2+v^2},PrimeQ[p]&&AnyTrue[p+{u,v},PrimeQ]]; Take[Union[ #[[1]]^2+#[[2]]^2&/@Select[Subsets[Range[-1,100],{2}],puvQ]],60] (* _Harvey P. Dale_, Sep 02 2023 *) %o A213995 (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 %Y A213995 Subsequence of A002313. %Y A213995 Cf. A213996. %K A213995 nonn,easy %O A213995 1,1 %A A213995 _Thomas Ordowski_, Jun 30 2012 %E A213995 Terms >=61 by _R. J. Mathar_, Jun 30 2012 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE