A256278 a(0)=1, a(1)=2, a(n) = 31*a(n-1) - 29*a(n-2).
1, 2, 33, 965, 28958, 869713, 26121321, 784539274, 23563199185, 707707535789, 21255600833094, 638400107288033, 19173990901769297, 575880114843495250, 17296237823997043137, 519482849213446974997, 15602377428720941973934, 468608697663159238917041
Offset: 0
Examples
For n=3, 31*a(2)-29*a(1) = 31*(33)-29*(2) = 1023-58 = 965.
Links
- Karl V. Keller, Jr., Table of n, a(n) for n = 0..1000
- Eric Weisstein's World of Mathematics, Golden Ratio
- Eric Weisstein's World of Mathematics, Golden Ratio Conjugate
- Index entries for linear recurrences with constant coefficients, signature (31,-29).
Crossrefs
Programs
-
Magma
I:=[1,2]; [n le 2 select I[n] else 31*Self(n-1)-29*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 03 2015
-
Maple
a:= n-> (<<0|1>, <-29|31>>^n. <<1, 2>>)[1,1]: seq(a(n), n=0..23); # Alois P. Heinz, Dec 22 2023
-
Mathematica
LinearRecurrence[{31, -29}, {1, 2}, 50] (* or *) CoefficientList[Series[(1 - 29 x)/(29 x^2 - 31 x + 1), {x, 0, 33}], x] (* Vincenzo Librandi, Jun 03 2015 *)
-
Python
print(1, end=', ') print(2, end=', ') an = [1,2] for n in range(2,26): print(31*an[n-1]-29*an[n-2], end=', ') an.append(31*an[n-1]-29*an[n-2])
Formula
G.f.: (1-29*x)/(29*x^2-31*x+1). - Vincenzo Librandi, Jun 03 2015
E.g.f.: exp(31*x/2)*(65*cosh(13*sqrt(5)*x/2) - 27*sqrt(5)*sinh(13*sqrt(5)*x/2))/65. - Stefano Spezia, Aug 31 2025
Comments