login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A215248
Numbers n such that n^2 + 1 and (n^2+2)/6 are both primes.
2
4, 10, 16, 20, 26, 56, 110, 116, 170, 224, 236, 314, 326, 340, 430, 584, 700, 764, 920, 946, 1054, 1106, 1276, 1294, 1406, 1546, 1550, 1654, 1684, 1700, 1756, 1766, 1784, 1816, 2006, 2026, 2116, 2260, 2294, 2314, 2320, 2360, 2576, 2600, 2684, 2746, 2770, 2924
OFFSET
1,1
COMMENTS
n==2 or 4 (mod 6) so that (n^2+2)/6 is an integer. - Robert Israel, May 03 2017
LINKS
EXAMPLE
4 is in the sequence because 4^2+1 = 17 and (4^2+2)/6 = 3 are both primes.
MAPLE
select(t -> isprime(t^2+1) and isprime((t^2+2)/6), [seq(seq(6*j+k, k=[2, 4]), j=0..1000)]); # Robert Israel, May 03 2017
MATHEMATICA
Select[Range[3000], PrimeQ[(#^2+1)]&&PrimeQ[(#^2+2)/6]&]
Select[Range[3000], AllTrue[{#^2+1, (#^2+2)/6}, PrimeQ]&] (* Harvey P. Dale, Sep 08 2024 *)
CROSSREFS
Sequence in context: A310503 A310504 A310505 * A310506 A310507 A334115
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 10 2012
STATUS
approved