A158704 Nonnegative integers with an even number of even powers of 2 in their base-2 representation.
0, 2, 5, 7, 8, 10, 13, 15, 17, 19, 20, 22, 25, 27, 28, 30, 32, 34, 37, 39, 40, 42, 45, 47, 49, 51, 52, 54, 57, 59, 60, 62, 65, 67, 68, 70, 73, 75, 76, 78, 80, 82, 85, 87, 88, 90, 93, 95, 97, 99, 100
Offset: 1
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- 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
- Index entries for 2-automatic sequences.
Crossrefs
Programs
-
Magma
[ n : n in [0..150] | IsEven(&+Intseq(n, 4))]; // Vincenzo Librandi, Apr 13 2011
-
Mathematica
Select[Range[0, 100], EvenQ[Total[Take[Reverse[IntegerDigits[#, 2]], {1, -1, 2}]]] &] (* Amiram Eldar, Jan 04 2020 after Harvey P. Dale at A158705 *)
Comments