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-6 of 6 results.

A028495 Expansion of g.f. (1-x^2)/(1-x-2*x^2+x^3).

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 19, 33, 61, 108, 197, 352, 638, 1145, 2069, 3721, 6714, 12087, 21794, 39254, 70755, 127469, 229725, 413908, 745889, 1343980, 2421850, 4363921, 7863641, 14169633, 25532994, 46008619, 82904974, 149389218, 269190547, 485064009, 874055885
Offset: 0

Views

Author

Keywords

Comments

Form the graph with matrix A = [0,1,1; 1,0,0; 1,0,1] (P_3 with a loop at an extremity). Then A028495 counts closed walks of length n at the degree 3 vertex. - Paul Barry, Oct 02 2004
Equals INVERT transform of (1, 1, 0, 1, 0, 1, 0, 1, ...). - Gary W. Adamson, Apr 28 2009
From Johannes W. Meijer, May 29 2010: (Start)
a(n) is the number of ways White can force checkmate in exactly (n+1) moves, n>=0, ignoring the fifty-move and the triple repetition rules, in the following chess position: White Ka1, Ra8, Bc1, Nb8, pawns a6, a7, b2, c6, d2, f6 and h6; Black Kc8, pawns b3, c7, d3, f7 and h7. (After Noam D. Elkies, see link; diagram 5).
Counts all paths of length n, n>=0, starting at the initial node on the path graph P_6, see the second Maple program. (End)
a(n) is the number of length n-1 binary words such that each maximal block of 1's has odd length. a(4) = 6 because we have: 000, 001, 010, 100, 101, 111. - Geoffrey Critzer, Nov 17 2012
a(n) is the number of compositions of n where increments can only appear at every second position, starting with the second and third part, see example. Also, a(n) is the number of compositions of n where there is no fall between every second pair of parts, starting with the first and second part; see example. - Joerg Arndt, May 21 2013
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [1, 1, 0; 1, 0, 1; 0, 1, 0] or of the 3 X 3 matrix [1, 0, 1; 0, 0, 1; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
Range of row n of the circular Pascal array of order 7. - Shaun V. Ault, Jun 05 2014
a(n) is the number of compositions of n into parts from {1,2,4,6,8,10,...}. Example: a(4)= 6 because we have 4, 22, 211, 121, 112, and 1111. - Emeric Deutsch, Aug 17 2016
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=6. - Herbert Kociemba, Sep 15 2020
a(n-1) is the number of triangular dcc-polyominoes having area n (see Baril et al. at page 11). - Stefano Spezia, Oct 14 2023
a(n) is the number of permutations p of [n] with p(j)Alois P. Heinz, Mar 29 2024

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 19*x^6 + 33*x^7 + 61*x^8 + ...
From _Joerg Arndt_, May 21 2013: (Start)
There are a(6)=19 compositions of 6 where increments can only appear at every second position:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 2 1 1 ]
  04:  [ 1 1 2 2 ]
  05:  [ 1 1 3 1 ]
  06:  [ 1 1 4 ]
  07:  [ 2 1 1 1 1 ]
  08:  [ 2 1 2 1 ]
  09:  [ 2 1 3 ]
  10:  [ 2 2 1 1 ]
  11:  [ 2 2 2 ]
  12:  [ 3 1 1 1 ]
  13:  [ 3 1 2 ]
  14:  [ 3 2 1 ]
  15:  [ 3 3 ]
  16:  [ 4 1 1 ]
  17:  [ 4 2 ]
  18:  [ 5 1 ]
  19:  [ 6 ]
There are a(6)=19 compositions of 6 where there is no fall between every second pair of parts, starting with the first and second part:
  01:  [ 1 1 1 1 1 1 ]
  02:  [ 1 1 1 1 2 ]
  03:  [ 1 1 1 2 1 ]
  04:  [ 1 1 1 3 ]
  05:  [ 1 1 2 2 ]
  06:  [ 1 1 4 ]
  07:  [ 1 2 1 1 1 ]
  08:  [ 1 2 1 2 ]
  09:  [ 1 2 3 ]
  10:  [ 1 3 1 1 ]
  11:  [ 1 3 2 ]
  12:  [ 1 4 1 ]
  13:  [ 1 5 ]
  14:  [ 2 2 1 1 ]
  15:  [ 2 2 2 ]
  16:  [ 2 3 1 ]
  17:  [ 2 4 ]
  18:  [ 3 3 ]
  19:  [ 6 ]
