OFFSET
1,1
COMMENTS
Partition the sequence of primes into groups so that the sum of the terms in each group is prime: {2, 3}, {5, 7, 11}, {13, 17, 19, 23, 29}, {31, 37, 41}, {43, 47, 53, 59, 61}, {67, 71, 73}, {79, 83, 89}, {97, 101, 103, 107, 109, 113, 127}, {131, 137, 139, 149, 151, 157, 163, 167, 173}, {179, 181, 191, 193, 197}, ...; A073684(n) is the number of terms in n-th group; A073682(n) is the sum of terms in n-th group; A073683(n) is the first term in n-th group; A077279(n) is the last term in n-th group.
LINKS
EXAMPLE
a(1)=5 because sum of first two primes 2+3 = 5 is prime;
a(2)=23 because sum of next three primes 5+7+11 = 23 is prime;
a(3)=101 because sum of next five primes 13+17+19+23+29 = 101 is prime.
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime
def agen(): # generator of terms
s, i, p = 0, 1, 2
while True:
while not(isprime(s:=s+p)) or i < 2:
i, p = i+1, nextprime(p)
yield s
s, i, p = 0, 1, nextprime(p)
print(list(islice(agen(), 42))) # Michael S. Branicky, May 23 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 11 2002
EXTENSIONS
More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Apr 10 2003
STATUS
approved
