login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003159 Numbers whose binary representation ends in an even number of zeros.
(Formerly M2306)
91

%I M2306 #197 Dec 18 2023 08:26:45

%S 1,3,4,5,7,9,11,12,13,15,16,17,19,20,21,23,25,27,28,29,31,33,35,36,37,

%T 39,41,43,44,45,47,48,49,51,52,53,55,57,59,60,61,63,64,65,67,68,69,71,

%U 73,75,76,77,79,80,81,83,84,85,87,89,91,92,93,95,97,99,100,101,103,105

%N Numbers whose binary representation ends in an even number of zeros.

%C Fraenkel (2010) called these the "vile" numbers.

%C Minimal with respect to property that parity of number of 1's in binary expansion alternates.

%C Minimal with respect to property that sequence is half its complement. [Corrected by _Aviezri S. Fraenkel_, Jan 29 2010]

%C If k appears then 2k does not.

%C Increasing sequence of positive integers k such that A035263(k)=1 (from paper by Allouche et al.). - _Emeric Deutsch_, Jan 15 2003

%C 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 Indices of odd numbers in A007913, in A001511. - _Philippe Deléham_, Mar 27 2004

%C Partial sums of A026465. - _Paul Barry_, Dec 09 2004

%C A121701(2*a(n)) = A121701(a(n)); A096268(a(n)-1) = 0. - _Reinhard Zumkeller_, Aug 16 2006

%C A different permutation of the same terms may be found in A141290 and the accompanying array. - _Gary W. Adamson_, Jun 14 2008

%C a(n) = n-th clockwise Tower of Hanoi move; counterclockwise if not in the sequence. - _Gary W. Adamson_, Jun 14 2008

%C Indices of terms of Thue-Morse sequence A010060 which are different from the previous term. - _Tanya Khovanova_, Jan 06 2009

%C The sequence has the following fractal property. Remove the odd numbers from the sequence, leaving 4,12,16,20,28,36,44,48,52,... Dividing these terms by 4 we get 1,3,4,5,7,9,11,12,..., which is the original sequence back again. - _Benoit Cloitre_, Apr 06 2010

%C From _Gary W. Adamson_, Mar 21 2010: (Start)

%C A conjectured identity relating to the partition sequence, A000041 as polcoeff p(x); A003159, and its characteristic function A035263: (1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, ...); and A036554 indicating n-th terms with zeros in A035263: (2, 6, 8, 10, 14, 18, 22, ...).

%C The conjecture states that p(x) = A(x) = A(x^2) when A(x) = polcoeff A174065 = the Euler transform of A035263 = 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^5)*...) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + ... and the aerated variant = the Euler transform of the complement of A035263: 1/((1-x^2)*(1-x^6)*(1-x^8)*...) = 1 + x^2 + x^4 + 2*x^6 + 3*x^8 + 4*x^10 + ....

%C (End)

%C The conjecture above was proved by Jean-Paul Allouche on Dec 21 2013. - _Gary W. Adamson_, Jan 22 2014

%C If the lower s-Wythoff sequence of s is s, then s=A003159. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A003159 is the limit when the lower 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 a=(1,3,4,5,6,8,9,10,11,12,14,...)=A184427;

%C b=(2,7,12,21,31,44,58,74,...)=A184428.

%C Then putting s=a and repeating the operation gives a'=(1,3,4,5,7,9,11,12,14,...), which has the same first eight terms as A003159. - _Clark Kimberling_, Jan 14 2011

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Lars Blomberg, <a href="/A003159/b003159.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)

%H J.-P. Allouche, <a href="http://arxiv.org/abs/1401.3727">Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence</a>, arXiv preprint arXiv:1401.3727 [math.NT], 2014.

%H J.-P. Allouche, <a href="http://dx.doi.org/10.5802/jtnb.906">Thue, Combinatorics on words, and conjectures inspired by the Thue-Morse sequence</a>, J. de Théorie des Nombres de Bordeaux, 27, no. 2 (2015), 375-388.