(End)
19 = (1, 0, 1, 0, 1, 1) dot (1, 1, 2, 3, 6, 10) = (1 + 0 + 2 + 0 + 6 + 10). Cf. comment of Apr 28 2009. - _Gary W. Adamson_, Aug 10 2016
		

Crossrefs

Programs

  • Maple
    spec := [S,{S=Sequence(Union(Prod(Sequence(Prod(Z,Z)),Z,Z),Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    with(GraphTheory): P:=6: G:= PathGraph(P): A:=AdjacencyMatrix(G): nmax:=34; 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
    a := (-1)^(3/7) - (-1)^(4/7):
    b := (-1)^(5/7) - (-1)^(2/7):
    c := (-1)^(1/7) - (-1)^(6/7):
    f := n -> (a^n * (2 + a) + b^n * (2 + b) + c^n * (2 + c))/7:
    seq(simplify(f(n)), n=0..36); # Peter Luschny, Sep 16 2020
  • Mathematica
    LinearRecurrence[{1, 2, -1}, {1, 1, 2}, 60] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
    CoefficientList[Series[(1-x^2)/(1-x-2x^2+x^3),{x,0,40}],x] (* Harvey P. Dale, Dec 23 2018 *)
    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,6],{n,0,40}]//Round (* Herbert Kociemba, Sep 15 2020 *) (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    {a(n) = if( n<0, n = -1-n; polcoeff( (1 - x^2) / (1 - 2*x - x^2 + x^3) + x * O(x^n), n), polcoeff( (1 - x^2) / (1 - x - 2*x^2 + x^3) + x * O(x^n), n))} /* Michael Somos, Apr 05 2012 */
    
  • PARI
    a(n)=([0,1,0;0,0,1;-1,2,1]^n*[1;1;2])[1,1] \\ Charles R Greathouse IV, Aug 25 2016

Formula

Recurrence: {a(0)=1, a(1)=1, a(2)=2, a(n)-2*a(n+1)-a(n+2)+a(n+3)=0}.
a(n) = Sum_(1/7*(1+2*_alpha)*_alpha^(-1-n), _alpha=RootOf(_Z^3-2*_Z^2-_Z+1)).
a(n) = A094718(6, n). - N. J. A. Sloane, Jun 12 2004
a(n) = a(n-1) + Sum_{k=1..floor(n/2)} a(n-2*k). - Floor van Lamoen, Oct 29 2005
a(n) = 5*a(n-2) - 6*a(n-4) + a(n-6). - Floor van Lamoen, Nov 02 2005
a(n) = A006053(n+2) - A006053(n). - R. J. Mathar, Nov 16 2007
a(2*n) = A052975(n), a(2*n+1) = A060557(n). - Johannes W. Meijer, May 29 2010
G.f.: 1 / (1 - x / (1 - x / (1 + x / (1 + x / (1 - x))))). - Michael Somos, Apr 05 2012
a(-1 - n) = A052534(n). - Michael Somos, Apr 05 2012
a(n) = (2^n/7)*Sum_{r=1..6} (1-(-1)^r)*cos(Pi*r/7)^n*(1+cos(Pi*r/7)). - Herbert Kociemba, Sep 15 2020

Extensions

More terms from James Sellers, Jun 05 2000

A005021 Random walks (binomial transform of A006054).

Original entry on oeis.org

1, 5, 19, 66, 221, 728, 2380, 7753, 25213, 81927, 266110, 864201, 2806272, 9112264, 29587889, 96072133, 311945595, 1012883066, 3288813893, 10678716664, 34673583028, 112584429049, 365559363741, 1186963827439, 3854047383798, 12514013318097, 40632746115136
Offset: 0

Views

Author

Keywords

Comments

Number of walks of length 2n+5 in the path graph P_6 from one end to the other one. Example: a(1)=5 because in the path ABCDEF we have ABABCDEF, ABCBCDEF, ABCDCDEF, ABCDEDEF and ABCDEFEF. - Emeric Deutsch, Apr 02 2004
Since a(n) is the binomial transform of A006054 from formula (3.63) in the Witula-Slota-Warzynski paper, it follows that a(n)=A(n;1)*(B(n;-1)-C(n;-1))-B(n;1)*B(n;-1)+C(n;1)*(A(n;-1)-B(n;-1)+C(n;-1)), where A(n;1)=A077998(n), B(n;1)=A006054(n+1), C(n;1)=A006054(n), A(n;-1)=A121449(n), B(n+1;-1)=-A085810(n+1), C(n;-1)=A215404(n) and A(n;d), B(n;d), C(n;d), n in N, d in C, denote the quasi-Fibonacci numbers defined and discussed in comments in A121449 and in the cited paper. - Roman Witula, Aug 09 2012
From Wolfdieter Lang, Mar 30 2020: (Start)
With offset -4 this sequence 6, 1, 0, 0, 1, 5, ... appears in the formula for the n-th power of the 3 X 3 tridiagonal Matrix M_3 = Matrix([1,1,0], [1,2,1], [0,1,2]) from A332602: (M_3)^n = a(n-2)*(M_3)^2 - (6*a(n-3) - a(n-4))*M_3 + a(n-3)*1_3, with the 3 X 3 unit matrix 1_3, for n >= 0. Proof from Cayley-Hamilton: (M_3)^n = 5*(M_3)^3 - 6*M_3 + 1_3 (see A332602 for the characteristic polynomial Phi(3, x)), and the recurrence (M_3)^n = M_3*(M_3)^(n-1). For (M_3)^n[1,1] = 2*a(n-2) - 5*a(n-3) + a(n-4), for n >= 0, see A080937(n).
The formula for a(n) in terms of r = rho(7) = A160389 given below shows that a(n)/a(n-1) converges to rho(7)^2 = A116425 = 3.2469796... for n -> infinity. This is because r - 2/r = 0.692..., and r - 1 - 1/r = 0.137... .
(End)

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 3rd ed, Wiley, New York, 1968, p. 96.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Double partial sums of A060557. Bisection of A052547.

Programs

  • Magma
    I:=[1,5,19]; [n le 3 select I[n] else 5*Self(n-1)-6*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
    
  • Maple
    a:=k->sum(binomial(5+2*k,7*j+k-2),j=ceil((2-k)/7)..floor((7+k)/7))-sum(binomial(5+2*k,7*j+k-1),j=ceil((1-k)/7)..floor((6+k)/7)): seq(a(k),k=0..25);
    A005021:=-(z-1)*(z-5)/(-1+5*z-6*z**2+z**3); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence apart from the initial 1
  • Mathematica
    LinearRecurrence[{5,-6,1}, {1,5,19}, 50] (* Roman Witula, Aug 09 2012 *)
    CoefficientList[Series[1/(1 - 5 x + 6 x^2 - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 18 2015 *)
  • PARI
    x='x+O('x^30); Vec(1/(1-5*x+6*x^2-x^3)) \\ G. C. Greubel, Apr 19 2018

Formula

G.f.: 1/(1-5x+6x^2-x^3). - Emeric Deutsch, Apr 02 2004
a(n) = 5*a(n-1) -6*a(n-2) +a(n-3). - Emeric Deutsch, Apr 02 2004
a(n) = Sum_{j=-infinity..infinity} (binomial(5+2*k, 7*j+k-2) - binomial(5+2*k, 7*j+k-1)) (a finite sum).
a(n-2) = 2^n*C(n;1/2)=(1/7)*((c(2)-c(4))*(c(4))^(2n) + (c(4)-c(1))*(c(1))^(2n) + (c(1)-c(2))*(c(2))^(2n)), where a(-2)=a(-1):=0, c(j):=2*cos(2Pi*j/7). This formula follows from the Binet formula for C(n;d)--one of the quasi-Fibonacci numbers (see comments in A121449 and the formula (3.17) in the Witula-Slota-Warzynski paper). - Roman Witula, Aug 09 2012
In terms of the algebraic number r = rho(7) = 2*cos(Pi/7) = A160389 of degree 3 the preceding formula gives a(n) = r^(2*(n+2))*(A1(r) + A2(r)*(r - 2/r)^(2*(n+1)) = A3(r)*(r - 1 - 1/r)^(2*(n+1)))/7, for n >= -4 (see a comment above for this offset), with A1(r) = -r^2 + 2*r + 1, A2(r) = -r^2 - r + 2, and A3(r) = 2*r^2 - r - 3. - Wolfdieter Lang, Mar 30 2020

Extensions

a(25)-a(26) from Vincenzo Librandi, Sep 18 2015

A052975 Expansion of (1-2*x)*(1-x)/(1-5*x+6*x^2-x^3).

Original entry on oeis.org

1, 2, 6, 19, 61, 197, 638, 2069, 6714, 21794, 70755, 229725, 745889, 2421850, 7863641, 25532994, 82904974, 269190547, 874055885, 2838041117, 9215060822, 29921113293, 97153242650, 315454594314, 1024274628963, 3325798821581, 10798800928441, 35063486341682
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    I:=[1,2,6]; [n le 3 select I[n] else 5*Self(n-1)-6*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 18 2015
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Sequence(Prod(Sequence(Z),Z)),Sequence(Z)),Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    with(GraphTheory):G:=PathGraph(6): A:= AdjacencyMatrix(G): nmax:=25; n2:=2*nmax+1: for n from 0 to n2 do B(n):=A^n; a(n):=add(B(n)[k,1],k=1..5); od: seq(a(2*n),n=0..nmax); # Johannes W. Meijer, May 29 2010
  • Mathematica
    LinearRecurrence[{5,-6,1}, {1,2,6}, 50] (* Roman Witula, Aug 09 2012 *)
    CoefficientList[Series[(1 - 2 x) (1 - x)/(1 - 5 x + 6 x^2 - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 18 2015 *)
  • PARI
    x='x+O('x^30); Vec((1-2*x)*(1-x)/(1-5*x+6*x^2-x^3)) \\ G. C. Greubel, Apr 19 2018

Formula

G.f.: (1-2*x)*(1-x)/(1-5*x+6*x^2-x^3).
a(n) = A028495(2*n). - Floor van Lamoen, Nov 02 2005
a(n) = Sum (1/7*(2-3*_alpha+_alpha^2)*_alpha^(-1-n), _alpha=RootOf(-1+5*_Z-6*_Z^2+_Z^3))
From Herbert Kociemba, Jun 11 2004: (Start)
a(n) = (2/7)*Sum_{r=1..6} sin(r*3*Pi/7)^2*(2*cos(r*Pi/7))^(2*n).
a(n) = 5*a(n-1) - 6*a(n-2) + a(n-3). (End)
a(n) = 2^n*A(n;1/2) = (1/7)*(s(2)^2*c(4)^(2n) + s(4)^2*c(1)^(2n) + s(1)^2*c(2)^(2n)), where c(j):=2*cos(2Pi*j/7) and s(j):=2*sin(2*Pi*j/7). Here A(n;d), n in N, d in C denotes the respective quasi-Fibonacci number - see A121449 and Witula-Slota-Warzynski paper for details (see also A094789, A085810, A077998, A006054, A121442). I note that my and the respective Herbert Kociemba's formulas are "compatible". - Roman Witula, Aug 09 2012
a(n) = A005021(n)-3*A005021(n-1)+2*A005021(n-2). - R. J. Mathar, Feb 27 2019

A222345 T(n,k)=Number of length (n+k)X1 arrays of occupancy after each element moves up to +-k places including 0.

Original entry on oeis.org

3, 10, 8, 35, 33, 21, 126, 124, 108, 55, 462, 460, 440, 352, 144, 1716, 1714, 1690, 1560, 1145, 377, 6435, 6433, 6405, 6225, 5525, 3721, 987, 24310, 24308, 24276, 24038, 22950, 19551, 12087, 2584, 92378, 92376, 92340, 92036, 90440, 84626, 69142, 39254
Offset: 1

Views

Author

R. H. Hardin Feb 16 2013

Keywords

Comments

Table starts
.....3.....10.....35.....126.....462....1716....6435...24310...92378..352716
.....8.....33....124.....460....1714....6433...24308...92376..352714.1352076
....21....108....440....1690....6405...24276...92340..352674.1352032
....55....352...1560....6225...24038...92036..352296.1351572
...144...1145...5525...22950...90440..350056.1348536
...377...3721..19551...84626..340746.1334368
...987..12087..69142..312019.1284780
..2584..39254.244419.1150208
..6765.127469.863788
.17711.413908
.46368

Examples

			Some solutions for n=3 k=4
..0....0....2....0....0....1....0....0....0....0....2....1....0....1....2....0
..1....1....1....2....1....1....0....0....1....3....0....1....0....0....0....3
..3....2....0....1....1....1....4....7....0....1....0....0....1....3....0....2
..0....1....1....0....4....0....0....0....2....0....1....0....0....0....1....0
..0....0....3....0....1....2....0....0....0....1....0....1....6....0....4....1
..0....3....0....4....0....0....0....0....2....0....3....4....0....1....0....0
..3....0....0....0....0....2....3....0....2....2....1....0....0....2....0....1
		

Crossrefs

Column 1 is A001906(n+1)
Column 2 is A060557(n+1)
Column 3 is A094855(n+2)
Row 1 is A001700

A216201 Square array T, read by antidiagonals : T(n,k) = 0 if n-k>=3 or if k-n>=4, T(2,0) = T(1,0) = T(0,0) = T(0,1) = T(0,2) = T(0,3) = 1, T(n,k) = T(n-1,k) + T(n,k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 0, 0, 4, 6, 3, 0, 0, 4, 10, 9, 0, 0, 0, 0, 14, 19, 9, 0, 0, 0, 0, 14, 33, 28, 0, 0, 0, 0, 0, 0, 47, 61, 28, 0, 0, 0, 0, 0, 0, 47, 108, 89, 0, 0, 0, 0, 0, 0, 0, 0, 155, 197, 89, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 12 2013

Keywords

Examples

			Square array begins:
1, 1, 1,  1,  0,   0,   0,   0,   0,   0, 0, 0, 0, ... row n = 0
1, 2, 3,  4,  4,   0,   0,   0,   0,   0, 0, 0, 0, ... row n = 1
1, 3, 6, 10, 14,  14,   0,   0,   0,   0, 0, 0, 0, ... row n = 2
0, 3, 9, 19, 33,  47,  47,   0,   0,   0, 0, 0, 0, ... row n = 3
0, 0, 9, 28, 61, 108, 155, 155,   0,   0, 0, 0, 0, ... row n = 4
0, 0, 0, 28, 89, 197, 352, 507, 507,   0, 0, 0, 0, ... row n = 5
0, 0, 0,  0, 89, 286, 638,1147,1652,1652, 0, 0, 0, ... row n = 6
...
		

References

  • E. Lucas, Théorie des nombres, Tome 1, Albert Blanchard, Paris, 1958, p.89

Crossrefs

Formula

T(n,n) = A052975(n).
T(n,n+1) = A060557(n).
T(n+1,n) = T(n+2,n) = A094790(n+1).
T(n,n+2) = T(n,n+3) = A094789(n+1).
Sum_{k, 0<=k<=n} T(n-k,k) = (-1)^n*A078038(n).

A060556 Bisection of triangle A060098: odd-indexed members of column sequences of A060098 (not counting leading zeros).

Original entry on oeis.org

1, 1, 2, 1, 6, 3, 1, 12, 16, 4, 1, 20, 50, 32, 5, 1, 30, 120, 140, 55, 6, 1, 42, 245, 448, 316, 86, 7, 1, 56, 448, 1176, 1284, 622, 126, 8, 1, 72, 756, 2688, 4170, 3102, 1113, 176, 9, 1, 90, 1200, 5544, 11550, 12122
Offset: 0

Views

Author

Wolfdieter Lang, Apr 06 2001

Keywords

Comments

Row sums give A060557. Column sequences without leading zeros give for m=0..5: A000012 (powers of 1), A002378 = 2*A000217, A004320, 4*A040977, A060558, 2*A060559.
Companion triangle (even-indexed members) A060102.
With offset 1 for n and k, T(n,k) is the number of (1-2-3)-avoiding trapezoidal words of length n that contain n+1-k 1s. A trapezoidal word (following Riordan) is a sequence (a_1,a_2,...,a_n) of integers with 1 <= a_i <= 2i-1. For example, T(3,3)=3 counts 122, 132, 133 and T(4,2)=12 counts 1112, 1113, 1114, 1115, 1116, 1117, 1121, 1131, 1141, 1151, 1211, 1311. - David Callan, Aug 25 2009

Examples

			{1}; {1,2}; {1,6,3}; {1,12,16,4}; ...; Po(3,x) = 3 + x.
		

Formula

a(n, m)= A060098(2*n+1-m, m).
G.f. for column m: (x^m)*Po(m+1, x)/(1-x)^(2*m+1), with Po(n, x) = Sum_{j=0..floor(n/2)} binomial(n, 2*j+1)*x^j (odd members of row n of Pascal triangle A007318).
a(n, m) = Sum_{j=0..floor((m+1)/2)} binomial(n-j+m, 2*m)*binomial(m+1, 2*j+1), n >= m >= 0, otherwise zero.
Showing 1-6 of 6 results.