OFFSET
1,2
LINKS
Carole Dubois, Table of n, a(n) for n = 1..508
EXAMPLE
After 8 and 6 the next term is 3 as 8+6+3 = 17 is a prime;
After 6 and 3 the next term is 20 as 6+3+2 = 11 and 3+2+0 = 5 are primes;
After 20 the next term is 9 as 2+0+9 = 11 is a prime; etc.
MATHEMATICA
Nest[Append[#, Block[{k = 3}, While[Nand[FreeQ[#, k], AllTrue[Table[Total@ #[[i ;; i + 2]], {i, Length@ # - 2}], PrimeQ] &@ Flatten@ IntegerDigits@ Append[#, k] ], k++]; k]] &, {1, 2}, 80] (* Michael De Vlieger, Dec 14 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Dec 14 2019
STATUS
approved