|
|
A094707
|
|
Partial sums of repeated Fibonacci sequence.
|
|
4
|
|
|
0, 0, 1, 2, 3, 4, 6, 8, 11, 14, 19, 24, 32, 40, 53, 66, 87, 108, 142, 176, 231, 286, 375, 464, 608, 752, 985, 1218, 1595, 1972, 2582, 3192, 4179, 5166, 6763, 8360, 10944, 13528, 17709, 21890, 28655, 35420, 46366, 57312, 75023, 92734, 121391, 150048, 196416
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f. : x^2*(1+x)/((1-x)*(1-x^2-x^4)).
a(n) = a(n-1) + a(n+2) - a(n-3) + a(n-4) - a(n-5).
a(n) = Sum_{k=0..n} Fibonacci(floor(k/2)).
a(n) = -2 - (sqrt(5)/2 - 1/2)^(n/2)*((2*sqrt(5)/5 - 1)*cos(Pi*n/2) + sqrt(4*sqrt(5)/5 - 8/5)*sin(Pi*n/2)) - (sqrt(5)/2 + 1/2)^(n/2)*((sqrt(sqrt(5)/5 + 2/5) - sqrt(5)/5 - 1/2)*(-1)^n - sqrt(sqrt(5)/5 + 2/5) - sqrt(5)/5-1/2).
a(n) = Fibonacci(n/2 +3) - 2 if n even, otherwise a(n) = 2*Fibonacci((n-1)/2 + 2) - 2. - G. C. Greubel, Feb 12 2023
|
|
MATHEMATICA
|
LinearRecurrence[{1, 1, -1, 1, -1}, {0, 0, 1, 2, 3}, 50] (* Jean-François Alcover, Nov 18 2017 *)
|
|
PROG
|
(Magma) [Fibonacci(Floor((n+6)/2))*((n+1) mod 2) + 2*Fibonacci(Floor((n+3)/2))*(n mod 2) - 2: n in [0..60]]; // G. C. Greubel, Feb 12 2023
(SageMath)
def A094707(n): return fibonacci((n+6)//2) - 2 if (n%2==0) else 2*fibonacci((n+3)//2) - 2
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|