OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..8192
FORMULA
4n - 2 <= a(n) <= 4n. - Charles R Greathouse IV, Dec 29 2013
a(2n+1) = 8n + 3 = A017101(n). - Ralf Stephan, Dec 31 2013
MATHEMATICA
Plus @@@ Partition[Select[Range[125], OddQ[DigitCount[#, 2][[1]]] &], 2, 1] (* Amiram Eldar, Jul 24 2023 *)
PROG
(PARI) a(n)=4*n-hammingweight(n-1)%2-hammingweight(n)%2 \\ Charles R Greathouse IV, Dec 29 2013
CROSSREFS
Cf. A000069, A003159 (indices of odd numbers in A234011), A036554 (indices of even numbers in A234011), A131323 (odd sums of 2 successive odious or 2 successive evil numbers), A233388 (odious numbers in A234011), A234431 (sums of 2 consecutive evil numbers), A017101, A091785, A225822, A227930, A233388.
KEYWORD
nonn,easy,base
AUTHOR
Gerasimov Sergey, Dec 27 2013
EXTENSIONS
Terms recomputed and checked by Antti Karttunen, Dec 29 2013
STATUS
approved