OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
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
EXAMPLE
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 + ...
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 *)
PROG
(Magma) [Floor(n/4)+Floor(n/2)+Floor(3*n/4): n in [0..90] ]; // Vincenzo Librandi, Jul 18 2011
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 08 2011
STATUS
approved