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”).

A108809
Numbers n such that both n+(n-1)^2 and n+(n+1)^2 are primes.
1
2, 3, 4, 7, 9, 15, 18, 25, 34, 55, 58, 63, 67, 100, 102, 139, 144, 148, 154, 162, 163, 168, 190, 195, 219, 232, 247, 267, 280, 289, 330, 349, 379, 384, 417, 427, 448, 454, 477, 568, 580, 643, 645, 669, 672, 727, 762, 793, 802, 813, 837, 847, 900, 975, 988, 993
OFFSET
1,1
LINKS
EXAMPLE
34 is in the sequence because 34 + 33^2 = 1123 and 34 + 35^2 = 1259 are both prime.
MAPLE
L:=[]; for k from 1 to 1000 do if isprime(k+(k-1)^2) and isprime(k+(k+1)^2) then L:=[op(L), k] fi od;
MATHEMATICA
Select[Range@1000, PrimeQ[#^2 - # + 1] && PrimeQ[#^2 + 3 # + 1] &] (* Ivan Neretin, Feb 08 2017 *)
PROG
(PARI) isok(n) = isprime(n+(n-1)^2) && isprime(n+(n+1)^2); \\ Michel Marcus, Feb 08 2017
CROSSREFS
Cf. A027861.
Intersection of A055494 and A094210. - Michel Marcus, Feb 08 2017
Sequence in context: A237997 A317885 A321535 * A276846 A303665 A027947
KEYWORD
easy,nonn
AUTHOR
Walter Kehowski, Jul 04 2005
STATUS
approved