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!)
A129771 Evil odd numbers. 17
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A heuristic argument suggests that, as n tends to infinity, a(n)/n converges to 4. - Stefan Steinerberger, May 17 2007
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
A132680(a(n)) = A132680((a(n)-1)/2) + 2. - Reinhard Zumkeller, Aug 26 2007
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
LINKS
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
a(n) = A001969(1+A000069(n)) = A277902(A277823(n)). - Antti Karttunen, Nov 05 2016
MATHEMATICA
Select[Range[300], OddQ[ # ] && EvenQ[DigitCount[ #, 2, 1]] &] (* Stefan Steinerberger, May 17 2007 *)
Select[Range[300], EvenQ[Plus @@ IntegerDigits[ #, 2]] && OddQ[ # ] &]
PROG
(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
CROSSREFS
This sequence is the intersection of A001969 (Evil numbers: even number of 1's in binary expansion.) and A005408 (The odd numbers: a(n) = 2n+1.) A093688 (Numbers n such that all divisors of n, excluding the divisor 1, have an even number of 1's in their binary expansions) is a subsequence.
Cf. A092246 (odd odious numbers).
Column 2 of A277880, positions of 1's in A277808 (2's in A277822).
Sequence in context: A355898 A103578 A116649 * A209837 A093688 A143512
KEYWORD
nonn,easy
AUTHOR
Tanya Khovanova, May 16 2007
EXTENSIONS
More terms from Stefan Steinerberger, May 17 2007
STATUS
approved

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 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)