[go: up one dir, main page]

login
A026625
a(n) = Sum_{k=0..floor(n/2)} A026615(n-k,k).
16
1, 1, 2, 4, 7, 13, 21, 36, 58, 96, 155, 253, 409, 664, 1074, 1740, 2815, 4557, 7373, 11932, 19306, 31240, 50547, 81789, 132337, 214128, 346466, 560596, 907063, 1467661, 2374725, 3842388, 6217114, 10059504, 16276619, 26336125, 42612745, 68948872, 111561618
OFFSET
0,3
FORMULA
For n>1, a(n) = Fibonacci(n-1) + Lucas(n) - (3 + (-1)^n)/2. - Ralf Stephan, May 13 2004
From Colin Barker, Jul 12 2017: (Start)
G.f.: (1 - x^2 + x^3 + x^4 + x^5) / ((1 - x)*(1 + x)*(1 - x - x^2)).
a(n) = 2^(-1-n)*(-5*((-2)^n + 3*2^n) - (-15+sqrt(5))*(1+sqrt(5))^n + (1-sqrt(5))^n*(15+sqrt(5))) / 5 for n>1.
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n>5.
(End)
MATHEMATICA
Join[{1, 1}, Table[Fibonacci[n-1]+LucasL[n]-(3+(-1)^n)/2, {n, 2, 40}]] (* or *) Join[{1, 1}, LinearRecurrence[{1, 2, -1, -1}, {2, 4, 7, 13}, 40]] (* Harvey P. Dale, Sep 27 2011 *)
PROG
(PARI) Vec((1 - x^2 + x^3 + x^4 + x^5) / ((1 - x)*(1 + x)*(1 - x - x^2)) + O(x^50)) \\ Colin Barker, Jul 12 2017
(Magma) [n eq 1 select 1 else 3*Fibonacci(n+1) - 2*Fibonacci(n) - (3+(-1)^n)/2: n in [0..40]]; // G. C. Greubel, Jun 16 2024
(SageMath) [3*fibonacci(n+1) -2*fibonacci(n) -(3+(-1)^n)//2 + int(n==1) for n in range(41)] # G. C. Greubel, Jun 16 2024
KEYWORD
nonn,easy
STATUS
approved