OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 29 is a term because 29, 29 + 2 = 31, 2 + 9 = 11 and 2 + 9 + 2 = 13 are primes.
MAPLE
filter:= proc(n) local s;
if not(isprime(n) and isprime(n+2)) then return false fi;
s:= convert(convert(n, base, 10), `+`);
isprime(s) and isprime(s+2)
end:
select(filter, [3, seq(i, i=5..5000, 6)]);
MATHEMATICA
Select[Prime[Range[600]], AllTrue[{# + 2, (d = Plus @@ IntegerDigits[#]), d + 2}, PrimeQ] &] (* Amiram Eldar, Jul 28 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jul 27 2022
STATUS
approved