OFFSET
1,1
COMMENTS
It seems that more than one consecutive number set from one kind or the other may exist for a term. Also, for some terms, an equal number of addends from each kind may correspond.
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..1000
EXAMPLE
5 is a term because 5 = 1 + 4 = 2 + 3, which is the sum of two consecutive nonprimes and also the sum of two consecutive primes.
17 is a term because 17 = 8 + 9 = 2 + 3 + 5 + 7, the sum of two consecutive nonprimes and also the sum of four consecutive primes.
PROG
(Python)
from sympy import isprime
primes = [x for x in range(2, 3000) if isprime(x)]
comps = [x for x in range(1, 3000) if not isprime(x)]
psums = set(sum(primes[p:p+pn]) for pn in range(2, 100) for p in range(len(primes)-pn))
csums = set(sum(comps[c:c+cn]) for cn in range(2, 100) for c in range(len(comps)-cn))
terms = sorted(list(psums.intersection(csums)))
print(terms)
# David Consiglio, Jr., Dec 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Tamas Sandor Nagy, Nov 01 2023
EXTENSIONS
More terms from David Consiglio, Jr., Dec 18 2023
STATUS
approved