This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A293664 For n >= 0, let E_n be the set of exponents in expression of 2*n as a sum of distinct powers of 2 (2*n = Sum_{e in E_n} 2^e); a(n) = number of distinct values taken by the expression Sum_{e in E_n} s(e)*2^e when s runs over all functions from the positive numbers to the set { +1, -1 }. 2

%I

%S 1,2,2,4,2,4,4,7,2,4,4,8,4,7,8,11,2,4,4,8,4,8,7,12,4,7,8,13,8,12,13,

%T 16,2,4,4,8,4,8,8,13,4,8,7,14,8,13,14,17,4,7,8,13,8,14,13,18,8,12,14,

%U 19,15,18,19,22,2,4,4,8,4,8,8,14,4,8,8,15,7,12

%N For n >= 0, let E_n be the set of exponents in expression of 2*n as a sum of distinct powers of 2 (2*n = Sum_{e in E_n} 2^e); a(n) = number of distinct values taken by the expression Sum_{e in E_n} s(e)*2^e when s runs over all functions from the positive numbers to the set { +1, -1 }.

%C More informally, any number n encodes a finite sets of positive numbers, say { e_1, e_2, ..., e_h }, and a(n) gives the number of distinct values of the form +- e_1 +- e_2 ... +- e_h.

%C The set of exponents in expression for n as a sum of distinct powers of 2 corresponds to the n-th row of A133457.

%C A number n belongs to A293576 iff a(n) is odd.

%C a(n) <= 2^A000120(n) for any n >= 0.

%H Rémy Sigrist, <a href="/A293664/b293664.txt">Table of n, a(n) for n = 0..8192</a>

%e For n = 15:

%e - E_15 = { 1, 2, 3, 4 },

%e - the possible "plus-minus" sums are:

%e +4 +3 +2 +1 = 10 (1st value)

%e +4 +3 +2 -1 = 8 (2nd value)

%e +4 +3 -2 +1 = 6 (3rd value)

%e +4 +3 -2 -1 = 4 (4th value)

%e +4 -3 +2 +1 = 4 (already seen)

%e +4 -3 +2 -1 = 2 (5th value)

%e +4 -3 -2 +1 = 0 (6th value)

%e +4 -3 -2 -1 = -2 (7th value)

%e -4 +3 +2 +1 = 2 (already seen)

%e -4 +3 +2 -1 = 0 (already seen)

%e -4 +3 -2 +1 = -2 (already seen)

%e -4 +3 -2 -1 = -4 (8th value)

%e -4 -3 +2 +1 = -4 (already seen)

%e -4 -3 +2 -1 = -6 (9th value)

%e -4 -3 -2 +1 = -8 (10th value)

%e -4 -3 -2 -1 = -10 (11th value)

%e - hence, a(15) = 11.

%o (PARI) a(n) = { my (v=Set(0)); my (b = Vecrev(binary(n))); for (i=1, #b, if (b[i], v = setunion(Set(vector(#v, k, v[k]-i)), Set(vector(#v, k, v[k]+i))););); return (#v); }

%Y Cf. A133457, A293576.

%K nonn,base

%O 0,2

%A _Rémy Sigrist_, Oct 14 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 18 18:29 EDT 2019. Contains 327180 sequences. (Running on oeis4.)