|
|
A254379
|
|
Characteristic function of the even odious numbers (A128309).
|
|
4
|
|
|
0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
a(n) is also the characteristic function of A129771 (the odd evil numbers), offset by 1.
Cf. A228495 the characteristic function of the odd odious numbers (A092246).
The characteristic function of the odious numbers (A000069) is given by the Thue-Morse sequence (A010060).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
A128309 begins 2, 4, 8, hence this sequence begins 0, 0, 1, 0, 1, 0, 0, 0, 1.
|
|
MATHEMATICA
|
a[n_] := If[EvenQ[n] && OddQ[DigitCount[n, 2, 1]], 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Aug 06 2023 *)
|
|
PROG
|
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|