OFFSET
1,1
COMMENTS
A126721 is a subsequence of this sequence.
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..10000
EXAMPLE
3 is a term since 3 + 40 = 43 is also prime.
7 is a term since 7 + 40 = 47 is also prime.
MAPLE
q:= n-> andmap(isprime, [n, n+40]):
select(q, [$2..2000])[]; # Alois P. Heinz, Jul 21 2022
MATHEMATICA
Select[Prime@ Range@ 180, PrimeQ[# + 40] &] (* Michael De Vlieger, Apr 18 2016 *)
PROG
(Python)
from sympy import isprime
for i in range(3, 2001, 2):
if isprime(i) and isprime(i+40): print (i, end=', ')
(PARI) lista(nn) = forprime(p=2, nn, if (isprime(p+40), print1(p, ", "))); \\ Michel Marcus, Apr 19 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., Apr 17 2016
STATUS
approved