login
A026636
a(n) = Sum_{k=0..floor(n/2)} A026626(n-k, k).
17
1, 1, 2, 4, 6, 11, 17, 30, 47, 78, 125, 205, 330, 536, 866, 1404, 2270, 3675, 5945, 9622, 15567, 25190, 40757, 65949, 106706, 172656, 279362, 452020, 731382, 1183403, 1914785, 3098190, 5012975, 8111166, 13124141, 21235309
OFFSET
0,3
FORMULA
G.f.: (1 + x^3 - x^4 + x^5 + x^7)/((1-x^4)*(1-x-x^2)).
From G. C. Greubel, Jun 21 2024: (Start)
a(n) = (1/20)*(2*LucasL(n-1) + 70*Fibonacci(n-1) - 15*(1+(-1)^n) - 4*cos((n-1)*Pi/2) - 2*sin((n-1)*Pi/2)) - [n=0] + [n=1].
E.g.f.: (1/10)*(cos(x) - 2*sin(x) - 15*cosh(x) - 10*(1 - x) + 2*exp(x/2)*(17*cosh(sqrt(5)*x/2) - 3*sqrt(5)*sinh(sqrt(5)*x/2))). (End)
MATHEMATICA
LinearRecurrence[{1, 1, 0, 1, -1, -1}, {1, 1, 2, 4, 6, 11, 17, 30}, 41] (* G. C. Greubel, Jun 21 2024 *)
PROG
(Magma) I:=[2, 4, 6, 11, 17, 30]; [1, 1] cat [n le 6 select I[n] else Self(n-1) +Self(n-2) +Self(n-4) -Self(n-5) -Self(n-6): n in [1..50]]; // G. C. Greubel, Jun 21 2024
(SageMath)
@CachedFunction
def a(n): # a = A026636
if n<8: return (1, 1, 2, 4, 6, 11, 17, 30)[n]
else: return a(n-1) +a(n-2) +a(n-4) -a(n-5) -a(n-6)
[a(n) for n in range(41)] # G. C. Greubel, Jun 21 2024
KEYWORD
nonn
STATUS
approved