|
|
A157971
|
|
Odious twin locations: first members of pairs of consecutive odious numbers.
|
|
11
|
|
|
1, 7, 13, 21, 25, 31, 37, 41, 49, 55, 61, 69, 73, 81, 87, 93, 97, 103, 109, 117, 121, 127, 133, 137, 145, 151, 157, 161, 167, 173, 181, 185, 193, 199, 205, 213, 217, 223, 229, 233, 241, 247, 253, 261, 265, 273, 279, 285, 289, 295
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
An odious number (A000069) is a nonnegative integer with an odd number of ones in its binary expansion.
In the reference it is shown that these odious twins alternate with the evil twins (see A157970), which are pairs of consecutive evil numbers (A001969) having even numbers of ones in their binary expansions.
|
|
LINKS
|
|
|
EXAMPLE
|
The sequence of odious numbers (A000069) begins 1,2,4,7,8,11,13,14,16,19,21,..., so the first few odious twins are at 1,7,13, ... .
|
|
MATHEMATICA
|
SequencePosition[Table[If[OddQ[DigitCount[n, 2, 1]], 1, 0], {n, 300}], {1, 1}][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 05 2016 *)
|
|
PROG
|
(PARI) lista(nn) = select(n->((hammingweight(n) % 2) && (hammingweight(n+1) % 2)), vector(nn, i, i)); \\ Michel Marcus, Jul 10 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|