login
A244750
0-additive sequence: a(n) is the smallest number larger than a(n-1) which is not the sum of any subset of earlier terms, with initial values {0, 2, 3, 4}.
2
0, 2, 3, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184
OFFSET
1,2
COMMENTS
0, 2, 3 and then terms in A000079 > 3. - Michael S. Branicky, Nov 07 2025
LINKS
Steven R. Finch, Are 0-additive sequences always regular?, Amer. Math. Monthly, 99 (1992), 671-673.
R. K. Guy, s-Additive sequences, Preprint, 1994. (Annotated scanned copy)
FORMULA
a(n) = 2*a(n-1) = 2^(n-2) for n > 4. - Michael S. Branicky, Nov 07 2025
EXAMPLE
a(5) cannot be 5=2+3. It cannot be 6=2+4. It cannot be 7=3+4, and becomes a(5)=8.
a(6) cannot be 9=2+3+4. It cannot be 10=2+8. It cannot be 11=3+8. It cannot be 12 = 4+8. It cannot be 13=2+3+8. It cannot be 14=2+4+8. It cannot be 15=3+4+8, and becomes a(6)=16.
MAPLE
A244750:= proc(n)
option remember;
if n <= 4 then
op(n, [0, 2, 3, 4]);
else
prev := {seq(procname(k), k=1..n-1)} ;
for a from procname(n-1)+1 do
awrks := true ;
for asub in combinat[choose](prev) do
if add(p, p=asub) = a then
awrks := false;
break;
end if;
end do:
if awrks then
return a;
end if;
end do:
end if;
end proc:
for n from 1 do
print(A244750(n)) ;
end do: # R. J. Mathar, Jul 12 2014
MATHEMATICA
f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {0, 2, 3, 4}, 16]
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, sums = 4, {0, 2, 3, 4, 5, 6, 7, 9}
yield from [0, 2, 3, 4]
while True:
an = next(k for k in count(an+1) if k not in sums)
yield an
sums |= {an+s for s in sums}
print(list(islice(agen(), 25))) # Michael S. Branicky, Nov 07 2025
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by R. J. Mathar, Jul 12 2014
STATUS
approved