OFFSET
0,5
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1)
FORMULA
a(n) = floor(n/2) + floor(n/4).
G.f.: x^2*(1+2*x^2)/((1+x)*(x^2+1)*(x-1)^2). - R. J. Mathar, Mar 08 2011
a(n) = A032766(floor(n/2)). - Bruno Berselli, Mar 08 2011
a(n) = (6*n-5+2*cos(n*Pi/2)+3*cos(n*Pi)+2*sin(n*Pi/2))/8. - Wesley Ivan Hurt, Oct 02 2017
MATHEMATICA
Table[Floor[n/2]+Floor[n/4], {n, 0, 120}]
PROG
(Python)
def A187321(n): return 3*(n>>2)+bool(n&2) # Chai Wah Wu, Jan 31 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Mar 08 2011
STATUS
approved