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.

A158704 Nonnegative integers with an even number of even powers of 2 in their base-2 representation.

This page as a plain text file.
%I A158704 #34 Feb 16 2025 08:33:10
%S A158704 0,2,5,7,8,10,13,15,17,19,20,22,25,27,28,30,32,34,37,39,40,42,45,47,
%T A158704 49,51,52,54,57,59,60,62,65,67,68,70,73,75,76,78,80,82,85,87,88,90,93,
%U A158704 95,97,99,100
%N A158704 Nonnegative integers with an even number of even powers of 2 in their base-2 representation.
%C A158704 The nonnegative integers with an odd number of even powers of 2 in their base-2 representation are given in A158705.
%C 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-2, k has an even number of even powers of 2} k^j = Sum_{k=0..2^n-2, 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.
%C A158704 Conjecture: take any binary vector of length 4n+3 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+3 activations. - _Mikhail Kurkov_, Jun 01 2021
%H A158704 Amiram Eldar, <a href="/A158704/b158704.txt">Table of n, a(n) for n = 1..10000</a>
%H A158704 Chris Bernhardt, <a href="http://www.jstor.org/stable/27643161">Evil twins alternate with odious twins</a>, Math. Mag. 82 (2009), pp. 57-62.
%H A158704 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Prouhet-Tarry-EscottProblem.html">Prouhet-Tarry-Escott Problem</a>
%H A158704 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%e A158704 The base-2 representation of 5 is 101, i.e., 5 = 2^2 + 2^0, with two even powers of 2. Thus 5 is a term of the sequence.
%t A158704 Select[Range[0, 100], EvenQ[Total[Take[Reverse[IntegerDigits[#, 2]], {1, -1, 2}]]] &] (* _Amiram Eldar_, Jan 04 2020 after _Harvey P. Dale_ at A158705 *)
%o A158704 (Magma) [ n : n in [0..150] | IsEven(&+Intseq(n, 4))]; // _Vincenzo Librandi_, Apr 13 2011
%Y A158704 Cf. A112539 (characteristic function, up to offset), A158705 (complement).
%Y A158704 Cf. A000069, A001969, A157971.
%K A158704 nonn,base
%O A158704 1,2
%A A158704 _John W. Layman_, Mar 24 2009