A099033 a(n) = Sum_{k=1..n} (-1)^A000120(3*k).
1, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 16, 17, 18, 17, 18, 19, 20, 19, 18, 17, 18, 17, 18, 19, 20, 21, 22, 23, 24, 23, 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 33, 34, 35, 34, 35, 34, 33, 32, 33, 34, 35, 34, 35, 36, 37, 38, 39, 40, 41, 42, 41, 42
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- P. J. Grabner, A note on the parity of the sum-of-digits function, Séminaire Lotharingien de Combinatoire, B30e (1993), 8 pp.
Programs
-
Mathematica
A036555 := Total /@ IntegerDigits[3 Range[1, 130], 2]; Table[Sum[ (-1)^A036555[[k]], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Jan 01 2017 *)
-
PARI
a(n) = sum(k=1, n, (-1)^hammingweight(3*k)); \\ Michel Marcus, Dec 03 2016
Extensions
Typo in name corrected by Michel Marcus, Dec 03 2016
Comments