OFFSET
1,2
COMMENTS
This sequence is a complete sequence.
LINKS
Rémy Sigrist, C++ program for A331811
Eric Weisstein's World of Mathematics, Complete Sequence
MATHEMATICA
Nest[Append[#, Block[{k = #[[-1]] + 1}, While[Nand[NoneTrue[#, k == 2 # &], FreeQ[Map[Total, Rest@ Subsets[#]], k]], k++]; k]] & @@ {#, Map[Total, Subsets[#]]} &, {1, 2, 3, 5}, 10] (* Michael De Vlieger, Jan 27 2020 *)
PROG
(PARI) upto(lim)={my(a=[1, 2, 3, 5], b=[]); for(i=1, lim, forsubset(#a, x, b=concat(b, [vecsum(vecextract(a, x))])); b=setminus(vecsort(b, , 8), a); for(j=1, #a, b=concat(b, [2*a[j]]); b=vecsort(b, , 8)); if(setsearch(b, i)==0, a=concat(a, [i]); a=vecsort(a, , 8)) ); a}
{ upto(200) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhandos Mambetaliyev, Jan 27 2020
EXTENSIONS
a(13)-a(14) from Hugo Pfoertner, Jan 27 2020
More terms from Rémy Sigrist, Jan 28 2020
STATUS
approved