OFFSET
1,3
LINKS
Winston de Greef, Table of n, a(n) for n = 1..10000
FORMULA
a(n) <= A000217(n).
EXAMPLE
At n=1, there are no contiguous subsequences, so a(1)=0.
At n=2, there is one contiguous subsequence: [0], so a(2)=1.
At n=3, there are three contiguous subsequences: [0], [1] and [0, 1], but only two distinct sums (0 and 1), so a(3)=2.
PROG
(Python)
from itertools import islice
def gen_a():
seen = set()
sums = []
new = 0
while True:
for v in sums: seen.add(v + new)
sums = [v + new for v in sums]
sums.append(0)
new = len(seen)
yield new
print(list(islice(gen_a(), 60))) # Winston de Greef, Apr 15 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Apr 15 2023
EXTENSIONS
a(13)-a(15) corrected and more terms from Winston de Greef, Apr 15 2023
STATUS
approved