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.
%I A079523 #87 Apr 22 2025 03:49:13 %S A079523 1,5,7,9,13,17,21,23,25,29,31,33,37,39,41,45,49,53,55,57,61,65,69,71, %T A079523 73,77,81,85,87,89,93,95,97,101,103,105,109,113,117,119,121,125,127, %U A079523 129,133,135,137,141,145,149,151,153,157,159,161,165,167,169,173,177,181 %N A079523 Utterly odd numbers: numbers whose binary representation ends in an odd number of ones. %C A079523 Also, n such that A010060(n) = A010060(n+1) where A010060 is the Thue-Morse sequence. %C A079523 Sequence of n such that a(n) = 3n begins 7, 23, 27, 29, 31, 39, 71, 87, 91, 93, 95, ... %C A079523 Values of k such that the Motzkin number A001006(2k) is even. Values of k such that the number of restricted hexagonal polyominoes with 2k+1 cells is even (see A002212). Values of k such that the number of directed animals of size k+1 is even (see A005773). Values of k such that the Riordan number A005043(k) is even. - _Emeric Deutsch_ and _Bruce E. Sagan_, Apr 02 2003 %C A079523 a(n) = A036554(n)-1 = A072939(n)-2. - _Ralf Stephan_, Jun 09 2003 %C A079523 Odious and evil terms alternate. - _Vladimir Shevelev_, Jun 22 2009 %C A079523 The sequence has the following fractal property: remove terms of the form 4k+1 from the sequence, and the remaining terms are of the form 4k+3: 7, 23, 31, 39, 55, 71, 87, ...; then subtract 3 from each of these terms and divide by 4 and you get the original sequence: 1, 5, 7, 9, 13, ... - _Benoit Cloitre_, Apr 06 2010 %C A079523 A035263(a(n)) = 0. - _Reinhard Zumkeller_, Mar 01 2012 %H A079523 Reinhard Zumkeller, <a href="/A079523/b079523.txt">Table of n, a(n) for n = 1..10000</a> %H A079523 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 A079523 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 A079523 J.-P. Allouche, A. Arnold, J. Berstel, S. Brlek, W. Jockusch, Simon Plouffe, and B. E. Sagan, <a href="http://dx.doi.org/10.1016/0012-365X(93)00147-W">A relative of the Thue-Morse sequence</a>, Discrete Math., 139, 1995, 455-461. %H A079523 Narad Rampersad and Manon Stipulanti, <a href="https://arxiv.org/abs/1807.11899">The Formal Inverse of the Period-Doubling Sequence</a>, arXiv:1807.11899 [math.CO], 2018. %H A079523 Thomas Zaslavsky, <a href="/A075326/a075326_2.pdf">Anti-Fibonacci Numbers: A Formula</a>, Sep 26 2016 [Introduces the name "utterly odd". - _N. J. A. Sloane_, Sep 27 2016] %H A079523 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>. %F A079523 a(n) is asymptotic to 3n. %F A079523 a(n) = 2*A003159(n) - 1. a(1)=1, a(n) = a(n-1) + 2 if (a(n-1)+1)/2 does not belong to the sequence and a(n) = a(n-1) + 4 otherwise. - _Emeric Deutsch_ and Bruce E. Sagan, Apr 02 2003 %F A079523 a(n) = (1/2)*A081706(2n-1). %F A079523 a(n) = A003158(n) - n = A003157(n) - n - 1. - _Philippe Deléham_, Feb 22 2004 %F A079523 Values of k such that A091297(k) = 0. - _Philippe Deléham_, Feb 25 2004 %t A079523 Select[ Range[200], MatchQ[ IntegerDigits[#, 2], {b : (1) ..} | {___, 0, b : (1) ..} /; OddQ[ Length[{b}]]] & ] (* _Jean-François Alcover_, Jun 17 2013 *) %o A079523 (Haskell) %o A079523 import Data.List (elemIndices) %o A079523 a079523 n = a079523_list !! (n-1) %o A079523 a079523_list = elemIndices 0 a035263_list %o A079523 -- _Reinhard Zumkeller_, Mar 01 2012 %o A079523 (PARI) is(n)=valuation(n+1,2)%2 \\ _Charles R Greathouse IV_, Mar 07 2013 %o A079523 (Magma) [n: n in [0..200] | Valuation(n+1, 2) mod 2 eq 0 + 1]; // _Vincenzo Librandi_, Apr 16 2015 %o A079523 (Python) %o A079523 from itertools import count, islice %o A079523 def A079523_gen(startvalue=1): return filter(lambda n:(~(n+1)&n).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue %o A079523 A079523_list = list(islice(A079523_gen(),30)) # Chai Wah Wu, Jul 05 2022 %o A079523 (Python) %o A079523 def A079523(n): %o A079523 def bisection(f,kmin=0,kmax=1): %o A079523 while f(kmax) > kmax: kmax <<= 1 %o A079523 kmin = kmax >> 1 %o A079523 while kmax-kmin > 1: %o A079523 kmid = kmax+kmin>>1 %o A079523 if f(kmid) <= kmid: %o A079523 kmax = kmid %o A079523 else: %o A079523 kmin = kmid %o A079523 return kmax %o A079523 def f(x): %o A079523 c, s = n+x, bin(x)[2:] %o A079523 l = len(s) %o A079523 for i in range(l&1,l,2): %o A079523 c -= int(s[i])+int('0'+s[:i],2) %o A079523 return c %o A079523 return bisection(f,n,n)-1 # _Chai Wah Wu_, Jan 29 2025 %Y A079523 Cf. A003159, A003157, A003158, A075326, A131323. %K A079523 nonn,base,easy %O A079523 1,2 %A A079523 _Benoit Cloitre_, Jan 21 2003