Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Primes of the form a^2 + b^2 such that both a^2 + b^2 - a*b and a^2 + b^2 + a*b are prime.
2

%I #26 Mar 13 2018 05:39:21

%S 5,13,37,109,193,421,457,541,613,709,757,1033,1117,1201,1549,1597,

%T 1621,1789,2137,2293,2377,2437,2797,3061,3109,3313,3361,3469,4153,

%U 4621,4657,4729,5077,5233,5569,5653,6421,6469,6637,6997,7417,7561,7681,7753,8101,8689

%N Primes of the form a^2 + b^2 such that both a^2 + b^2 - a*b and a^2 + b^2 + a*b are prime.

%H Charles R Greathouse IV, <a href="/A182312/b182312.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) == 1 (mod 4). - _Thomas Ordowski_, Mar 13 2018

%e The prime 13 = 2^2 + 3^2 is a term, since 13 - 2*3 = 7 is prime and 13 + 2*3 = 19 is prime.

%t prsQ[{a_,b_}]:=Module[{c=a^2+b^2,d=a*b},And@@PrimeQ[c+{0,d,-d}]]; Sort[#[[1]]^2+#[[2]]^2&/@Select[Subsets[Range[100],{2}],prsQ]] (* _Harvey P. Dale_, Apr 27 2014 *)

%o (PARI) list(lim)=my(v=List(), t); for(a=1, sqrt(lim), forstep(b=1+a%2, min(a, sqrt(lim-a^2)), 2, if(isprime(t=a^2+b^2) && isprime(t-a*b) && isprime(t+a*b), listput(v, t)))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Apr 25 2012

%Y Subsequence of A002313.

%Y Cf. A007645.

%K nonn

%O 1,1

%A _Thomas Ordowski_, Apr 24 2012

%E a(6)-a(46) from _Charles R Greathouse IV_, Apr 25 2012