OFFSET
0,4
COMMENTS
a(n) <= A000217(n)-n for n >= 1.
Without replacement means a(i)+a(i) is not included. However, if a(i)=a(j), a(i)+a(j) still counts because they have two different indices. If you include a(i)+a(i), the sequence becomes A000012 (all ones).
If you include the distinct sums between 3 elements and more, you arrive at the sequence 1, 0, followed by A000079 (2^n).
Same rule as in A247184, but with a(0)=1.
EXAMPLE
a(1) gives the number of distinct sums between two elements of [1]. There aren't two elements so a(1)=0.
a(2) gives the number of distinct sums between two elements of [1,0]. The only sum are 1+0, so a(2) = 1.
a(3) gives the number of distinct sums between two elements of [1,0,1]. The two sums are 1+0 and 1+1 so a(3)=2.
MAPLE
s:= proc(n) option remember; `if`(n=0, {},
{s(n-1)[], seq(a(i)+a(n), i=0..n-1)})
end:
a:= proc(n) option remember;
`if`(n=0, 1, nops(s(n-1)))
end:
seq(a(n), n=0..60); # Alois P. Heinz, Nov 16 2020
MATHEMATICA
a[0] = 1; a[1] = 0;
a[n_Integer?Positive] := a[n] = Length[Union[Total[Subsets[Array[a, n, 0], {2}], {2}]]];
Array[a, 61, 0] (* Jan Mangaldan, Nov 23 2020 *)
PROG
(PARI) my(v=[1], w=[], n=1); while(n<75, for(i=2, #v, w=concat(w, v[i-1]+v[#v])); w=vecsort(w, , 8); v=concat(v, #w); n++); v
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Nov 15 2020
STATUS
approved