A069959 Define C(n) by the recursion C(0) = 2*i where i^2 = -1, C(n+1) = 1/(1 + C(n)), then a(n) = 2*(-1)^n/Im(C(n)) where Im(z) denotes the imaginary part of the complex number z.
1, 5, 8, 25, 61, 164, 425, 1117, 2920, 7649, 20021, 52420, 137233, 359285, 940616, 2462569, 6447085, 16878692, 44188985, 115688269, 302875816, 792939185, 2075941733, 5434886020, 14228716321, 37251262949, 97525072520, 255323954617, 668446791325, 1750016419364
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
Programs
-
Magma
F:=Fibonacci; [F(n+1)^2 +4*F(n)^2: n in [0..40]]; // G. C. Greubel, Aug 17 2022
-
Mathematica
a[n_]:= 4Fibonacci[n]^2+Fibonacci[n+1]^2; 4#[[1]]^2+#[[2]]^2&/@Partition[Fibonacci[Range[0,30]],2,1] (* or *) LinearRecurrence[{2,2,-1},{1,5,8},30] (* Harvey P. Dale, Aug 25 2017 *)
-
PARI
a(n) = round((2^(-1-n)*(-3*(-1)^n*2^(2+n)-(3-sqrt(5))^n*(-11+sqrt(5))+(3+sqrt(5))^n*(11+sqrt(5))))/5) \\ Colin Barker, Sep 28 2016
-
PARI
Vec(-(x-1)*(4*x+1)/((x+1)*(x^2-3*x+1)) + O(x^40)) \\ Colin Barker, Sep 28 2016
-
SageMath
f=fibonacci; [f(n+1)^2+4*f(n)^2 for n in (0..40)] # G. C. Greubel, Aug 17 2022
Formula
a(n) = 4*F(n)^2 + F(n+1)^2, where F(n) = A000045(n) is the n-th Fibonacci number.
From Colin Barker, Jun 14 2013: (Start)
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: (1-x)*(1+4*x) / ((1+x)*(1-3*x+x^2)). (End)
a(n) = (2^(-1-n)*(-3*(-1)^n*2^(2+n) - (3-sqrt(5))^n*(-11+sqrt(5)) + (3+sqrt(5))^n*(11+sqrt(5))))/5. - Colin Barker, Sep 28 2016
Extensions
Edited by Dean Hickerson, May 08 2002
Comments