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.

A036554 Numbers whose binary representation ends in an odd number of zeros.

This page as a plain text file.
%I A036554 #146 Jan 29 2025 14:24:02
%S A036554 2,6,8,10,14,18,22,24,26,30,32,34,38,40,42,46,50,54,56,58,62,66,70,72,
%T A036554 74,78,82,86,88,90,94,96,98,102,104,106,110,114,118,120,122,126,128,
%U A036554 130,134,136,138,142,146,150,152,154,158,160,162,166,168,170,174
%N A036554 Numbers whose binary representation ends in an odd number of zeros.
%C A036554 Fraenkel (2010) called these the "dopey" numbers.
%C A036554 Also n such that A035263(n)=0 or A050292(n) = A050292(n-1).
%C A036554 Indices of even numbers in A033485. - _Philippe Deléham_, Mar 16 2004
%C A036554 a(n) is an odious number (see A000069) for n odd; a(n) is an evil number (see A001969) for n even. - _Philippe Deléham_, Mar 16 2004
%C A036554 Indices of even numbers in A007913, in A001511. - _Philippe Deléham_, Mar 27 2004
%C A036554 This sequence consists of the increasing values of n such that A097357(n) is even. - _Creighton Dement_, Aug 14 2004
%C A036554 Numbers with an odd number of 2's in their prime factorization (e.g., 8 = 2*2*2). - _Mark Dow_, Sep 04 2007
%C A036554 Equals the set of natural numbers not in A003159 or A141290. - _Gary W. Adamson_, Jun 22 2008
%C A036554 Represents the set of CCW n-th moves in the standard Tower of Hanoi game; and terms in even rows of a [1, 3, 5, 7, 9, ...] * [1, 2, 4, 8, 16, ...] multiplication table. Refer to the example. - _Gary W. Adamson_, Mar 20 2010
%C A036554 Refer to the comments in A003159 relating to A000041 and A174065. - _Gary W. Adamson_, Mar 21 2010
%C A036554 If the upper s-Wythoff sequence of s is s, then s=A036554. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A036554 is the limit when the upper s-Wythoff operation is iterated.  For example, starting with s=(1,4,9,16,...) = (n^2), we obtain lower and upper s-Wythoff sequences
%C A036554   a=(1,3,4,5,6,8,9,10,11,12,14,...) = A184427;
%C A036554   b=(2,7,12,21,31,44,58,74,...) = A184428.
%C A036554   Then putting s=a and repeating the operation gives
%C A036554 b'=(2,6,8,10,13,17,20,...), which has the same first four terms as A036554. - _Clark Kimberling_, Jan 14 2011
%C A036554 Or numbers having infinitary divisor 2, or the same, having factor 2 in Fermi-Dirac representation as a product of distinct terms of A050376. - _Vladimir Shevelev_, Mar 18 2013
%C A036554 Thus, numbers not in A300841 or in A302792. Equally, sequence 2*A300841(n) sorted into ascending order. - _Antti Karttunen_, Apr 23 2018
%H A036554 T. D. Noe, <a href="/A036554/b036554.txt">Table of n, a(n) for n = 1..1000</a>
%H A036554 L. Carlitz, R. Scoville and V. E. Hoggatt, Jr., <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/10-5/carlitz3-a.pdf">Representations for a special sequence</a>, Fib. Quart., 10 (1972), 499-518, 550 (see d(n) on page 501).
%H A036554 F. Javier de Vega, <a href="https://arxiv.org/abs/2003.13378">An extension of Furstenberg's theorem of the infinitude of primes</a>, arXiv:2003.13378 [math.NT], 2020.
%H A036554 A. S. Fraenkel, <a href="http://www.wisdom.weizmann.ac.il/~fraenkel/">Home Page</a>
%H A036554 Aviezri S. Fraenkel, <a href="http://www.emis.de/journals/INTEGERS/papers/eg6/eg6.Abstract.html">New games related to old and new sequences</a>, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.
%H A036554 Aviezri S. Fraenkel, <a href="http://dx.doi.org/10.1016/j.disc.2011.03.032">The vile, dopey, evil and odious game players</a>, Discrete Math. 312 (2012), no. 1, 42-46.
%H A036554 Clark Kimberling, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Kimberling/kimberling26.html">Complementary Equations</a>, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
%H A036554 Eric Sopena, <a href="http://arxiv.org/abs/1509.04199">i-Mark: A new subtraction division game</a>, arXiv:1509.04199 [cs.DM], 2015.
%H A036554 M. Stoll, <a href="http://arxiv.org/abs/1506.04286">Chabauty without the Mordell-Weil group</a>, arXiv preprint arXiv:1506.04286 [math.NT], 2015.
%H A036554 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%F A036554 a(n) = A079523(n)+1 = A072939(n)-1.
%F A036554 a(n) = A003156(n) + n = A003157(n) - n = A003158(n) - n + 1. - _Philippe Deléham_, Apr 10 2004
%F A036554 Values of k such that A091297(k) = 2. - _Philippe Deléham_, Feb 25 2004
%F A036554 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]
%F A036554 a(n) = 2*A003159(n). - _Clark Kimberling_, Sep 30 2014
%F A036554 {a(n)} = A052330({A005408(n)}), where {a(n)} denotes the set of integers in the sequence. - _Peter Munn_, Aug 26 2019
%e A036554 From _Gary W. Adamson_, Mar 20 2010: (Start)
%e A036554 Equals terms in even numbered rows in the following multiplication table:
%e A036554 (rows are labeled 1,2,3,... as with the Towers of Hanoi disks)
%e A036554    1,  3,  5,  7,  9, 11, ...
%e A036554    2,  6, 10, 14, 18, 22, ...
%e A036554    4, 12, 20, 28, 36, 44, ...
%e A036554    8, 24, 40, 56, 72, 88, ...
%e A036554    ...
%e A036554 As shown, 2, 6, 8, 10, 14, ...; are in even numbered rows, given the row with (1, 3, 5, 7, ...) = row 1.
%e A036554 The term "5" is in an odd row, so the 5th Towers of Hanoi move is CW, moving disc #1 (in the first row).
%e A036554 a(3) = 8 in row 4, indicating that the 8th Tower of Hanoi move is CCW, moving disc #4.
%e A036554 A036554 bisects the positive nonzero natural numbers into those in the A036554 set comprising 1/3 of the total numbers, given sufficiently large n.
%e A036554 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)
%t A036554 Select[Range[200],OddQ[IntegerExponent[#,2]]&] (* _Harvey P. Dale_, Oct 19 2011 *)
%o A036554 (Haskell)
%o A036554 a036554 = (+ 1) . a079523  -- _Reinhard Zumkeller_, Mar 01 2012
%o A036554 (PARI) is(n)=valuation(n,2)%2 \\ _Charles R Greathouse IV_, Nov 20 2012
%o A036554 (Magma) [2*m:m in [1..100] | Valuation(m,2) mod 2 eq 0]; // _Marius A. Burtea_, Aug 29 2019
%o A036554 (Python)
%o A036554 def ok(n):
%o A036554   c = 0
%o A036554   while n%2 == 0: n //= 2; c += 1
%o A036554   return c%2 == 1
%o A036554 print([m for m in range(1, 175) if ok(m)]) # _Michael S. Branicky_, Feb 06 2021
%o A036554 (Python)
%o A036554 from itertools import count, islice
%o A036554 def A036554_gen(startvalue=1): return filter(lambda n:(~n & n-1).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue
%o A036554 A036554_list = list(islice(A036554_gen(),30)) # _Chai Wah Wu_, Jul 05 2022
%o A036554 (Python) is_A036554 = lambda n: A001511(n)&1==0 # _M. F. Hasler_, Nov 26 2024
%o A036554 (Python)
%o A036554 def A036554(n):
%o A036554     def bisection(f,kmin=0,kmax=1):
%o A036554         while f(kmax) > kmax: kmax <<= 1
%o A036554         kmin = kmax >> 1
%o A036554         while kmax-kmin > 1:
%o A036554             kmid = kmax+kmin>>1
%o A036554             if f(kmid) <= kmid:
%o A036554                 kmax = kmid
%o A036554             else:
%o A036554                 kmin = kmid
%o A036554         return kmax
%o A036554     def f(x):
%o A036554         c, s = n+x, bin(x)[2:]
%o A036554         l = len(s)
%o A036554         for i in range(l&1,l,2):
%o A036554             c -= int(s[i])+int('0'+s[:i],2)
%o A036554         return c
%o A036554     return bisection(f,n,n) # _Chai Wah Wu_, Jan 29 2025
%Y A036554 Indices of odd numbers in A007814. Subsequence of A036552. Complement of A003159. Also double of A003159.
%Y A036554 Cf. A000041, A003157, A003158, A005408, A052330, A072939, A079523, A096268 (characteristic function, when interpreted with offset 1), A141290, A174065, A300841.
%K A036554 nonn,base,easy,nice
%O A036554 1,1
%A A036554 _Tom Verhoeff_
%E A036554 Incorrect equation removed from formula by _Peter Munn_, Dec 04 2020