%H J.-P. Allouche, Andre Arnold, Jean Berstel, Srecko Brlek, William Jockusch, Simon Plouffe, and Bruce E. Sagan, <a href="http://dx.doi.org/10.1016/0012-365X(93)00147-W">A sequence related to that of Thue-Morse</a>, Discrete Math., 139 (1995), 455-461.

%H J.-P. Allouche and Jeffrey Shallit, <a href="https://cs.uwaterloo.ca/~shallit/Papers/ubiq15.pdf">The Ubiquitous Prouhet-Thue-Morse Sequence</a>, in C. Ding. T. Helleseth and H. Niederreiter, eds., Sequences and Their Applications: Proceedings of SETA '98, Springer-Verlag, 1999, pp. 1-16.

%H J.-P. Allouche, J. Shallit, and G. Skordev, <a href="http://dx.doi.org/10.1016/j.disc.2004.12.004">Self-generating sets, integers with missing blocks and substitutions</a>, Discrete Math. 292 (2005) 1-15.

%H George E. Andrews and David Newman, <a href="https://georgeandrews1.github.io/pdf/322.pdf">Binary Representations and Theta Functions</a>, 2017.

%H L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., <a href="http://www.fq.math.ca/Scanned/10-5/carlitz3-a.pdf">Representations for a special sequence</a>, Fib. Quart., 10 (1972), 499-518, 550.

%H R. Clerico, P. Fabbri, and F. Ortenzio, <a href="http://www.rudimathematici.com/archivio/226.pdf">Pericolosamente vicino a Collatz</a>, Rudi Mathematici, N. 226 (Nov 2017), p. 14 (in Italian).

%H M. Domaratzki, <a href="http://dx.doi.org/10.1007/s00236-004-0140-4">Trajectory-based codes</a>, Acta Informatica, Volume 40, Numbers 6-7 / May, 2004.

%H E. Deutsch and B. E. Sagan, <a href="https://arxiv.org/abs/math/0407326">Congruences for Catalan and Motzkin numbers and related sequences</a>, arXiv:math/0407326 [math.CO], 2004; J. Num. Theory 117 (2006), 191-215.

%H A. Dubickas, <a href="http://dx.doi.org/10.1016/j.jnt.2005.07.004">On the distance from a rational power to the nearest integer</a>, Journal of Number Theory, Volume 117, Issue 1, March 2006, pp. 222-239.

%H A. Dubickas, <a href="http://dx.doi.org/10.1016/j.disc.2006.08.001">On a sequence related to that of Thue-Morse and its applications</a>, Discrete Math. 307 (2007), no. 9-10, 1082--1093. MR2292537 (2008b:11086).

%H A. 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 A. 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 Aviezri S. Fraenkel, <a href="http://www.wisdom.weizmann.ac.il/~fraenkel/">Home Page</a>.

%H C. Kimberling, <a href="http://www.jstor.org/stable/2320962">Problem E2850</a>, Amer. Math. Monthly, 87 (1980), 671.

%H C. 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 C. Kimberling, <a href="http://dx.doi.org/10.1016/S0012-365X(03)00085-2">Affinely recursive sets and orderings of languages</a>, Discrete Math., 274 (2004), 147-160.

%H N. J. A. Sloane, <a href="/A003159/a003159.pdf">The On-Line Encyclopedia of Integer Sequences</a>, Slides of talk given at Rutgers University, Feb. 2012.

%H E. Sopena, <a href="http://arxiv.org/abs/1509.04199">i-Mark: A new subtraction division game</a>, arXiv:1509.04199 [cs.DM], 2015.

%H D. Wakeham and D. R. Wood, <a href="http://www.emis.de/journals/INTEGERS/papers/n26/n26.Abstract.html">On multiplicative Sidon sets</a>, INTEGERS, 13 (2013), #A26.

