A036554 Numbers whose binary representation ends in an odd number of zeros.
2, 6, 8, 10, 14, 18, 22, 24, 26, 30, 32, 34, 38, 40, 42, 46, 50, 54, 56, 58, 62, 66, 70, 72, 74, 78, 82, 86, 88, 90, 94, 96, 98, 102, 104, 106, 110, 114, 118, 120, 122, 126, 128, 130, 134, 136, 138, 142, 146, 150, 152, 154, 158, 160, 162, 166, 168, 170, 174
Offset: 1
Examples
From _Gary W. Adamson_, Mar 20 2010: (Start) Equals terms in even numbered rows in the following multiplication table: (rows are labeled 1,2,3,... as with the Towers of Hanoi disks) 1, 3, 5, 7, 9, 11, ... 2, 6, 10, 14, 18, 22, ... 4, 12, 20, 28, 36, 44, ... 8, 24, 40, 56, 72, 88, ... ... As shown, 2, 6, 8, 10, 14, ...; are in even numbered rows, given the row with (1, 3, 5, 7, ...) = row 1. The term "5" is in an odd row, so the 5th Towers of Hanoi move is CW, moving disc #1 (in the first row). a(3) = 8 in row 4, indicating that the 8th Tower of Hanoi move is CCW, moving disc #4. A036554 bisects the positive nonzero natural numbers into those in the A036554 set comprising 1/3 of the total numbers, given sufficiently large n. This corresponds to 1/3 of the TOH moves being CCW and 2/3 CW. Row 1 of the multiplication table = 1/2 of the natural numbers, row 2 = 1/4, row 3 = 1/8 and so on, or 1 = (1/2 + 1/4 + 1/8 + 1/16 + ...). Taking the odd-indexed terms of this series given offset 1, we obtain 2/3 = 1/2 + 1/8 + 1/32 + ..., while sum of the even-indexed terms is 1/3. (End)
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- L. Carlitz, R. Scoville and V. E. Hoggatt, Jr., Representations for a special sequence, Fib. Quart., 10 (1972), 499-518, 550 (see d(n) on page 501).
- F. Javier de Vega, An extension of Furstenberg's theorem of the infinitude of primes, arXiv:2003.13378 [math.NT], 2020.
- A. S. Fraenkel, Home Page
- Aviezri S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.
- Aviezri S. Fraenkel, The vile, dopey, evil and odious game players, Discrete Math. 312 (2012), no. 1, 42-46.
- Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
- Eric Sopena, i-Mark: A new subtraction division game, arXiv:1509.04199 [cs.DM], 2015.
- M. Stoll, Chabauty without the Mordell-Weil group, arXiv preprint arXiv:1506.04286 [math.NT], 2015.
- Index entries for 2-automatic sequences.
Crossrefs
Programs
-
Haskell
a036554 = (+ 1) . a079523 -- Reinhard Zumkeller, Mar 01 2012
-
Magma
[2*m:m in [1..100] | Valuation(m,2) mod 2 eq 0]; // Marius A. Burtea, Aug 29 2019
-
Mathematica
Select[Range[200],OddQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, Oct 19 2011 *)
-
PARI
is(n)=valuation(n,2)%2 \\ Charles R Greathouse IV, Nov 20 2012
-
Python
def ok(n): c = 0 while n%2 == 0: n //= 2; c += 1 return c%2 == 1 print([m for m in range(1, 175) if ok(m)]) # Michael S. Branicky, Feb 06 2021
-
Python
from itertools import count, islice def A036554_gen(startvalue=1): return filter(lambda n:(~n & n-1).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue A036554_list = list(islice(A036554_gen(),30)) # Chai Wah Wu, Jul 05 2022
-
Python
is_A036554 = lambda n: A001511(n)&1==0 # M. F. Hasler, Nov 26 2024
-
Python
def A036554(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): c, s = n+x, bin(x)[2:] l = len(s) for i in range(l&1,l,2): c -= int(s[i])+int('0'+s[:i],2) return c return bisection(f,n,n) # Chai Wah Wu, Jan 29 2025
Formula
Values of k such that A091297(k) = 2. - Philippe Deléham, Feb 25 2004
a(n) ~ 3n. - Charles R Greathouse IV, Nov 20 2012 [In fact, a(n) = 3n + O(log n). - Charles R Greathouse IV, Nov 27 2024]
a(n) = 2*A003159(n). - Clark Kimberling, Sep 30 2014
{a(n)} = A052330({A005408(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Aug 26 2019
Extensions
Incorrect equation removed from formula by Peter Munn, Dec 04 2020
Comments