login
A102389
An evil count.
2
1, 0, 0, 2, 0, 3, 4, 0, 0, 5, 6, 0, 7, 0, 0, 8, 0, 9, 10, 0, 11, 0, 0, 12, 13, 0, 0, 14, 0, 15, 16, 0, 0, 17, 18, 0, 19, 0, 0, 20, 21, 0, 0, 22, 0, 23, 24, 0, 25, 0, 0, 26, 0, 27, 28, 0, 0, 29, 30, 0, 31, 0, 0, 32, 0, 33, 34, 0, 35, 0, 0, 36, 37, 0, 0, 38, 0, 39, 40, 0, 41, 0, 0, 42, 0, 43, 44, 0
OFFSET
0,4
COMMENTS
Counting numbers appear at positions indexed by the evil numbers A001969, 0 otherwise.
LINKS
FORMULA
a(n) = (1+floor(n/2))*(1+(-1)^A000120(n))/2.
a(n) = (1+floor(n/2))(1+(-1)^A010060(n))/2.
A008619(n) = a(n) + A102390(n).
MATHEMATICA
a[n_] := (1 + Floor[n/2])*(1 + (-1)^DigitCount[n, 2, 1])/2; Array[a, 100, 0] (* Amiram Eldar, Jul 22 2023 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paul Barry, Jan 06 2005
STATUS
approved