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.

Showing 1-3 of 3 results.

A178381 Number of paths of length n starting at initial node of the path graph P_9.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 125, 250, 450, 900, 1625, 3250, 5875, 11750, 21250, 42500, 76875, 153750, 278125, 556250, 1006250, 2012500, 3640625, 7281250, 13171875, 26343750, 47656250, 95312500, 172421875, 344843750
Offset: 0

Views

Author

Johannes W. Meijer, May 27 2010, May 29 2010

Keywords

Comments

Counts all paths of length n, n>=0, starting at initial node on the path graph P_9, see the Maple program.
The a(n) represent the number of possible chess games, ignoring the fifty-move and the triple repetition rules, after n moves by White in the following position: White Ka1, Nh1, pawns a2, b6, c2, d6, f2, g3 and g4; Black Ka8, Bc8, pawns a3, b7, c3, d7, f3 and g5.
The path graphs P_(2*p) have as limit(a(n+1)/a(n), n =infinity) = 2 resp. hypergeom([(p-1)/(2*p+1),(p+2)/(2*p+1)],[1/2],3/4) and the path graphs P_(2*p+1) have as limit(a(n+1)/a(n), n =infinity) = 1+cos(Pi/(p+1)), p>=1; see the crossrefs. - Johannes W. Meijer, Jul 01 2010

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 35*x^7 + 70*x^8 + ...
		

Crossrefs

This is row 9 of A094718.
a(2*n) = A147748(n) and a(2*n+1) = A081567(n).
a(4*n+2) = A109106(n) and a(4*n+3) = A179135(n).
Cf. A000007 (P_1), A000012 (P_2), A016116 (P_3), A000045 (P_4), A038754 (P_5), A028495 (P_6), A030436 (P_7), A061551 (P_8), this sequence (P_9), A336675 (P_10), A336678 (P_11), and A001405 (P_infinity).
Cf. A216212 (P_9 starting in the middle).

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+x-3*x^2-2*x^3+x^4)/(1-5*x^2+5*x^4))); // G. C. Greubel, Sep 18 2018
  • Maple
    with(GraphTheory): P:=9: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=36; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P); od: seq(a(n),n=0..nmax);
    r := j -> (-1)^(j/10) - (-1)^(1-j/10):
    a := k -> add((2 + r(j))*r(j)^k, j in [1, 3, 5, 7, 9])/10:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 18 2020
  • Mathematica
    CoefficientList[Series[(1+x-3*x^2-2*x^3+x^4)/(1-5*x^2+5*x^4), {x,0,50}], x] (* G. C. Greubel, Sep 18 2018 *)
  • PARI
    x='x+O('x^50); Vec((1+x-3*x^2-2*x^3+x^4)/(1-5*x^2+5*x^4)) \\ G. C. Greubel, Sep 18 2018
    

Formula

G.f.: (1+x-3*x^2-2*x^3+x^4)/(1-5*x^2+5*x^4).
a(n) = 5*a(n-2) - 5*a(n-4) for n>=5 with a(0)=1, a(1)=1, a(2)=2, a(3)=3 and a(4)=6.
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x / (1 - x / (1 + x / (1 + x)))))))). - Michael Somos, Feb 08 2015

A061551 Number of paths along a corridor width 8, starting from one side.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 69, 124, 241, 440, 846, 1560, 2977, 5525, 10490, 19551, 36994, 69142, 130532, 244419, 460737, 863788, 1626629, 3052100, 5743674, 10782928, 20283121, 38092457, 71632290, 134560491, 252989326, 475313762
Offset: 0

Views

Author

Henry Bottomley, May 16 2001

Keywords

Comments

Counts all paths of length n starting at initial node on the path graph P_8. - Paul Barry, May 11 2004
The a(n) represent the number of possible chess games, ignoring the fifty-move and the triple repetition rules, after n moves by White in the following position: White Ka1, pawns a2, b6, d2, d6 and g2; Black Ka8, Bc8, pawns a3, b7, d3, d7 and g3. - Johannes W. Meijer, May 29 2010
Define the 4 X 4 tridiagonal unit-primitive matrix (see [Jeffery]) M = A_{9,1} = [0,1,0,0; 1,0,1,0; 0,1,0,1; 0,0,1,1]; then a(n)=[M^n](4,4). - _L. Edson Jeffery, Mar 18 2011
a(n) is the length of n-th word derived by certain iterated substitutions on four letters {1,2,3,4} as follows. Define the substitution rules 1 -> {2}, 2 -> {1,3}, 3 -> {2,4}, 4 -> {3,4}, in which "," denotes concatenation, so 1 -> 2, 2 -> 13, 3 -> 24, 4 -> 34. Let w(k) be the k-th word formed by applying the substitution rules to each letter (digit) in word w(k-1), k>0, putting w(0) = 1. Then, for n=0,1,..., {w(n)} = {1, 2, 13, 224, 131334, 2242242434, 13133413133413342434, ...} in which {length(w(n))} = {1,1,2,3,6,10,...} = A061551. The maps 1 -> 2, etc., are given by the above matrix A_{9,1} by taking i -> {j : [A_{9,1}](i,j) <> 0}, i, j in {1,2,3,4}. Moreover, the entry in row 1 and column j of [A{9,1}]^n gives the relative frequency of the letter j in the n-th word w(n). Finally, the sum of the first-row entries of [A_{9,1}]^n again gives a(n), so obviously a(n) = sum of relative frequencies of each j in word w(n). - L. Edson Jeffery, Feb 06 2012
Range of row n of the circular Pascal array of order 9. - Shaun V. Ault, Jun 05 2014
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=8. - Herbert Kociemba, Sep 17 2020

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 20*x^6 + 35*x^7 + 69*x^8 + ....
		

