cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005058 a(n) = 5^n - 3^n.

Original entry on oeis.org

0, 2, 16, 98, 544, 2882, 14896, 75938, 384064, 1933442, 9706576, 48650978, 243609184, 1219108802, 6098732656, 30503229218, 152544843904, 762810312962, 3814309845136, 19072324066658, 95363944856224
Offset: 0

Views

Author

Keywords

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

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