login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 4 13:05 EDT 2023. Contains 365885 sequences. (Running on oeis4.)