login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A wicked odious sequence.
2

%I #5 Aug 02 2020 02:29:18

%S 0,2,3,0,5,0,0,8,9,0,0,12,0,14,15,0,17,0,0,20,0,22,23,0,0,26,27,0,29,

%T 0,0,32,33,0,0,36,0,38,39,0,0,42,43,0,45,0,0,48,0,50,51,0,53,0,0,56,

%U 57,0,0,60,0,62,63,0,65,0,0,68,0,70,71,0,0,74,75,0,77,0,0,80,0,82,83,0,85,0

%N A wicked odious sequence.

%C Odious numbers plus one (A000069(n)+1) appear at positions indexed by the odious numbers, 0 otherwise. A000027(n) = A102393(n) + A102394(n).

%F a(n) = (n+1)(1-(-1)^A000120(n))/2.

%F a(n) = (n+1)(1-(-1)^A010060(n))/2.

%t a[n_] := If[OddQ @ DigitCount[n, 2, 1], n + 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 02 2020 *)

%Y Cf. A000027, A000069, A000120, A010060, A102392, A102393.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Jan 06 2005