%H <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(0) = 1; for n >= 0, a(n+1) = a(n) + 1 if (a(n) + 1)/2 is not already in the sequence, = a(n) + 2 otherwise.

%F Limit_{n->oo} a(n)/n = 3/2. - _Benoit Cloitre_, Jun 13 2002

%F More precisely, a(n) = 3*n/2 + O(log n). - _Charles R Greathouse IV_, Sep 23 2012

%F a(n) = Sum_{k = 1..n} A026465(k). - _Benoit Cloitre_, May 31 2003

%F a(n+1) = (if a(n) mod 4 = 3 then A007814(a(n) + 1) mod 2 else a(n) mod 2) + a(n) + 1; a(1) = 1. - _Reinhard Zumkeller_, Aug 03 2003

%F a(A003157(n)) is even. - _Philippe Deléham_, Feb 22 2004

%F Sequence consists of numbers of the form 4^i*(2*j + 1), i>=0, j>=0. - _Jon Perry_, Jun 06 2004

%F G.f.: (1/(1-x)) * Product_{k >= 1} (1 + x^A001045(k)). - _Paul Barry_, Dec 09 2004

%F a(1) = 1, a(2) = 3, and for n >= 2 we get a(n+1) = 4 + a(n) + a(n-1) - a(a(n)-n+1) - a(a(n-1)-n+2). - _Benoit Cloitre_, Apr 08 2010

%F If A(x) is the counting function for a(n) <= x, then A(2^n) = (2^(n+1) + (-1)^n)/3. - _Vladimir Shevelev_, Apr 15 2010

%F a(n) = A121539(n) + 1. - _Reinhard Zumkeller_, Mar 01 2012

%F A003159 = { N | A007814(N) is even }. - _M. F. Hasler_, Oct 29 2013

%e 1=1, 3=11, 5=101 and 7=111 have no (0 = even) trailing zeros, 4=100 has 2 (= even) trailing zeros in the base-2 representation.

%e 2=10 and 6=110 end in one (=odd number) of trailing zeros in their base-2 representation, therefore are not terms of this sequence. - _M. F. Hasler_, Oct 29 2013

%p filter:= n -> type(padic:-ordp(n,2),even):

%p select(filter,[$1..1000]); # _Robert Israel_, Jul 07 2014

%t f[n_Integer] := Block[{k = n, c = 0}, While[ EvenQ[k], c++; k /= 2]; c]; Select[ Range[105], EvenQ[ f[ # ]] & ]

%t Select[Range[150],EvenQ[IntegerExponent[#,2]]&] (* _Harvey P. Dale_, Oct 19 2011 *)

%o (PARI) a(n)=if(n<2,n>0,n=a(n-1); until(valuation(n,2)%2==0,n++); n)

%o (PARI) is(n)=valuation(n,2)%2==0 \\ _Charles R Greathouse IV_, Sep 23 2012

%o (Haskell)

%o import Data.List (delete)

%o a003159 n = a003159_list !! (n-1)

%o a003159_list = f [1..] where f (x:xs) = x : f (delete (2*x) xs)

%o -- _Reinhard Zumkeller_, Nov 04 2011

%o (Python)

%o from itertools import count, islice

%o def A003159_gen(startvalue=1): # generator of terms >= startvalue

%o return filter(lambda n:(n&-n).bit_length()&1,count(max(startvalue,1)))

%o A003159_list = list(islice(A003159_gen(),30)) # _Chai Wah Wu_, Jul 11 2022

%Y For the actual binary numbers see A280049.

%Y Indices of even numbers in A007814.

%Y Complement of A036554, also one-half of A036554.

%Y Cf. A001285, A010060, A000041, A174065, A292118.

%K nonn,nice,easy,eigen,base

%O 1,2

%A _N. J. A. Sloane_, _Simon Plouffe_

%E Additional comments from _Michael Somos_

%E Edited by _M. F. Hasler_, Oct 29 2013

%E Incorrect formula removed by _Peter Munn_, Dec 04 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)