login
A187321
a(n) = floor(n/2) + floor(n/4).
1
0, 0, 1, 1, 3, 3, 4, 4, 6, 6, 7, 7, 9, 9, 10, 10, 12, 12, 13, 13, 15, 15, 16, 16, 18, 18, 19, 19, 21, 21, 22, 22, 24, 24, 25, 25, 27, 27, 28, 28, 30, 30, 31, 31, 33, 33, 34, 34, 36, 36, 37, 37, 39, 39, 40, 40, 42, 42, 43, 43, 45, 45, 46, 46, 48, 48, 49, 49, 51, 51, 52, 52, 54
OFFSET
0,5
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
a(n) = A004526(n) + A002265(n). - Michel Marcus, Jan 31 2023
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