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.

A194220 a(n) = floor(Sum_{k=1..n} frac(k/4)).

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 6, 7, 7, 7, 8, 9, 9, 9, 9, 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 14, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 19, 19, 19, 20, 21, 21, 21, 21, 22, 22, 22, 23, 24, 24, 24, 24, 25, 25, 25, 26, 27, 27, 27, 27, 28
Offset: 1

Views

Author

Clark Kimberling, Aug 19 2011

Keywords

Crossrefs

Cf. A194221.

Programs

  • Mathematica
    r = 1/4;
    a[n_] := Floor[Sum[FractionalPart[k*r], {k, 1, n}]]
    Table[a[n], {n, 1, 90}]    (* A194220 *)
    s[n_] := Sum[a[k], {k, 1, n}]
    Table[s[n], {n, 1, 100}]   (* A194221 *)
  • PARI
    a(n) = floor(sum(k=1, n, frac(k/4))); \\ Michel Marcus, Nov 24 2024

Formula

From Chai Wah Wu, Jun 10 2020: (Start)
a(n) = a(n-1) + a(n-8) - a(n-9) for n > 9.
G.f.: x*(x^6 + x^5 + x^2)/(x^9 - x^8 - x + 1). (End)
a(n) = floor((n+1)/4) + floor((n+2)/4) - floor((n+6)/8). - Ridouane Oudra, Nov 24 2024

Extensions

Name edited by Michel Marcus, Nov 24 2024