This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A247184 #43 Jul 16 2021 07:51:19 %S A247184 0,0,1,2,4,7,11,15,20,26,32,40,48,57,65,73,81,90,98,106,114,123,132, %T A247184 147,157,170,190,202,223,236,251,270,291,314,338,361,380,398,421,443, %U A247184 471,495,520,544,567,592,616,639,663,692,720,749,781,819,852,885,913,948,987,1023,1055,1088 %N A247184 a(0) = 0. a(n) is the number of distinct sums of two elements in [a(0), ... a(n-1)] chosen without replacement. %C A247184 a(n) <= A000217(n)-n. %C A247184 Without replacement means that a(i)+a(i) is not a valid sum to include. However, if a(i) = a(j), a(i)+a(j) is still a valid sum to include because they have different indices. %C A247184 If you include a(i)+a(i) (i.e., with replacement) as a valid sum, the sequence becomes 0, 1, 3, 6, 9, 12, ... = 0, 1, followed by A008585(n) for n > 0. %C A247184 a(i)+a(j) and a(j)+a(i) are regarded as the same for all indices i and j. %H A247184 Alois P. Heinz, <a href="/A247184/b247184.txt">Table of n, a(n) for n = 0..10000</a> %e A247184 a(1) gives the number of distinct sums of two elements of [0]. There aren't two elements so a(1) = 0. %e A247184 a(2) gives the number of distinct sums of two elements of [0,0]. There is only 1 sum, 0, so a(2) = 1. %e A247184 a(3) gives the number of distinct sums of two elements of [0,0,1]. There are 2 distinct possible sums 0 and 1, so a(3) = 2. %e A247184 a(4) gives the number of distinct sums of two elements of [0,0,1,2]. There are 4 distinct possible sums {0, 1, 2, 3}, so a(4) = 4. %p A247184 s:= proc(n) option remember; `if`(n=0, {}, %p A247184 {s(n-1)[], seq(a(i)+a(n), i=0..n-1)}) %p A247184 end: %p A247184 a:= proc(n) option remember; %p A247184 `if`(n=0, 0, nops(s(n-1))) %p A247184 end: %p A247184 seq(a(n), n=0..50); # _Alois P. Heinz_, Nov 16 2020 %t A247184 s[n_] := s[n] = If[n == 0, {}, %t A247184 Union@Join[s[n-1], Table[a[i] + a[n], {i, 0, n-1}]]]; %t A247184 a[n_] := a[n] = %t A247184 If[n == 0, 0, Length[s[n-1]]]; %t A247184 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jul 16 2021, after _Alois P. Heinz_ *) %o A247184 (PARI) v=[0];n=1;while(n<75,w=[];for(i=1,#v,for(j=i+1,#v,w=concat(w,v[i]+v[j])));v=concat(v,#vecsort(w,,8));n++);v %Y A247184 Cf. A000217, A008585, A247185. %K A247184 nonn %O A247184 0,4 %A A247184 _Derek Orr_, Nov 22 2014