OFFSET
0,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,1,1,0,0,-1).
FORMULA
a(n) = floor(n/2) + floor(n/3) - floor(n/4).
G.f.: x^2*(1 + 2*x + 2*x^2 + x^3 + x^4) / ( (1+x)*(x^2+1)*(1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011
MATHEMATICA
Table[Floor[n/2]+Floor[n/3]-Floor[n/4], {n, 0, 120}]
PROG
(Magma) [Floor(n/2)+Floor(n/3)-Floor(n/4): n in [0..85] ]; // Vincenzo Librandi, Jul 18 2011
(Python)
def A187324(n): return (n>>2)+bool(n&2)+n//3 # Chai Wah Wu, Jan 31 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 08 2011
STATUS
approved