OFFSET
0,4
COMMENTS
A072999 consists of all prime terms in this sequence.
FORMULA
a(p+i) = a(p+i-1) + a(p+m+1), where a(p) is a prime term, which is followed by m (>=1) composite terms, a(p+1) through a(p+m), and a prime term a(p+m+1).
PROG
(Python)
from sympy import isprime
L = [0, 1]; print(L[0])
for i in range(45):
b = L[0] + L[1]; L.append(b)
if not isprime(b): L[2] = L[1]; L[1] = b
print(L[1]); L.pop(0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Aug 08 2021
STATUS
approved