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.

A187326 a(n) = floor(n/4) + floor(n/2) + floor(3n/4).

Original entry on oeis.org

0, 0, 2, 3, 6, 6, 8, 9, 12, 12, 14, 15, 18, 18, 20, 21, 24, 24, 26, 27, 30, 30, 32, 33, 36, 36, 38, 39, 42, 42, 44, 45, 48, 48, 50, 51, 54, 54, 56, 57, 60, 60, 62, 63, 66, 66, 68, 69, 72, 72, 74, 75, 78, 78, 80, 81, 84, 84, 86, 87, 90, 90, 92, 93, 96, 96, 98, 99, 102, 102, 104, 105, 108, 108, 110, 111, 114, 114, 116, 117
Offset: 0

Views

Author

Clark Kimberling, Mar 08 2011

Keywords

Examples

			G.f. = 2*x^2 + 3*x^3 + 6*x^4 + 6*x^5 + 8*x^6 + 9*x^7 + 12*x^8 + 12*x^9 + ...
		

Crossrefs

Cf. A187333.

Programs

  • Magma
    [Floor(n/4)+Floor(n/2)+Floor(3*n/4): n in [0..90] ]; // Vincenzo Librandi, Jul 18 2011
    
  • Mathematica
    Table[Floor[n/4]+Floor[n/2]+Floor[3n/4], {n,0,120}]
    LinearRecurrence[{1,0,0,1,-1},{0,0,2,3,6},100] (* Harvey P. Dale, May 27 2016 *)
  • PARI
    {a(n) = (3*n - n%2) / 2 - (n%4!=0)}; /* Michael Somos, Feb 23 2014 */
    
  • PARI
    a(n)=n\4 + n\2 + 3*n\4 \\ Charles R Greathouse IV, Jul 19 2016

Formula

G.f.: x^2*(2+x+3*x^2) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011
a(n) = +1*a(n-1) +1*a(n-4) -1*a(n-5). - Joerg Arndt, Apr 01 2011
a(n) = (6*(n-1)+(1+(-1)^n)*(2+i^n))/4, where i=sqrt(-1). - Bruno Berselli, Mar 08 2011
a(n) = (3*n-4+gcd(4,n))/2. - Jose Eduardo Blazek, Mar 22 2014
a(n+1) = a(n)+(3+gcd(4,n+1)-gcd(4,n))/2 and a(0)=0. - Jose Eduardo Blazek, Mar 23 2014
a(n+4) = a(n) + 6. - Michael Somos, Feb 23 2014