

A203075


Write n as a sum of distinct terms from A203074; if there is more than one way, pick the smallest binary number.


2



0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10001, 10010, 10011, 10101, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 100111, 101010, 101011, 101101, 101110, 101111, 110001, 110010, 110011, 110101, 110110, 110111, 111010, 111011
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

a(n) is a binary vector for selecting terms from the complete sequence, A203074 that when summed gives n. It uses a miserly algorithm that chooses the smallest binary vector if there are multiple solutions. Somewhat similar to, although different from, A014417 and A104326.


LINKS

Table of n, a(n) for n=0..36.
Wikipedia, Complete sequence.


FORMULA

a(n) x A203074 = n, where x is the inner product and the binary vector a(n) is in ascending powers of 2 with infinite trailing zeros.


EXAMPLE

5 can be written as 5, i.e. 1000, or as 3+2, i.e. 110, and we choose the smaller.
18 can be written as 17+1, i.e. 100001, or as 11+5+2, i.e. 11010, and again we choose the smaller.


MATHEMATICA

nextprime[n_Integer] := (k=n+1; While[!PrimeQ[k], k++]; k); aprime[m_Integer] := (If[m==0, 1, nextprime[2^(m1)]]); seqtable[l_] := (stable=Table[aprime[j], {j, 0, l}]; stable); inttable[p_] := (itable=Reverse[IntegerDigits[p, 2]]; itable); h=1; otable={0}; ttable={}; While[h<100, (inttable[h]; seqtable[Length[itable]1]; test=itable.stable; If[!MemberQ[ttable, test], AppendTo[otable, h], Null]; AppendTo[ttable, test]; h++)]; IntegerString[otable, 2]


CROSSREFS

Cf. A203974, A203076, A014417, A104326.
Sequence in context: A125099 A055611 A077813 * A104326 A205598 A350312
Adjacent sequences: A203072 A203073 A203074 * A203076 A203077 A203078


KEYWORD

nonn


AUTHOR

Frank M. Jackson and N. J. A. Sloane, Dec 28 2011.


STATUS

approved



