A158705 Nonnegative integers with an odd number of even powers of 2 in their base-2 representation.
1, 3, 4, 6, 9, 11, 12, 14, 16, 18, 21, 23, 24, 26, 29, 31, 33, 35, 36, 38, 41, 43, 44, 46, 48, 50, 53, 55, 56, 58, 61, 63, 64, 66, 69, 71, 72, 74, 77, 79, 81, 83, 84, 86, 89, 91, 92, 94, 96, 98, 101, 103, 104, 106, 109, 111, 113, 115, 116, 118, 121, 123, 124, 126
Offset: 1
Examples
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.
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
- Index entries for 2-automatic sequences.
Crossrefs
Programs
-
Magma
[ n : n in [0..150] | IsOdd(&+Intseq(n, 4))]; // Vincenzo Librandi, Apr 13 2011
-
Mathematica
Select[Range[100],OddQ[Total[Take[Reverse[IntegerDigits[#,2]],{1,-1,2}]]]&] (* Harvey P. Dale, Dec 23 2012 *)
Comments