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.

A129771 Evil odd numbers.

This page as a plain text file.
%I A129771 #66 Jul 18 2025 10:33:40
%S A129771 3,5,9,15,17,23,27,29,33,39,43,45,51,53,57,63,65,71,75,77,83,85,89,95,
%T A129771 99,101,105,111,113,119,123,125,129,135,139,141,147,149,153,159,163,
%U A129771 165,169,175,177,183,187,189,195,197,201,207,209,215,219,221,225,231,235
%N A129771 Evil odd numbers.
%C A129771 A heuristic argument suggests that, as n tends to infinity, a(n)/n converges to 4. - _Stefan Steinerberger_, May 17 2007
%C A129771 These numbers may be called primitive evil numbers because every evil number is a power of 2 multiplied by one of these numbers. Note that the difference between consecutive terms is either 2, 4, or 6. - _T. D. Noe_, Jun 06 2007
%C A129771 If m is in the sequence, then so is 2m-1 because in binary, m is x1 and 2m-1 is x01. Presumably the numbers that generate the whole sequence by application of n -> 2n-1 are the evil numbers times 4 plus 3. - _Ralf Stephan_, May 25 2013
%H A129771 Francisco J. Muñoz, <a href="/A129771/b129771.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A129771 Francisco J. Muñoz and Juan Carlos Nuño, <a href="https://arxiv.org/abs/2507.09764">Rule-based Generation of de Bruijn Sequences: Memory and Learning</a>, arXiv:2507.09764 [cs.FL], 2025. See p. 9.
%F A129771 a(n) = 2*A000069(n) + 1. a(n) is 1 plus twice odious numbers.
%F A129771 a(n) = A128309(n) + 1. a(n) is 1 plus odious even numbers.
%F A129771 A132680(a(n)) = A132680((a(n)-1)/2) + 2. - _Reinhard Zumkeller_, Aug 26 2007
%F A129771 a(n) = 4n + O(1). - _Charles R Greathouse IV_, Mar 21 2013
%F A129771 a(n) = A001969(1+A000069(n)) = A277902(A277823(n)). - _Antti Karttunen_, Nov 05 2016
%t A129771 Select[Range[300], OddQ[ # ] && EvenQ[DigitCount[ #, 2, 1]] &] (* _Stefan Steinerberger_, May 17 2007 *)
%t A129771 Select[Range[300], EvenQ[Plus @@ IntegerDigits[ #, 2]] && OddQ[ # ] &]
%o A129771 (PARI) is(n)=n%2 && hammingweight(n)%2==0 \\ _Charles R Greathouse IV_, Mar 21 2013
%o A129771 (PARI) a(n)=4*n-if(hammingweight(n-1)%2,3,1) \\ _Charles R Greathouse IV_, Mar 21 2013
%o A129771 (Python)
%o A129771 def A129771(n): return (((m:=n-1)<<1)+(m.bit_count()&1^1)<<1)+1 # _Chai Wah Wu_, Mar 09 2023
%Y A129771 Intersection of A001969 and A005408.
%Y A129771 Supersequence of A093688.
%Y A129771 Cf. A092246 (odd odious numbers).
%Y A129771 Column 2 of A277880, positions of 1's in A277808 (2's in A277822).
%Y A129771 Cf. A000069, A128309, A277823, A277902.
%K A129771 nonn,easy,base
%O A129771 1,1
%A A129771 _Tanya Khovanova_, May 16 2007
%E A129771 More terms from _Stefan Steinerberger_, May 17 2007