cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A135585 a(n) = Sum_{i=1..n} (floor(S2(i)/3) mod 2), where S2(i) = A000120(i).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Feb 25 2008

Keywords

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

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = sum(i=1, n, hammingweight(i)\3 % 2); \\ Michel Marcus, Sep 19 2015

Extensions

Definition corrected by R. J. Mathar, Apr 22 2008