A005058 a(n) = 5^n - 3^n.
0, 2, 16, 98, 544, 2882, 14896, 75938, 384064, 1933442, 9706576, 48650978, 243609184, 1219108802, 6098732656, 30503229218, 152544843904, 762810312962, 3814309845136, 19072324066658, 95363944856224
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- M. A. Alekseyev and T. Berger, Solving the Tower of Hanoi with random moves. In: J. Beineke, J. Rosenhouse (eds.) The Mathematics of Various Entertaining Subjects: Research in Recreational Math, Princeton University Press, 2016, pp. 65-79. ISBN 978-0-691-16403-8
- Index entries for linear recurrences with constant coefficients, signature (8, -15).
Crossrefs
Cf. A005059.
Programs
-
Magma
[5^n - 3^n: n in [0..30]]; // Vincenzo Librandi, Jun 08 2013
-
Mathematica
Join[{a = 0, b = 1}, Table[c = 8*b - 15 * a; a = b; b = c, {n, 60}]] * 2 (* Vladimir Joseph Stephan Orlovsky, Jan 19 2011 *) 5^Range[0, 20] - 3^Range[0, 20] (* Harvey P. Dale, Jan 23 2011 *) CoefficientList[ Series[1/(1 - 5 x) - 1/(1 - 3 x), {x, 0, 20}], x] (* Robert G. Wilson v *) Range[0, 20]! CoefficientList[Series[Exp[5 x] - Exp[3 x], {x, 0, 20}], x] (* Robert G. Wilson v *) a[0] := 0; a[1] := 2; a[n_] := 8 a[n - 1] - 15 a[n - 2]; Table[a[n], {n, 0, 24}] (* Alonso del Arte, Jan 23 2011 *)
Formula
From Mohammad K. Azarian, Jan 14 2009: (Start)
G.f.: 1/(1-5*x) - 1/(1-3*x).
E.g.f.: e^(5*x) - e^(3*x). (End)
a(n) = 8*a(n - 1) - 15*a(n - 2) for n>1, a(0)=0, a(1)=2. - Vincenzo Librandi, Jan 24 2011
Comments