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.

A001053 a(n+1) = n*a(n) + a(n-1) with a(0)=1, a(1)=0.

Original entry on oeis.org

1, 0, 1, 2, 7, 30, 157, 972, 6961, 56660, 516901, 5225670, 57999271, 701216922, 9173819257, 129134686520, 1946194117057, 31268240559432, 533506283627401, 9634381345852650, 183586751854827751, 3681369418442407670, 77492344539145388821, 1708512949279640961732
Offset: 0

Views

Author

Keywords

Comments

Denominator of continued fraction given by C(n) = [ 1; 2,3,4,...n ]. Cf. A001040. - Amarnath Murthy, May 02 2001
If initial 1 is omitted, CONTINUANT transform of 0, 1, 2, 3, 4, 5, ...
Number of deco polyominoes of height n having no 1-cell columns. A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column. Example: a(2)=1 because the vertical and horizontal dominoes are the deco polyominoes of height 2, of which only the vertical domino does not have 1-cell columns. a(n)=A121554(n,0). - Emeric Deutsch, Aug 16 2006
For positive n, a(n) equals the permanent of the n X n tridiagonal matrix with 1's along the superdiagonal and the subdiagonal, and consecutive integers from 0 to n-1 along the main diagonal (see Mathematica code below). - John M. Campbell, Jul 08 2011
Conjecture: 2*n!*a(n) is the number of open tours by a rook on an (n X 2) chessboard which starts and ends at the same line of length n. - Mikhail Kurkov, Nov 19 2019

Examples

			G.f. = 1 + x^2 + 2*x^3 + 7*x^4 + 30*x^5 + 157*x^6 + 972*x^7 + 6961*x^8 + ...
a(5) = 4*a(4) + a(3) = 4*7+2 = 30.
See A058279 and A058307 for similar recurrences and e.g.f.s. - _Wolfdieter Lang_, May 19 2010
		

References

  • Archimedeans Problems Drive, Eureka, 20 (1957), 15.
  • M. E. Larsen, Summa Summarum, A. K. Peters, Wellesley, MA, 2007; see p. 35. [From N. J. A. Sloane, Jan 29 2009]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A column of A058294.
The square roots of the terms of A144656.
See also the constant in A060997.

Programs

  • GAP
    a:=[0,1];; for n in [3..25] do a[n]:=(n-1)*a[n-1]+a[n-2]; od; Concatenation([1], a); # G. C. Greubel, Sep 20 2019
  • Haskell
    a001053 n = a001053_list !! n
    a001053_list = 1 : 0 :
       zipWith (+) a001053_list (zipWith (*) [1..] $ tail a001053_list)
    -- Reinhard Zumkeller, Nov 02 2011
    
  • Magma
    I:=[0,1]; [1] cat [n le 2 select I[n] else (n-1)*Self(n-1) + Self(n-2): n in [1..25]]; // G. C. Greubel, Sep 20 2019
    
  • Maple
    a[0]:=1: a[1]:=0: for n from 2 to 23 do a[n]:=(n-1)*a[n-1]+a[n-2] od: seq(a[n],n=0..23); # Emeric Deutsch, Aug 16 2006
  • Mathematica
    a[0]=1; a[1] =0; a[n_]:= (n-1)*a[n-1] + a[n-2]; Table[a[n], {n, 0, 21}] (* Robert G. Wilson v, Feb 24 2005 *)
    a[0] = 1; a[1] = 0; a[n_] := Permanent[SparseArray[{{i_, i_} :> i-1, Band[{2, 1}] -> 1, Band[{1, 2}] -> 1}, {n, n}]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 20}] (* John M. Campbell, Jul 08 2011, updated by Jean-François Alcover, Nov 14 2016 *)
    RecurrenceTable[{a[0]==1,a[1]==0,a[n]==(n-1)a[n-1]+a[n-2]},a,{n,30}] (* Harvey P. Dale, Jan 31 2013 *)
    a[ n_] := With[ {m = Abs@n}, If[ m < 2, Boole[m == 0],
    Gamma[m] HypergeometricPFQ[{3/2 - m/2, 1 - m/2}, {2, 2 - m, 1 - m}, 4]]]; (* Michael Somos, Nov 30 2018 *)
  • PARI
    {a(n) = contfracpnqn(vector(abs(n), i, i))[2, 2]}; /* Michael Somos, Sep 25 2005 */
    
  • Sage
    def A001053(n):
        if n < 3: return 1 if n != 1 else 0
        return gamma(n)*hypergeometric([3/2-n/2,1-n/2], [2,2-n,1-n], 4)
    [round(A001053(n).n(100)) for n in (0..23)] # Peter Luschny, Sep 11 2014
    

Formula

