OFFSET
0,3
COMMENTS
If we drop the unicity constraint, then we obtain A059841.
This sequence is a self-inverse permutation of the natural numbers.
a(1+2+2) = a(1) + a(2) + a(2).
LINKS
FORMULA
a(n+9) = a(n) + 9 for any n >= 0.
G.f.: (1-x+2*x^2+x^3+2*x^4-x^5+4*x^6-x^7-x^8+3*x^9)/((1-x)*(1-x^9)). - Robert Israel, Jun 13 2017
EXAMPLE
See Links section.
MAPLE
A[0]:= 1: A[1]:= 0: S:= {0, 1}:
for n from 2 to 100 do
Forbid:= S union {seq(A[i]+A[n-i], i=1..floor(n/2))};
A[n]:= min( {$1..max(Forbid)+1} minus Forbid);
S:= S union {A[n]};
od:
[seq(A[i], i=0..100)]; # Robert Israel, Jun 13 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 05 2017
STATUS
approved