A129771 Evil odd numbers.
3, 5, 9, 15, 17, 23, 27, 29, 33, 39, 43, 45, 51, 53, 57, 63, 65, 71, 75, 77, 83, 85, 89, 95, 99, 101, 105, 111, 113, 119, 123, 125, 129, 135, 139, 141, 147, 149, 153, 159, 163, 165, 169, 175, 177, 183, 187, 189, 195, 197, 201, 207, 209, 215, 219, 221, 225, 231, 235
Offset: 1
Links
- Francisco J. Muñoz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Francisco J. Muñoz and Juan Carlos Nuño, Rule-based Generation of de Bruijn Sequences: Memory and Learning, arXiv:2507.09764 [cs.FL], 2025. See p. 9.
Crossrefs
Programs
-
Mathematica
Select[Range[300], OddQ[ # ] && EvenQ[DigitCount[ #, 2, 1]] &] (* Stefan Steinerberger, May 17 2007 *) Select[Range[300], EvenQ[Plus @@ IntegerDigits[ #, 2]] && OddQ[ # ] &]
-
PARI
is(n)=n%2 && hammingweight(n)%2==0 \\ Charles R Greathouse IV, Mar 21 2013
-
PARI
a(n)=4*n-if(hammingweight(n-1)%2,3,1) \\ Charles R Greathouse IV, Mar 21 2013
-
Python
def A129771(n): return (((m:=n-1)<<1)+(m.bit_count()&1^1)<<1)+1 # Chai Wah Wu, Mar 09 2023
Formula
a(n) = 2*A000069(n) + 1. a(n) is 1 plus twice odious numbers.
a(n) = A128309(n) + 1. a(n) is 1 plus odious even numbers.
a(n) = 4n + O(1). - Charles R Greathouse IV, Mar 21 2013
Extensions
More terms from Stefan Steinerberger, May 17 2007
Comments