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.

A024175 Expansion of g.f. (x^3 - 6*x^2 + 5*x - 1)/((2*x - 1)*(2*x^2 - 4*x + 1)).

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 428, 1416, 4744, 16016, 54320, 184736, 629280, 2145600, 7319744, 24979584, 85262464, 291057920, 993641216, 3392317952, 11581727232, 39541748736, 135002491904, 460924372992, 1573688313856, 5372896120832, 18344191078400, 62630938517504
Offset: 0

Views

Author

Keywords

Comments

Number of (s(0), s(1), ..., s(2*n)) such that 0 < s(i) < 8 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2*n, s(0) = 1, s(2*n) = 1. - Herbert Kociemba, Jun 11 2004
Counts all paths of length (2*n), n >= 0, starting and ending at the initial node on the path graph P_7, see the Maple program. - Johannes W. Meijer, May 29 2010

Examples

			1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 + 132*x^6 + 428*x^7 + ...
		

Crossrefs

Programs

  • Maple
    with(GraphTheory): G:=PathGraph(7): A:= AdjacencyMatrix(G): nmax:=26; n2:=2*nmax: for n from 0 to n2 do B(n):=A^n; a(n):=B(n)[1,1]; od: seq(a(2*n),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    CoefficientList[Series[(x^3-6*x^2+5*x-1)/((2*x-1)*(2*x^2-4*x+1)),{x,0,30}],x] (* Vincenzo Librandi, May 10 2012 *)
  • PARI
    {a(n) = local(A); A = 1; for( i=1, 6, A = 1 / (1 - x*A)); polcoeff( A + x * O(x^n), n)} /* Michael Somos, May 12 2012 */

Formula

From Herbert Kociemba, Jun 11 2004: (Start)
a(n) = (1/4)*Sum_{r=1..7} sin(r*Pi/8)^2*(2*cos(r*Pi/8))^(2n), n >= 1.
a(n) = 6*a(n-1) - 10*a(n-2) + 4*a(n-3), n >= 4. (End)
a(n) = (1/4)*((2 + sqrt(2))^(n - 1) + (2 - sqrt(2))^(n - 1) + 2^n) for n >= 1. - Richard Choulet, Apr 19 2010
a(n) = 2^(n - 2) + A006012(n-1)/2, n > 0. - R. J. Mathar, Mar 14 2011
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x / (1 - x)))))). - Michael Somos, May 12 2012
E.g.f.: (1 + exp(2*x)*(1 + 2*cosh(sqrt(2)*x) - sqrt(2)*sinh(sqrt(2)*x)))/4. - Stefano Spezia, Jun 14 2023