[go: up one dir, main page]

login
A026647
a(n) = Sum_{k=0..floor(n/2)} A026637(n-k, k).
8
1, 1, 2, 3, 6, 10, 17, 27, 45, 73, 119, 192, 312, 505, 818, 1323, 2142, 3466, 5609, 9075, 14685, 23761, 38447, 62208, 100656, 162865, 263522, 426387, 689910, 1116298, 1806209, 2922507, 4728717, 7651225, 12379943, 20031168
OFFSET
0,3
LINKS
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
KEYWORD
nonn
STATUS
approved