cp's OEIS Frontend

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.

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 }.

This page as a plain text file.
%I A293664 #15 Oct 16 2017 08:45:24
%S A293664 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 A293664 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 A293664 19,15,18,19,22,2,4,4,8,4,8,8,14,4,8,8,15,7,12
%N 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 }.
%C A293664 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 A293664 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 A293664 A number n belongs to A293576 iff a(n) is odd.
%C A293664 a(n) <= 2^A000120(n) for any n >= 0.
%H A293664 Rémy Sigrist, <a href="/A293664/b293664.txt">Table of n, a(n) for n = 0..8192</a>
%e A293664 For n = 15:
%e A293664 - E_15 = { 1, 2, 3, 4 },
%e A293664 - the possible "plus-minus" sums are:
%e A293664   +4 +3 +2 +1 =  10   (1st value)
%e A293664   +4 +3 +2 -1 =   8   (2nd value)
%e A293664   +4 +3 -2 +1 =   6   (3rd value)
%e A293664   +4 +3 -2 -1 =   4   (4th value)
%e A293664   +4 -3 +2 +1 =   4   (already seen)
%e A293664   +4 -3 +2 -1 =   2   (5th value)
%e A293664   +4 -3 -2 +1 =   0   (6th value)
%e A293664   +4 -3 -2 -1 =  -2   (7th value)
%e A293664   -4 +3 +2 +1 =   2   (already seen)
%e A293664   -4 +3 +2 -1 =   0   (already seen)
%e A293664   -4 +3 -2 +1 =  -2   (already seen)
%e A293664   -4 +3 -2 -1 =  -4   (8th value)
%e A293664   -4 -3 +2 +1 =  -4   (already seen)
%e A293664   -4 -3 +2 -1 =  -6   (9th value)
%e A293664   -4 -3 -2 +1 =  -8   (10th value)
%e A293664   -4 -3 -2 -1 = -10   (11th value)
%e A293664 - hence, a(15) = 11.
%o A293664 (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 A293664 Cf. A133457, A293576.
%K A293664 nonn,base
%O A293664 0,2
%A A293664 _Rémy Sigrist_, Oct 14 2017