[go: up one dir, main page]

login
A266966
Primes of the form x^2 + y^2 where x^2 + x*y + y^2 is also prime with positive x and y.
0
2, 5, 13, 37, 41, 53, 73, 109, 137, 157, 173, 181, 193, 197, 233, 349, 373, 401, 421, 457, 509, 541, 557, 569, 577, 613, 661, 709, 733, 757, 769, 821, 877, 941, 1009, 1033, 1069, 1117, 1129, 1193, 1201, 1237, 1301, 1373, 1453, 1493, 1549, 1597, 1621, 1657, 1669, 1697, 1721
OFFSET
1,1
COMMENTS
Sequence focuses on the positive values of x and y. Otherwise, for example 17 = 4^2 + (-1)^2 and 4^2 + 4*(-1) + (-1)^2 = 13 is prime too.
Corresponding generalized cuban primes are 3, 7, 19, 43, 61, 67, 97, 139, 181, 199, 211, 223, 271, 277, 337, 421, 439, 499, 541, 601, 619, 631, 751, 787, 811, 823, 829, 919, ...
EXAMPLE
5 is a term because 2^2 + 1^2 = 5 is prime and 2^2 + 2*1 + 1^2 = 7 is prime.
13 is a term because 3^2 + 2^2 = 13 is prime and 3^2 + 3*2 + 2^2 = 19 is prime.
37 is a term because 6^2 + 1^2 = 37 is prime and 6^2 + 6*1 + 1^2 = 43 is prime.
MATHEMATICA
lim = 50; Take[Select[Union@ Flatten@ Table[ If[PrimeQ[Abs[x^2 + x y + y^2]], x^2 + y^2, Nothing], {x, lim}, {y, lim}], PrimeQ], 53] (* Michael De Vlieger, Jan 07 2016 *)
PROG
(PARI) list(lim) = my(v=List(), t); lim\=1; for(x=1, sqrtint(lim), for(y=1, min(sqrtint(lim-x^2), x), if(isprime(t=x^2+y^2) && isprime(x^2+x*y+y^2), listput(v, t)))); vecsort(Vec(v), , 8)
CROSSREFS
Sequence in context: A148299 A148300 A038982 * A019415 A262203 A175118
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 07 2016
STATUS
approved