OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: (1 + x^5 + x^6)/((1-x^4)*(1-x-x^2)).
From G. C. Greubel, Jul 01 2024: (Start)
a(n) = [n=0] - (3/4) + (1/4)*(-1)^n - (1/10)*2^((1-(-1)^n)/2)*(-1)^floor((n+1)/2) + (3/5)*LucasL(n+1).
a(n) = (1/20)*( 12*LucasL(n+1) + 5*(-1)^n - 15 - 2*cos(n*Pi/2) + 4*sin(n*Pi/2) ) + [n=0].
a(n) = a(n-2) + a(n-3) + 2*a(n-4) + a(n-5) + 3, with a(0) = a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 6, a(5) = 10. (End)
MATHEMATICA
a[n_]:= a[n]= If[n<6, Binomial[n, Floor[n/2]], a[n-2] +a[n-3] +2*a[n- 4] +a[n-5] +3]; (* a = A026647 *)
Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jul 01 2024 *)
PROG
(Magma) [1] cat [n le 5 select Binomial(n, Floor(n/2)) else Self(n-2) +Self(n-3) +2*Self(n-4) +Self(n-5) +3: n in [1..40]]; // G. C. Greubel, Jul 01 2024
(SageMath)
@CachedFunction
def a(n): # a = A026647
if n<6: return binomial(n, n//2)
else: return a(n-2) + a(n-3) + 2*a(n-4) + a(n-5) + 3
[a(n) for n in range(41)] # G. C. Greubel, Jul 01 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved