OFFSET
1,1
COMMENTS
All terms == 0, 24, 36 or 48 (mod 72). - Robert Israel, Apr 30 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..2451
EXAMPLE
108 = 6*18. 6 and 18 are both averages of twin prime pairs, so 108 is in the sequence.
MAPLE
N:= 10^5: # to get all terms <= N
P:= select(isprime, {seq(i, i=3..N+1, 2)}):
TPA:= map(`+`, P, 1) intersect map(`-`, P, 1):
R:= select(t -> ormap(d -> member(t/d, TPA), TPA intersect numtheory:-divisors(t)), TPA):
sort(convert(R, list)); # Robert Israel, Apr 30 2019
PROG
(PARI) isok1(n) = isprime(n-1) && isprime(n + 1);
isok2(n) = fordiv(n, d, if (isok1(d) && isok1(n/d), return(1)); );
isok(n) = isok1(n) && isok2(n); \\ Michel Marcus, Apr 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Dmitry Kamenetsky, Apr 26 2019
STATUS
approved