OFFSET
1,1
EXAMPLE
a(3) = 19 because 19 is a twin prime, 3*19+2 = 59 is a twin prime, and 3*59+2 = 179 is a twin prime, but 3*179+2 = 539 is not a twin prime.
MAPLE
f:= proc(p) local q; option remember;
if isprime(p) and isprime(p + 4*(p mod 3) - 6) then
1 + procname(3*p+2)
else 0
fi
end proc:
f(3):= 2:
A:= Vector(4): count:= 0:
for p from 5 by 2 while count < 4 do
v:= f(p);
if v > 0 and A[v] = 0 then A[v]:= p; fi
od:
convert(A, list);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Sep 02 2022
EXTENSIONS
a(5) from Jean-Marc Rebert, Sep 08 2022
STATUS
approved