Crossrefs

Narrower corridors effectively produce A000007, A000012, A016116, A000045, A038754, A028495, A030436, A061551, A178381, A336675, A336678.
An infinitely wide corridor (i.e., just one wall) would produce A001405.
Equivalently, the above mentioned corridor numbers are exactly the ranges of the circular Pascal array of order d = 2, 3, 4, 5, 6, 7, 8, respectively, and this is true for any natural number d greater than or equal to 2.
a(n) = A094718(8, n).
Cf. A030436 and A178381.

Programs

  • Maple
    a[0]:=1: a[1]:=1: a[2]:=2: a[3]:=3: a[4]:=6: a[5]:=10: a[6]:=20: a[7]:=35: for n from 8 to 33 do a[n]:=7*a[n-2]-15*a[n-4]+10*a[n-6]-a[n-8] od: seq(a[n],n=0..33); # Emeric Deutsch, Aug 14 2006
    with(GraphTheory): P:=8: G:=PathGraph(P): A:= AdjacencyMatrix(G): nmax:=33; for n from 0 to nmax do B(n):=A^n; a(n):=add(B(n)[1,k],k=1..P); od: seq(a(n),n=0..nmax); # Johannes W. Meijer, May 29 2010
    X := j -> (-1)^(j/9) - (-1)^(1-j/9):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7])/9:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    LinearRecurrence[{1,3,-2,-1},{1,1,2,3},40] (* Harvey P. Dale, Dec 19 2011 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,8],{n,0,40}]//Round (* Herbert Kociemba, Sep 17 2020 *)

Formula

a(n) = sum(b(n,i)) where b(n,0) = b(n,9) = 0, b(0,1)=1, b(0, n)=0 if n!=1 and b(n,i) = b(n-1,i) + b(n+1,i) if 0 < n < 9.
From Emeric Deutsch, Aug 14 2006: (Start)
G.f.: (1-2*x^2)/((1-x)*(1-3*x^2-x^3)).
a(n) = 7*a(n-2) - 15*a(n-4) + 10*a(n-6) - a(n-8). (End)
a(2*n) = A094854(n) and a(2*n+1) = A094855(n). - Johannes W. Meijer, May 29 2010
a(n) = a(n-1) + 3*a(n-2) - 2*a(n-3) - a(n-4), for n > 3, with {a(k)}={1,1,2,3}, k=0,1,2,3. - L. Edson Jeffery, Mar 18 2011
a(n) = A187498(3*n + 2). - L. Edson Jeffery, Mar 18 2011
a(n) = A205573(3,n). - L. Edson Jeffery, Feb 06 2012
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x / (1 - x / (1 + x))))))). - Michael Somos, Feb 08 2015
a(n) = 2^n/9*Sum_{r=1..8} (1-(-1)^r)cos(Pi*r/9)^n*(1+cos(Pi*r/9)). - Herbert Kociemba, Sep 17 2020

A336678 Number of paths of length n starting at initial node of the path graph P_11.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 461, 922, 1702, 3404, 6315, 12630, 23494, 46988, 87533, 175066, 326382, 652764, 1217483, 2434966, 4542526, 9085052, 16950573, 33901146, 63255670, 126511340, 236063915, 472127830, 880983606, 1761967212, 3287837741
Offset: 0

Views

Author

Nachum Dershowitz, Jul 30 2020

Keywords

Comments

Also the number of paths along a corridor width 11, starting from one side.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=11. - Herbert Kociemba, Sep 14 2020

Crossrefs

This is row 11 of A094718. Bisections give A087944 (even part), A087946 (odd part).
Cf. A000004 (row 0), A000007 (row 1), A000012 (row 2), A016116 (row 3), A000045 (row 4), A038754 (row 5), A028495 (row 6), A030436 (row 7), A061551 (row 8),
A178381 (row 9), A336675 (row 10), this sequence (row 11), A001405 (limit).

Programs

  • Maple
    X := j -> (-1)^(j/12) - (-1)^(1-j/12):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7, 9, 11])/12:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    LinearRecurrence[{0, 6, 0, -9, 0, 2}, {1, 1, 2, 3, 6, 10}, 40] (* Harvey P. Dale, Sep 08 2020 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,11], {n,0,40}]//Round (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    my(x='x+O('x^44)); Vec(-(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1))) \\ Joerg Arndt, Jul 31 2020

Formula

G.f.: -(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1)).
a(n) = (2^n/12)*Sum_{r=1..11} (1-(-1)^r)*cos(Pi*r/12)^n*(1+cos(Pi*r/12)). - Herbert Kociemba, Sep 14 2020
Showing 1-3 of 3 results.