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.

A187331 a(n) = Sum_{k=1..4} floor(k*n/4).

Original entry on oeis.org

0, 1, 4, 6, 10, 11, 14, 16, 20, 21, 24, 26, 30, 31, 34, 36, 40, 41, 44, 46, 50, 51, 54, 56, 60, 61, 64, 66, 70, 71, 74, 76, 80, 81, 84, 86, 90, 91, 94, 96, 100, 101, 104, 106, 110, 111, 114, 116, 120, 121, 124, 126, 130, 131, 134, 136, 140, 141, 144, 146, 150, 151, 154, 156, 160, 161, 164
Offset: 0

Views

Author

Clark Kimberling, Mar 08 2011

Keywords

Crossrefs

Cf. A187332 (complement), A187326 (= a(n) - n), A187333.

Programs

  • Mathematica
    t=Table[Sum[Floor[k*n/4], {k,1,4}],{n,0,200}]  (* A187331 *)
    Complement[Range[Length[t]], t]                (* A187332 *)
  • PARI
    A187331(n)=n\4+n\2+3*n\4+n \\ M. F. Hasler, Nov 21 2017

Formula

From Chai Wah Wu, Jun 07 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 4.
G.f.: x*(4*x^3 + 2*x^2 + 3*x + 1)/(x^5 - x^4 - x + 1). (End)
a(n) = n + A187326(n), where A187326(n) = [n/4] + [n/2] + [3n/4], [.] = floor. - M. F. Hasler, Nov 21 2017