OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Twin Primes
MAPLE
N:= 1000: # for terms <= N
P:= select(isprime, {seq(i, i=3..N+2, 2)}):
TP:= P intersect map(`+`, P, 2):
TP:= map(t -> (t-2, t), TP):
TP:= sort(convert(TP, list)):
S:= {1}:
for i from 1 to nops(TP) do
S0:= S;
S:= S union map(`*`, select(`<=`, S, N/TP[i]), TP[i]);
od:
sort(convert(S, list)); # Robert Israel, Oct 28 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 15 2020
STATUS
approved