%I #37 Jun 26 2023 14:29:18
%S 0,2,16,98,544,2882,14896,75938,384064,1933442,9706576,48650978,
%T 243609184,1219108802,6098732656,30503229218,152544843904,
%U 762810312962,3814309845136,19072324066658,95363944856224
%N a(n) = 5^n - 3^n.
%C 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
%H Vincenzo Librandi, <a href="/A005058/b005058.txt">Table of n, a(n) for n = 0..300</a>
%H M. A. Alekseyev and T. Berger, <a href="http://arxiv.org/abs/1304.3780">Solving the Tower of Hanoi with random moves</a>. 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
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (8, -15).
%F From _Mohammad K. Azarian_, Jan 14 2009: (Start)
%F G.f.: 1/(1-5*x) - 1/(1-3*x).
%F E.g.f.: e^(5*x) - e^(3*x). (End)
%F a(n) = 8*a(n - 1) - 15*a(n - 2) for n>1, a(0)=0, a(1)=2. - _Vincenzo Librandi_, Jan 24 2011
%t 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 *)
%t 5^Range[0, 20] - 3^Range[0, 20] (* _Harvey P. Dale_, Jan 23 2011 *)
%t CoefficientList[ Series[1/(1 - 5 x) - 1/(1 - 3 x), {x, 0, 20}], x] (* _Robert G. Wilson v_ *)
%t Range[0, 20]! CoefficientList[Series[Exp[5 x] - Exp[3 x], {x, 0, 20}], x] (* _Robert G. Wilson v_ *)
%t 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 *)
%o (Magma) [5^n - 3^n: n in [0..30]]; // _Vincenzo Librandi_, Jun 08 2013
%Y Cf. A005059.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_
|