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.

Previous Showing 11-20 of 28 results. Next

A055142 Expansion of e.g.f.: exp(x)*sqrt(1-2x).

Original entry on oeis.org

1, 0, -2, -8, -36, -224, -1880, -19872, -251888, -3712256, -62286624, -1171487360, -24402416192, -557542291968, -13861636770176, -372514645389824, -10759590258589440, -332386419622387712
Offset: 0

Views

Author

Christian G. Bower, May 09 2000

Keywords

Crossrefs

Column 0 of triangle A055141.

Programs

  • Mathematica
    CoefficientList[Series[E^x*Sqrt[1-2*x], {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 29 2014 *)
  • Sage
    def A055142(n):
        @CachedFunction
        def h(n):
            return (-1)^n*2*(n-2)*abs(h(n-1)+h(n-2)) if n>1 else 1
        return -(-1)^(n+1)*h(n+1)
    [A055142(n) for n in (0..17)]  # Peter Luschny, Nov 02 2012

Formula

a(n) ~ -2^(n-1/2) * n^(n-1) / exp(n-1/2). - Vaclav Kotesovec, Mar 29 2014
D-finite with recurrence: a(n) +2*(-n+1)*a(n-1) +2*(n-1)*a(n-2)=0. - R. J. Mathar, Jan 22 2020

A370366 Number A(n,k) of partitions of [k*n] into n sets of size k having no set of consecutive numbers whose maximum (if k>0) is a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 9, 8, 0, 0, 1, 0, 34, 252, 60, 0, 0, 1, 0, 125, 5672, 14337, 544, 0, 0, 1, 0, 461, 125750, 2604732, 1327104, 6040, 0, 0, 1, 0, 1715, 2857472, 488360625, 2533087904, 182407545, 79008, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2024

Keywords

Examples

			A(2,3) = 9: 124|356, 125|346, 126|345, 134|256, 135|246, 136|245, 145|236, 146|235, 156|234.
Square array A(n,k) begins:
  1, 1,   1,       1,          1,             1, ...
  0, 0,   0,       0,          0,             0, ...
  0, 0,   2,       9,         34,           125, ...
  0, 0,   8,     252,       5672,        125750, ...
  0, 0,  60,   14337,    2604732,     488360625, ...
  0, 0, 544, 1327104, 2533087904, 5192229797500, ...
		

Crossrefs

Columns k=0+1,2-3 give: A000007, A053871, A370357.
Rows n=0-2 give: A000012, A000004, A010763(n-1) for k>0.
Main diagonal gives A370367.
Antidiagonal sums give A370368.

Programs

  • Maple
    A:= proc(n, k) `if`(k=0,`if`(n=0, 1, 0), add(
          (-1)^(n-j)*binomial(n, j)*(k*j)!/(j!*k!^j), j=0..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);

Formula

A(n,k) = A060540(n,k) - A370363(n,k) for n,k >= 1.

A088992 Derangement numbers d(n,5) where d(n,k) = k(n-1)(d(n-1,k) + d(n-2,k)), with d(0,k) = 1 and d(1,k) = 0.

Original entry on oeis.org

1, 0, 5, 50, 825, 17500, 458125, 14268750, 515440625, 21188375000, 976671703125, 49893003906250, 2797832158515625, 170863509745312500, 11287987223748828125, 802119551344589843750, 61005565392625400390625, 4944614795517599218750000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 02 2003

Keywords

Comments

In general, d(n,k) is asymptotic to sqrt(2*Pi) * k^n * n^(n + 1/2) / (Gamma(1/k) * exp((n*k+1)/k) * n^((k-1)/k)), for k>0. - Vaclav Kotesovec, Oct 31 2017

Crossrefs

Formula

Inverse binomial transform of A008548. E.g.f.: exp(-x)/(1-5*x)^(1/5). - Vladeta Jovovic, Dec 17 2003
a(n) ~ Pi * sqrt(2) * n^(n-3/10) * 5^n / (sqrt(Pi) * Gamma(1/5) * exp(n + 1/5)). - Vaclav Kotesovec, Oct 31 2017
a(n) = (-1)^n * n! * Sum_{k=0..n} 5^k * binomial(-1/5,k)/(n-k)!. - Seiichi Manyama, Apr 23 2025

A165968 Number of pairings disjoint to a given pairing, and containing a given pair not in the given pairing.

Original entry on oeis.org

0, 1, 2, 10, 68, 604, 6584, 85048, 1269680, 21505552, 407414816, 8535396256, 195927013952, 4890027052480, 131842951699328, 3818743350945664, 118253903175951104, 3898687202158805248, 136339489775029813760, 5040776996774472673792
Offset: 1

Views

Author

Lewis Mammel (l_mammel(AT)att.net), Oct 02 2009

Keywords

Comments

The formula is derived by an application of the principle of inclusion and exclusion.
In reference to A053871, it is observed that the set of pairings disjoint to a given pairing can be partitioned into 2n-2 equivalent sets according to the 2n-2 pairs containing a given item. So it is seen that each term of that sequence must be divisible by 2n-2, giving the corresponding term of this sequence. However, the formula given here is derived independently.
Hankel transform of a(n+1) is A168467. Binomial transform of a(n+1) is A001147(n+1). - Paul Barry, Jan 26 2011
a(n) is a subset of the set of pairings of the first 2n integers (A001147) in another way: forbidding pairs of the form (2k,2k+1) for all k. - Olivier Gérard, Feb 08 2011

Examples

			a(1) = 0 trivially.
a(2) = 1 since there is a unique pairing disjoint to the canonical pairing, 01 23, and containing any of the 4 pairs not in the canonical pairing.
a(3) = 2 since there are 2 pairings disjoint to the canonical pairing, 01 23 45, and containing the pair 02, not in the canonical pairing: 02 14 35 and 02 15 34.
		

References

  • John Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, Chapter 3

Crossrefs

Cf. A001147, the double factorial.
Cf. also A053871.
Cf. A168467.

Programs

  • Maple
    a:= n-> add((-1)^(n-k-1)*binomial(n-1,k)*(2*(k+1))!/(2^(k+1)*(k+1)!), k=0..n-1):
    seq(a(n), n=0..20);
  • Mathematica
    a[n_] := Sum[(-1)^(n-k-2)* Binomial[n-2, k]*(2*(k+1))!/(2^(k+1)*(k+1)!) , {k, 0, n-2}]; a /@ Range[20]
    (* Jean-François Alcover, Jul 11 2011, after Maple *)
    CoefficientList[Series[-1+1/(E^x*Sqrt[1-2*x]) + Sqrt[2]*DawsonF[1/Sqrt[2]] + Sqrt[-Pi/(2*E)]*Erf[Sqrt[-1/2+x]],{x,0,20}],x]*Range[0,20]! (* Vaclav Kotesovec, Feb 04 2014 *)
  • bc
    define a(n)
    {
        auto sign, i,s;
        s=0; sign = 1;
        for ( i=0 ; i<=n-1 ; i++ ) {
            s = s + sign * ffac(n-1-i) * c( n-2, i );
            sign = sign * -1;
        }
        return s;
    }
    /* returns (2n-1)!! */
    define ffac( n )
    {
        if ( n <= 1 ) return 1;
        return  (2*n-1)* ffac(n-1);
    }
    /* returns combinations of n things taken i at a time */
    define c(n,i)
    {
        auto j,s;
        s=1;
        if ( n < 0 ) return 0;
        for ( j=0 ; j
    				

Formula

a(n) = (2n-3)!! - C(n-2,1) * (2n-5)!! + ... +/- C(n-2,n-1)*3!! -/+ 1.
a(n) = (2*n-4)*a(n-1) +(2*n-6)*a(n-2) for n>2. - Gary Detlefs, Jul 11 2010
G.f.: x/(1-2x/(1-3x/(1+x-4x/(1-5x/(1+x-6x/(1-7x/(1+x-8x/(1-... (continued fraction). - Paul Barry, Jan 26 2011
a(n) = Sum_{k=0..n-1} (-1)^(n-k-1)*C(n-1,k)*(2*(k+1))!/(2^(k+1)*(k+1)!). - Paul Barry, Jan 26 2011
Conjecture: a(n) +2*(-n+1)*a(n-1) +2*(-n+2)*a(n-2)=0. - R. J. Mathar, Nov 15 2012
G.f.: x/G(0) where G(k) = 1 - 2*x*(2*k+1) - x^2*(2*k+2)*(2*k+3)/G(k+1) (continued fraction). - Sergei N. Gladkovskii, Jan 13 2013
G.f.: Q(0)-1, where Q(k) = 1 - x*(k+1)/( x*(k+1) - (1 +x)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 21 2013
a(n) ~ 2^(n-1/2) * n^(n-1) / exp(n+1/2). - Vaclav Kotesovec, Feb 04 2014
a(n) = A053871(n)/(2n-2) for n>1.
a(n) * (2n-2) satisfies the recurrence of A053871, so Detlef's conjecture was correct. And if we rewrite Mathar's conjecture as b(n) = 2*(n-1)*b(n-1) +2*(n-2)*b(n-2) it becomes quite clear that Mathar's b(n) = a(n-1). - Sergey Kirgizov, Jun 03 2022

A289191 Number of polygonal tiles with n sides with two exits per side and n edges connecting pairs of exits, with no edges between exits on the same side and non-isomorphic under rotational symmetry.

Original entry on oeis.org

0, 2, 4, 22, 112, 1060, 11292, 149448, 2257288, 38720728, 740754220, 15648468804, 361711410384, 9081485302372, 246106843197984, 7160143986526240, 222595582448849152, 7364186944683168828, 258327454310582805036, 9577476294162996275928, 374205233351106756670120
Offset: 1

Author

Marko Riedel, Jun 27 2017

Keywords

Comments

The case n=2 is a degenerate polygon (two sides connecting two vertices). The two possibilities are when the edges cross and do not cross. Polygons start at n=3 with a triangle.
The sequence A132102 enumerates the case that edges are allowed between exits on the same side. This sequence can be enumerated in a similar manner using inclusion-exclusion on the number of sides that have their two exits connected. - Andrew Howroyd, Jan 26 2020

Crossrefs

See A053871 for tiles with no rotational symmetries being taken into account, A289269 for tiles with rotational and reflectional symmetries being taken into account, A289343 for the same statistic evaluated when n is prime.
Cf. A132102.

Programs

  • PARI
    a(n) = {sumdiv(n, d, my(m=n/d); eulerphi(d)*sum(i=0, m, (-1)^i * binomial(m, i) * sum(j=0, m-i, (d%2==0 || m-i-j==0) * binomial(2*(m-i), 2*j) * d^j * (2*j)! / (j!*2^j) )))/n} \\ Andrew Howroyd, Jan 26 2020

Extensions

Terms a(14) and beyond from Andrew Howroyd, Jan 26 2020

A064280 Number of nonequivalent solutions to the order n checkerboard problem up to reflection and rotation: place n pieces on an n X n board so there is exactly one piece in each row, column and main diagonal.

Original entry on oeis.org

1, 0, 0, 1, 4, 12, 86, 696, 6150, 61760, 673256, 8137200, 105074420, 1479237312, 22077680616, 354753059584, 6007578698408, 108500041654272, 2055204828592832, 41215470268919040, 863378484993573840, 19036646809582054400, 436944006380312366240
Offset: 1

Author

Jud McCranie, Sep 24 2001

Keywords

Comments

For even n>=4: A007016(n) = 8*A064280(n).
For even n, the diagonals do not intersect and there can be no symmetrical solutions. For odd n, a symmetrical solution will have a rook on the central square and the remaining n-1 rooks must be placed so as to avoid the main diagonals. See A292080 for information on counting non-attacking rook configurations with no rook on either main diagonal. - Andrew Howroyd, Sep 12 2017

Examples

			The 4 X 4 solution is unique, up to equivalence, with pieces at (1,1), (2,3), (3,4) and (4,2).
		

Crossrefs

A007016 gives the number of solutions including symmetrical ones.

Programs

  • Mathematica
    sf = Subfactorial;
    x[n_] := x[n] = Integrate[If[EvenQ[n], (x^2 - 4*x + 2)^(n/2), (x - 1)*(x^2 - 4*x + 2)^((n - 1)/2)]/E^x, {x, 0, Infinity}];
    F[n_ /; EvenQ[n]] := With[{m = n/2}, m*(x[2*m] - (2*m - 3)*x[2*m - 1])];
    F[n_ /; OddQ[n]] := With[{m = (n - 1)/2}, (2*m + 1)*x[2*m] + 3*m*x[2*m - 1] - 2*m*(m - 1)*x[2*m - 2]];
    d[n_] := (-1)^n HypergeometricPFQ[{1/2, -n}, {}, 2];
    R[n_] := If[OddQ[n], 0, If[n == 0, 1, (n - 1)!*2/(n/2 - 1)!]];
    a[1] = 1; a[n_] := With[{m = Quotient[n, 2]}, (F[n] + If[EvenQ[n], 0, 2^m * sf[m] + 2*R[m] + 2*d[m] + 2*Boole[m == 0]])/8];
    Array[a, 30] (* Jean-François Alcover, Sep 15 2019 *)
  • PARI
    \\ here sf is A000166, F is A007016, D is A053871, R(n) is A037224(2n).
    sf(n) = {n! * polcoeff( exp(-x + x * O(x^n)) / (1 - x), n)}
    F(n) = {my(v = vector(n)); for(n=4, length(v), v[n] = (n-1)*v[n-1] + 2*if(n%2==1, (n-1)*v[n-2], (n-2)*if(n==4,1,v[n-4]))); if(n<4, [1,0,0][n], if(n%2==0, n*(v[n] - (n-3)*v[n-1]), 2*n*v[n-1] + 3*(n-1)*v[n-2] - (n-1)*(n-3)*v[n-3])/2)}
    D(n) = {sum(k=0, n, (-1)^(n-k) * binomial(n,k) * (2*k)!/(2^k*k!))}
    R(n) = {if(n%2==1, 0, if(n==0, 1, (n-1)!*2/(n/2-1)!))}
    a(n) = {(F(n) + if(n%2==0, 0, my(m=n\2); 2^m * sf(m) + 2*R(m) + 2*D(m) + 2*(m==0)))/8} \\ Andrew Howroyd, Sep 12 2017

Formula

a(2n) = A007016(2n) / 8, a(2n+1) = (A007016(2n+1) + 2^n * A000166(n) + 2*A037224(2*n) + 2*A053871(n)) / 8 for n > 0. - Andrew Howroyd, Sep 12 2017

Extensions

a(11)-a(12) from Lars Blomberg, Jan 13 2013
Name clarified and terms a(13) and beyond from Andrew Howroyd, Sep 12 2017

A289269 Number of polygonal tiles with n sides with two exits per side and n edges connecting pairs of exits, with no edges between exits on the same side and non-isomorphic under rotational and reflectional, i.e. dihedral, symmetry.

Original entry on oeis.org

0, 2, 4, 19, 80, 638, 6054, 76692, 1137284, 19405244, 370597430, 7825459362, 180862277352, 4540781512946, 123053646087312, 3580073396748560, 111297799861936256, 3682093529146577694, 129163727524848878358, 4788738149626920381804, 187102616692953377567060
Offset: 1

Author

Marko Riedel, Jun 29 2017

Keywords

Comments

The case n=2 is a degenerate polygon (two sides connecting two vertices). The two possibilities are when the edges cross and do not cross. Polygons start at n=3 with a triangle.

Crossrefs

See A053871 for tiles with no symmetries being taken into account, A289191 for tiles with rotational symmetries only being taken into account.

Programs

  • PARI
    \\ here R(n) is A289191.
    S(n)={sum(i=0, n\2, (-1)^i * sum(j=0, (n-2*i)\2, (2*j)!/j! * if(n%2, if(j, 2*binomial(n\2, i)*binomial(n-2*i-1, 2*j-1)), binomial(n/2, i)*binomial(n-2*i, 2*j) + if(j, binomial(n/2-1, i)*binomial(n-2*i-2, 2*j-2))) / 2))}
    R(n)={sumdiv(n, d, my(m=n/d); eulerphi(d)*sum(i=0, m, (-1)^i * binomial(m, i) * sum(j=0, m-i, (d%2==0 || m-i-j==0) * binomial(2*(m-i), 2*j) * d^j * (2*j)! / (j!*2^j) )))/n}
    a(n)={(R(n) + S(n))/2} \\ Andrew Howroyd, Jan 26 2020

Extensions

Terms a(14) and beyond from Andrew Howroyd, Jan 26 2020

A054479 Number of sets of cycle graphs of 2n nodes where the 2-colored edges alternate colors.

Original entry on oeis.org

1, 0, 6, 120, 6300, 514080, 62785800, 10676746080, 2413521910800, 700039083744000, 253445583029839200, 112033456760809584000, 59382041886244720843200, 37175286835046004765120000, 27139206193305890195912400000, 22852066417535931447551359680000
Offset: 0

Author

Christian G. Bower, Mar 29 2000

Keywords

Comments

Also number of permutations in the symmetric group S_2n in which cycle lengths are even and greater than 2, cf. A130915. - Vladeta Jovovic, Aug 25 2007
a(n) is also the number of ordered pairs of disjoint perfect matchings in the complete graph on 2n vertices. The sequence A006712 is the number of ordered triples of perfect matchings. - Matt Larson, Jul 23 2016

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1, add(
          b(n-2*j)*binomial(n-1, 2*j-1)*(2*j-1)!, j=2..n/2))
        end:
    a:= n-> b(2*n):
    seq(a(n), n=0..15);  # Alois P. Heinz, Mar 06 2023
  • Mathematica
    Table[(n-1)*(2*n)!^2 * HypergeometricPFQ[{2-n},{3/2-n},-1/2] / (4^n*(n-1/2)*(n!)^2), {n, 0, 20}] (* Vaclav Kotesovec, Mar 29 2014 after Mark van Hoeij *)
  • PARI
    x='x+O('x^66); v=Vec(serlaplace(1/(sqrt(exp(x^2)*(1-x^2))))); vector(#v\2,n,v[2*n-1]) \\ Joerg Arndt, May 13 2013

Formula

If b(2n)=a(n) then e.g.f. of b is 1/(sqrt(exp(x^2)*(1-x^2))).
a(n) = 4^n*(n-1)*gamma(n+1/2)^2*hypergeom([2-n],[3/2-n],-1/2)/(Pi*(n-1/2)). - Mark van Hoeij, May 13 2013
a(n) ~ 2^(2*n+1) * n^(2*n) / exp(2*n+1/2). - Vaclav Kotesovec, Mar 29 2014

A055141 Matrix inverse of triangle A055140.

Original entry on oeis.org

1, 0, 1, -2, 0, 1, -8, -6, 0, 1, -36, -32, -12, 0, 1, -224, -180, -80, -20, 0, 1, -1880, -1344, -540, -160, -30, 0, 1, -19872, -13160, -4704, -1260, -280, -42, 0, 1, -251888, -158976, -52640, -12544, -2520, -448, -56, 0, 1, -3712256, -2266992
Offset: 0

Author

Christian G. Bower, May 09 2000

Keywords

Comments

T is an example of the group of matrices outlined in the table in A132382--the associated matrix for aC(1,1). The e.g.f. for the row polynomials is exp(x*t) * exp(x) * (1-2*x)^(1/2). T(n,k) = Binomial(n,k)* s(n-k) where s = A055142 with an e.g.f. of exp(x) * (1-2*x)^(1/2) which is the reciprocal of the e.g.f. of A053871. The row polynomials form an Appell sequence. [From Tom Copeland, Sep 11 2008]

Examples

			1; 0,1; -2,0,1; -8,-6,0,1; -36,-32,-12,0,1; ...
		

Formula

a(n, k) = A053142(n-k)*C(n, k).

A155517 Triangle read by rows: T(n,k) is the number of permutations p of {1,2,...,n} for which the number of j < ceiling(n/2) such that p(j) + p(n+1-j) = n+1 is equal to k (n>=1; 0<=k <=ceiling(n/2)).

Original entry on oeis.org

0, 1, 0, 2, 4, 0, 2, 16, 0, 8, 64, 48, 0, 8, 384, 288, 0, 48, 2880, 1536, 576, 0, 48, 23040, 12288, 4608, 0, 384, 208896, 115200, 30720, 7680, 0, 384, 2088960, 1152000, 307200, 76800, 0, 3840, 23193600, 12533760, 3456000, 614400, 115200, 0, 3840, 278323200
Offset: 1

Author

Emeric Deutsch, Jan 26 2009

Keywords

Comments

For the permutation 31756284 of S_8 we have k=2 because p(2) + p(7) = 1+8 = 9 and p(3) + p(6) = 7+2 = 9; for the permutation 3214756 of S_7 we have k=2 because p(3) + p(5) = 1+7 = 8 and p(4) + p(4) = 4+4 = 8.
Row sums are the factorial numbers (A000142).
Row n contains 1 + ceiling(n/2)entries.
T(2n,n) = n!*2^n = A037223(2n) = number of centrosymmetric permutations in S[2n];
T(2n+1,n+1) = n!*2^n = A037223(2n+1) = number of centrosymmetric permutations in S[2n+1].
T(n,0) = A155518(n).
Sum_{k=0..ceiling(n/2)} k*T(n,k) = A155519(n).

Examples

			T(4,2)=8 because we have 1234, 4231, 1324, 4321, 2143, 3142, 2413 and 3412.
Triangle starts:
    0,   1;
    0,   2;
    4,   0,   2;
   16,   0,   8;
   64,  48,   0,   8;
  384, 288,   0,  48;
		

Crossrefs

Programs

  • Maple
    g[0] := 1: g[1] := 0: for n from 2 to 20 do g[n] := (2*(n-1))*(g[n-1]+g[n-2]) end do: T := proc (n, k) if `mod`(n, 2) = 0 then 2^((1/2)*n)*factorial((1/2)*n)*g[(1/2)*n-k]*binomial((1/2)*n, k) else 2^((1/2)*n-1/2)*factorial((1/2)*n-1/2)*g[(1/2)*n+1/2-k]*binomial((1/2)*n+1/2, k) end if end proc: for n to 12 do seq(T(n, k), k = 0 .. ceil((1/2)*n)) end do;

Formula

T(2n,k) = n!*2^n*A055140(n,k);
T(2n-1,k) = (n-1)!*2^(n-1)*A055140(n,k);
here A055140(n,k) = A053871(n-k)*binomial(n,k), where g(n) = A053871(n) is defined by g(0)=1, g(1)=0, g(n) = 2(n-1)(g(n-1)+g(n-2)).
Previous Showing 11-20 of 28 results. Next