a(n) = a(-n). for all n in Z. - Michael Somos, Sep 25 2005
E.g.f.: -Pi*(BesselI(1,2)*BesselY(0, 2*I*sqrt(1-x)) + I*BesselY(1, 2*I)*BesselI(0, 2*sqrt(1-x))). Such e.g.f. computations were the result of an e-mail exchange with Gary Detlefs. After differentiation and putting x=0 one has to use simplifications. See the Abramowitz-Stegun handbook, p. 360, 9.1.16 and p. 375, 9.63. - Wolfdieter Lang, May 19 2010
a(n) = 2*K_1(2)*I_n(-2)+2*I_1(2)*K_n(2), where In(z) is the modified Bessel function of the first kind and Kn(x) is the modified Bessel function of the second kind. - Alexander R. Povolotsky, Jan 26 2011
Limit_{n->infinity} a(n)/(n-1)! = BesselI(1,2) = 1.590636854637329... (A096789). - Vaclav Kotesovec, Jan 05 2013, corrected Mar 02 2013
a(n+1) = Sum_{k = 0..floor((n-1)/2)} (n-2*k-1)!*binomial(n-k-1,k) * binomial(n-k,k+1). Cf. A058798. - Peter Bala, Aug 01 2013
a(n) = Gamma(n)*hypergeometric([3/2-n/2, 1-n/2], [2, 2-n, 1-n], 4) for n >= 3. - Peter Luschny, Sep 11 2014
0 = a(n)*(-a(n+2)) + a(n+1)*(a(n+1) + a(n+2) - a(n+3)) + a(n+2)*(a(n+2)) for all n in Z. - Michael Somos, Feb 09 2017
Observed: a(n) = A096789*(n-1)!*(1 + 1/(n-1) + 1/(2*(n-1)^2) + O((n-1)^-3)). - A.H.M. Smeets, Aug 19 2018

Extensions

More terms from James Sellers, Sep 19 2000

A121555 Number of 1-cell columns in all deco polyominoes of height n.

Original entry on oeis.org

1, 2, 7, 32, 178, 1164, 8748, 74304, 704016, 7362720, 84255840, 1047358080, 14054739840, 202514376960, 3118666924800, 51119166873600, 888640952371200, 16330301780889600, 316322420114534400, 6441691128993792000, 137586770616637440000, 3075566993729556480000
Offset: 1

Views

Author

Emeric Deutsch, Aug 08 2006

Keywords

Comments

A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column.
It appears that a(n) is a function of the harmonic numbers. [Gary Detlefs, Aug 13 2010]

Examples

			a(2)=2 because the deco polyominoes of height 2 are the vertical and horizontal dominoes, having, respectively, 0 and 2 columns with exactly 1 cell.
		

Crossrefs

Cf. A121554.

Programs

  • Maple
    a[1]:=1: for n from 2 to 23 do a[n]:=n*a[n-1]+(n-2)!*(n-2) od:
    seq(a[n], n = 1..23);
    # Alternative:
    a := n -> (n - 1)! * (n*harmonic(n) - (n - 1)):
    seq(a(n), n = 1..22);  # Peter Luschny, Apr 09 2024
  • Mathematica
    a[n_]:=Abs[StirlingS1[n+1,2]]-(n-1)*(n-1)!;Flatten[Table[a[n],{n,1,22}]] (* Detlef Meya, Apr 09 2024 *)

Formula

a(n) = Sum_{k=0..n} k*A121554(n, k).
a(1) = 1, a(n) = n*a(n-1)+(n-2)!*(n-2) for n >= 2.
a(n) = n!*(h(n) - (n-1)/n), where h(n) = Sum_{k=1..n} 1/k. - Gary Detlefs, Aug 13 2010
(-n+3)*a(n) + (2*n^2-7*n+4)*a(n-1) - (n-1)*(n-2)^2*a(n-2) = 0. - R. J. Mathar, Jul 15 2017
a(n) = abs(Stirling1(n + 1, 2)) - (n - 1)*(n - 1)!. - Detlef Meya, Apr 09 2024

A121637 Triangle read by rows: T(n,k) is the number of deco polyominoes of height n and having k 2-cell columns (n>=1; 0<=k<=n-1). A deco polyomino is a directed column-convex polyomino in which the height, measured along the diagonal, is attained only in the last column.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 7, 10, 6, 1, 29, 47, 33, 10, 1, 147, 265, 210, 82, 15, 1, 889, 1740, 1521, 697, 171, 21, 1, 6252, 13087, 12373, 6377, 1885, 317, 28, 1, 50163, 111066, 112016, 63261, 21390, 4407, 540, 36, 1, 452356, 1050608, 1118991, 680541, 255245, 60903, 9247, 863, 45, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 13 2006

Keywords

Comments

Row sums are the factorials (A000142). T(n,0)=A121638(n). Sum(k*T(n,k), k=0..n-1)=A121639(n)

Examples

			T(2,0)=1 and T(2,1)=1 because the deco polyominoes of height 2 are the horizontal and vertical dominoes, having, respectively, 0 and 1 2-cell columns.
Triangle starts:
   1;
   1,  1;
   2,  3,  1;
   7, 10,  6,  1;
  29, 47, 33, 10, 1;
  ...
		

References

  • E. Barcucci, A. Del Lungo and R. Pinzani, "Deco" polyominoes, permutations and random generation, Theoretical Computer Science, 159, 1996, 29-42.

Crossrefs

Programs

  • Maple
    Q[1]:=x: Q[2]:=x+t*y: for n from 3 to 11 do Q[n]:=sort(expand(subs({x=t*y,y=1/t},Q[n-1])+(x+t*y+n-3)*subs({x=1,y=1},Q[n-1]))) od: for n from 1 to 11 do P[n]:=sort(subs({x=1,y=1},Q[n])) od: for n from 1 to 11 do seq(coeff(P[n],t,j),j=0..n-1) od; # yields sequence in triangular form

Formula

The row generating polynomials are P(n,t)=Q(n,t,1,1), where Q(1,t,x,y)=x, Q(2,t,x,y)=x+ty and Q(n,t,x,y)=Q(n-1,t,ty,1/t)+(x+ty+n-3)Q(n-1,t,1,1) for n>=3.
Showing 1-3 of 3 results.