OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..600
MAPLE
f:= proc(n) local V, E, G, i, j; uses GraphTheory;
V:= select(t -> 2*t > n or 2*A[t] = A[2*t], [$1..n]);
E:= select(t -> t[1]+t[2] <= n and A[t[1]]+A[t[2]] <> A[t[1]+t[2]], {seq(seq({V[i], V[j]}, i=1..j-1), j=1..nops(V))});
G:= Graph(V, E);
IndependenceNumber(G)
end proc:
A[1]:= 1:
for n from 1 to 99 do A[n+1]:= f(n) od:
seq(A[i], i=1..100); # Robert Israel, Oct 31 2024
PROG
(Python)
from itertools import combinations, count, islice
def c(n, s, a): # test the condition for subset s
for ii, i in enumerate(s):
for j in s[ii:]:
if i+j <= n:
if a[i] + a[j] != a[i+j]:
return False
else:
break
return True
def agen(): # generator of terms
a, valid = [None, 1], [tuple()]
yield 1
for n in count(1):
new_valid, r = [], 0
for s in valid:
if c(n, s, a):
new_valid.extend([s, s+(n, )])
r = max(r, len(s)+1)
valid = new_valid
yield r
a.append(r)
print(list(islice(agen(), 30))) # Michael S. Branicky, Oct 01 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Bryle Morga, Sep 30 2024
EXTENSIONS
a(23)-a(58) from Michael S. Branicky, Oct 01 2024
More terms from Robert Israel, Oct 31 2024
STATUS
approved