login
A005058
a(n) = 5^n - 3^n.
15
0, 2, 16, 98, 544, 2882, 14896, 75938, 384064, 1933442, 9706576, 48650978, 243609184, 1219108802, 6098732656, 30503229218, 152544843904, 762810312962, 3814309845136, 19072324066658, 95363944856224
OFFSET
0,2
COMMENTS
The resistance distance between two apex nodes of the n-Hanoi graph is given by a(n)/3^n. - Pontus von Brömssen, Nov 01 2020
LINKS
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
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
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 *)
PROG
(Magma) [5^n - 3^n: n in [0..30]]; // Vincenzo Librandi, Jun 08 2013
CROSSREFS
Cf. A005059.
Sequence in context: A002699 A376844 A335349 * A082639 A207301 A207105
KEYWORD
nonn,easy
STATUS
approved