OFFSET
1,2
COMMENTS
The nonnegative integers with an even number of even powers of 2 in their base-2 representation are given in A158704.
It appears that a result similar to Prouhet's theorem holds for the terms of A158704 and A158705, specifically: Sum_{k=0..2^n-1, k has an even number of even powers of 2} k^j = Sum_{k=0..2^n-1, k has an odd number of even powers of 2} k^j, for 0 <= j <= (n-1)/2. For a recent treatment of this theorem, see the reference.
Take any binary vector of length 4n+1 with n >= 0. We can activate any bits. When a bit is activated, neighboring bits change their values 0 -> 1, 1 -> 0. Our goal is to turn the original binary vector into a vector of only ones by activating the bits. If the value of the binary vector belongs to this sequence, this is possible for a maximum of 4n+1 activations. - Mikhail Kurkov, Jun 03 2021 [verification needed]
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
Chris Bernhardt, Evil twins alternate with odious twins, Math. Mag. 82 (2009), pp. 57-62.
Eric Weisstein's World of Mathematics, Prouhet-Tarry-Escott Problem
EXAMPLE
The base-2 representation of 6 is 110, i.e., 6 = 2^2 + 2^1, with one even power of 2. Thus 6 is a term of the sequence.
MATHEMATICA
Select[Range[100], OddQ[Total[Take[Reverse[IntegerDigits[#, 2]], {1, -1, 2}]]]&] (* Harvey P. Dale, Dec 23 2012 *)
PROG
(Magma) [ n : n in [0..150] | IsOdd(&+Intseq(n, 4))]; // Vincenzo Librandi, Apr 13 2011
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John W. Layman, Mar 26 2009
STATUS
approved