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”).

A135585
a(n) = Sum_{i=1..n} (floor(S2(i)/3) mod 2), where S2(i) = A000120(i).
2
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 4, 5, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16, 16, 17, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 41, 41, 42
OFFSET
0,12
COMMENTS
Sequence A115384 is a(n) = Sum_{i=1..n} (floor(S2(n)*1/1) mod 2) = Sum_{i=1..n} (S2(n) mod 2).
LINKS
MAPLE
A000120 := proc(n) local i ; add(i, i=convert(n, base, 2)) : end: A135585 := proc(n) add(floor(A000120(i)/3) mod 2, i=1..n) ; end: seq(A135585(n), n=0..80) ; # R. J. Mathar, Apr 22 2008
MATHEMATICA
f[n_] := n - Sum[Floor[n/2^k], {k, 1, Infinity}]; Table[Sum[Mod[Floor[f[i]/3], 2], {i, 1, n}], {n, 0, 25}] (* G. C. Greubel, Oct 20 2016 *)
PROG
(PARI) a(n) = sum(i=1, n, hammingweight(i)\3 % 2); \\ Michel Marcus, Sep 19 2015
CROSSREFS
Sequence in context: A337774 A371263 A069928 * A081094 A361674 A054633
KEYWORD
easy,nonn,base
AUTHOR
Ctibor O. Zizka, Feb 25 2008
EXTENSIONS
Definition corrected by R. J. Mathar, Apr 22 2008
STATUS
approved