login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:59 EDT 2024. Contains 371963 sequences. (Running on oeis4.)