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-10 of 15 results. Next

A187235 Number of ways to place n nonattacking semi-bishops on an n X n board.

Original entry on oeis.org

1, 5, 51, 769, 15345, 381065, 11323991, 391861841, 15476988033, 687029386845, 33861652925595, 1834814222811361, 108411291759763681, 6936921762461326545, 477881176664541171375, 35264213540563039871265, 2775185864375851234241985, 232010235620834821000259765, 20534530616200868936398461635
Offset: 1

Views

Author

Vaclav Kotesovec, Mar 08 2011

Keywords

Comments

Two semi-bishops do not attack each other if they are in the same NorthWest-SouthEast diagonal.
Conjecture: Number of parity preserving permutations of the set {1, 2, ..., 2n+1} with exactly n+1 cycles (see A246117). - Peter Luschny, Feb 09 2015

Crossrefs

Programs

  • Mathematica
    Table[If[n==1,1,Coefficient[Expand[Product[x+i,{i,1,n}]*Product[x+i,{i,1,n-1}],x],x,n-1]],{n,1,50}]
    Table[(-1)^n*Sum[StirlingS1[n+1,j]*StirlingS1[n,n-j+1],{j,1,n}],{n,1,50}] (* Explicit formula, Vaclav Kotesovec, Mar 24 2011 *)
  • PARI
    a(n) = {(-1)^n*sum(i=0, n, stirling(n,i,1) * stirling(n+1,n-i+1,1))} \\ Andrew Howroyd, May 09 2020

Formula

a(n)/(n-1)! ~ 0.24252191 * 4.9108149^n where the second constant is 1/(z*(1-z)) = 4.910814964..., where z=0.715331862959... is a root of the equation z=2*(z-1)*log(1-z).
For constants see A238261 and A238262. - Vaclav Kotesovec, Feb 21 2014
a(n) = (-1)^n * Sum_{i=0..n} Stirling1(n,i) * Stirling1(n+1,n-i+1). - Ryan Brooks, May 09 2020

A342111 a(n) = (-1)^n * Sum_{k=0..n} Stirling1(n,k) * Stirling1(n,n-k).

Original entry on oeis.org

1, 0, 1, 12, 193, 3980, 100805, 3034920, 105994833, 4215106728, 188097696345, 9309515255700, 506149663220641, 29989851619249236, 1923467938147053389, 132771455705186298000, 9814431285244231295265, 773520674985391641371280, 64752473306596841023424945
Offset: 0

Views

Author

Vaclav Kotesovec, Feb 28 2021

Keywords

Crossrefs

Programs

  • Magma
    [(&+[(-1)^n*StirlingFirst(n, k)*StirlingFirst(n, n-k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Jun 03 2021
    
  • Mathematica
    Table[(-1)^n*Sum[StirlingS1[n, k]*StirlingS1[n, n-k], {k, 0, n}], {n, 0, 20}]
  • PARI
    a(n) = (-1)^n*sum(k=0, n, stirling(n, k, 1)*stirling(n, n-k, 1)); \\ Michel Marcus, Feb 28 2021
    
  • Sage
    [sum( stirling_number1(n, k)*stirling_number1(n, n-k) for k in (0..n) ) for n in (0..30)] # G. C. Greubel, Jun 03 2021

Formula

a(n) ~ c * d^n * (n-1)!, where
d = A238261 = -(2*LambertW(-1,-exp(-1/2)/2))^2 / (1 + 2*LambertW(-1,-exp(-1/2)/2)) = 4.9108149645682558987515348052403521978987052817678471761394112...
c = 1/(4*sqrt(-LambertW(-1, -exp(-1/2)/2)) * sqrt(-1 - LambertW(-1, -exp(-1/2)/2))*Pi) = 0.06903826111269387517867145566264007373042059749428879149076344304196548... - Vaclav Kotesovec, Feb 28 2021, updated May 14 2025
a(n) = [x^n] Product_{k=0..n-1} (1 + k*x)^2. - Seiichi Manyama, May 13 2025

A246117 Number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 2, 5, 4, 1, 0, 4, 12, 13, 6, 1, 0, 12, 40, 51, 31, 9, 1, 0, 36, 132, 193, 144, 58, 12, 1, 0, 144, 564, 904, 769, 376, 106, 16, 1, 0, 576, 2400, 4180, 3980, 2273, 800, 170, 20, 1, 0, 2880, 12576, 23300, 24080, 15345, 6273, 1650, 270, 25, 1
Offset: 1

Views

Author

Peter Bala, Aug 14 2014

Keywords

Comments

An analog of the Stirling numbers of the first kind, A008275.
A permutation p of the set {1,2,...,n} is called a parity-preserving permutation if p(i) = i (mod 2) for i = 1,2,...,n. The set of all such permutations forms a subgroup of order A010551 of the symmetric group on n letters. This triangle gives the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles. An example is given below.
If we write a parity-preserving permutation p in one line notation as ( p(1) p(2) p(3)... p(n) ) then the first entry p(1) is odd and thereafter the entries alternate in parity. Thus the permutation p belongs to the set of parity-alternate permutations studied by Tanimoto.
The row generating polynomials form the polynomial sequence x, x^2, x^2*(x + 1), x^2*(x + 1)^2, x^2*(x + 1)^2*(x + 2), x^2*(x + 1)^2*(x + 2)^2, .... Except for differences in offset, this triangle is the Galton array G(floor(n/2),1) in the notation of Neuwirth with inverse array G(-floor(k/2),1). See A246118 for the unsigned version of the inverse array.
From Peter Bala, Apr 12 2018: (Start)
In the cycle decomposition of a parity preserving permutation, the entries in a given cycle are either all even or all odd. Define T(n,k,i), 1 <= i <= k-1, (a refinement of the table number T(n,k)) to be the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles and with i of the cycles having all even entries. Clearly, T(n,k) = Sum_{i = 1..k-1} T(n,k,i).
A simple combinatorial argument (cf. Dzhumadil'daev and Yeliussizov, Proposition 5.3) gives the recurrences
T(2*n,k,i) = T(2n-1,k-1,i-1) + (n-1)*T(2*n-1,k,i) and
T(2*n+1,k,i) = T(2*n,k-1,i) + n*T(2*n,k,i).
The solution to these recurrences for n >= 1 is T(2*n,k,i) = S1(n,i)*S1(n,k-i) and T(2*n+1,k,i) = S1(n,i)*S1(n+1,k-i), where S1(n,k) = |A008275(n,k)| denotes the (unsigned) Stirling cycle numbers of the first kind. Kotesovec's formula for T(n,k) below follows immediately from this. Cf. A274310. (End)
Triangle of allowable Stirling numbers of the first kind (with a different offset). See Cai and Readdy, Table 4. - Peter Bala, Apr 14 2018

Examples

			Triangle begins
n\k| 1   2    3    4    5   6   7   8
= = = = = = = = = = = = = = = = = = =
1  | 1
2  | 0   1
3  | 0   1    1
4  | 0   1    2    1
5  | 0   2    5    4    1
6  | 0   4   12   13    6   1
7  | 0  12   40   51   31   9   1
8  | 0  36  132  193  144  58  12  1
...
n = 5: The 12 parity-preserving permutations of S_5 and their cycle structure are shown in the table below.
= = = = = = = = = = = = = = = = = = = = = = = = = =
Parity-preserving      Cycle structure     # cycles
permutation
= = = = = = = = = = = = = = = = = = = = = = = = = =
54123                   (153)(24)              2
34521                   (135)(24)              2
34125                   (13)(24)(5)            3
14523                   (1)(24)(35)            3
32541                   (135)(2)(4)            3
52143                   (153)(2)(4)            3
54321                   (15)(24)(3)            3
32145                   (13)(2)(4)(5)          4
14325                   (1)(24)(3)(5)          4
12543                   (1)(2)(35)(4)          4
52341                   (15)(2)(3)(4)          4
12345                   (1)(2)(3)(4)(5)        5
= = = = = = = = = = = = = = = = = = = = = = = = = =
This gives row 5 as [2, 5, 4, 1] with generating function 2*x^2 + 5*x^3 + 4*x^4 + x^5 = ( x*(x + 1) )^2 * (x + 2).
		

Crossrefs

A002620 (1st subdiagonal), A008275, A010551 (row sums and column k = 2), A125300, A203151 (column k = 3), A203246 (2nd subdiagonal), A246118 (unsigned matrix inverse).

Programs

  • Maple
    A246117 := proc(n,k)
        if n = k then
            1;
        elif k <= 1 or k > n then
            0;
        else
            floor((n-1)/2)*procname(n-1,k)+procname(n-1,k-1) ;
        end if;
    end proc:
    seq(seq(A246117(n,k),k=1..n),n=1..8) ; # R. J. Mathar, Oct 01 2016
  • Mathematica
    Flatten[{1,Rest[Table[Table[(-1)^(n-k) * Sum[StirlingS1[Floor[(n+1)/2],j] * StirlingS1[Floor[n/2],k-j],{j,1,k-1}],{k,1,n}],{n,1,12}]]}] (* Vaclav Kotesovec, Feb 09 2015 *)

Formula

Recurrence equations: T(1,1) = 1, T(n,1) = 0 for n >= 2; T(n,k) = 0 for k > n; otherwise T(n+1,k) = floor(n/2)*T(n,k) + T(n,k-1).
Row generating polynomials R(n,x): R(2*n,x) = ( x*(x + 1)*...*(x + n - 1) )^2; R(2*n + 1,x) = R(2*n,x)*(x + n) with the convention R(0,x) = 1.
Row sums: A010551; Column 3: A203151;
First subdiagonal: A002620; 2nd subdiagonal: A203246.
T(n,k) = (-1)^(n-k) * Sum_{j=1..k-1} Stirling1(floor((n+1)/2),j) * Stirling1(floor(n/2),k-j), for k>1. - Vaclav Kotesovec, Feb 09 2015

A350376 a(n) = [x^n] Product_{k=1..n} 1/(1 - k*x)^2.

Original entry on oeis.org

1, 2, 23, 480, 14627, 587580, 29331038, 1750923328, 121673580435, 9648709656300, 859874920598850, 85078769750118144, 9254316901029412110, 1097635452798476278232, 140986468651523106196060, 19496446561112852736019200, 2887977880849714395963280515
Offset: 0

Views

Author

Seiichi Manyama, Dec 27 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Coefficient[Series[Product[1/(1 - k*x)^2, {k, 1, n}], {x, 0, n}], x, n]; Array[a, 17, 0] (* Amiram Eldar, Dec 28 2021 *)
    Table[Sum[StirlingS2[n + k, n]*StirlingS2[2*n - k, n], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Dec 29 2021 *)
  • PARI
    a(n) = sum(k=0, n, stirling(n+k, n, 2)*stirling(2*n-k, n, 2));

Formula

a(n) = Sum_{k=0..n} Stirling2(n+k, n) * Stirling2(2*n-k, n).
a(n) ~ c * d^n * (n-1)!, where d = 27 / (4*LambertW(-3*exp(-3/2)/2)^2 * (3 + 2*LambertW(-3*exp(-3/2)/2))) = 9.858422414446789720857925020919293523149... and c = sqrt(3/(-LambertW(-3*exp(-3/2)/2) * (1 + LambertW(-3*exp(-3/2)/2)))) / (4*Pi) = 0.28482428628793763109169664913715827647091747... - Vaclav Kotesovec, Dec 28 2021, updated May 14 2025

A384031 a(n) = [x^n] Product_{k=0..n} (1 + k*x)^4.

Original entry on oeis.org

1, 4, 62, 1680, 65446, 3334800, 210218956, 15803243456, 1380404187558, 137419388080920, 15359405910256580, 1904647527097204032, 259511601503239509004, 38539384808775589973416, 6195988524478342471690200, 1072149116496356641327200000, 198683315255720972000976370950
Offset: 0

Views

Author

Seiichi Manyama, May 17 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[(1+k*x)^4, {k, 1, n}], {x, 0, n}], {n, 0, 16}] (* Vaclav Kotesovec, May 18 2025 *)
  • PARI
    a(n) = sum(i=0, n, sum(j=0, 3*n-i, sum(k=0, 3*n-i-j, abs(stirling(n+1, i+1, 1)*stirling(n+1, j+1, 1)*stirling(n+1, k+1, 1)*stirling(n+1, 3*n-i-j-k+1, 1)))));

Formula

a(n) = Sum_{0<=i, j, k, l<=n and i+j+k+l=3*n} |Stirling1(n+1,i+1) * Stirling1(n+1,j+1) * Stirling1(n+1,k+1) * Stirling1(n+1,l+1)|.
a(n) ~ 2^(8*n + 7/2) * w^(4*n + 5/2) * n^(n - 1/2) / (sqrt(Pi*(w-1)) * 3^(3*n + 5/2) * exp(n) * (4*w-3)^n), where w = -LambertW(-1,-3*exp(-3/4)/4) = 1.300200741659068588153265179374583756429... - Vaclav Kotesovec, May 18 2025

A351507 a(n) = [x^n] Product_{k=1..n} (1 + k*x)^n.

Original entry on oeis.org

1, 1, 13, 630, 65446, 11732175, 3222746276, 1257489289280, 661150527657180, 450529025613124095, 386183537239831846450, 406654820487854059966416, 516014868401631381045209376, 776565429016998902169538130936, 1367544537916924083498367095477800
Offset: 0

Views

Author

Seiichi Manyama, Feb 12 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[(1 + k*x)^n, {k,1,n}], {x,0,n}], {n,0,20}] (* Vaclav Kotesovec, Feb 18 2022 *)
  • PARI
    a(n) = polcoef(prod(k=1, n, 1+k*x)^n, n);

Formula

a(n) ~ exp(n + 1/3) * n^(2*n - 1/2) / (sqrt(Pi) * 2^(n + 1/2)). - Vaclav Kotesovec, Feb 18 2022
a(n) = Sum_{0 <= x_1, x_2,..., x_n <= n and x_1 + x_2 + ... + x_n = (n-1)*n} Product_{k=1..n} |Stirling1(n + 1,x_k + 1)|. - Seiichi Manyama, May 18 2025

A384012 a(n) = [x^n] Product_{k=0..n} (1 + k*x)^3.

Original entry on oeis.org

1, 3, 33, 630, 17247, 616770, 27264976, 1436603616, 87922855935, 6131105251425, 479931312805425, 41674568874964740, 3975727750503656820, 413360925414308633034, 46523118781014280909560, 5635356193271621706436800, 730994763063708819170060751, 101099888222006502307905386445
Offset: 0

Views

Author

Seiichi Manyama, May 17 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[(1+k*x)^3, {k, 1, n}], {x, 0, n}], {n, 0, 17}] (* Vaclav Kotesovec, May 18 2025 *)
  • PARI
    a(n) = sum(i=0, n, sum(j=0, 2*n-i, abs(stirling(n+1, i+1, 1)*stirling(n+1, j+1, 1)*stirling(n+1, 2*n-i-j+1, 1))));

Formula

a(n) = Sum_{0<=i, j, k<=n and i+j+k=2*n} |Stirling1(n+1,i+1) * Stirling1(n+1,j+1) * Stirling1(n+1,k+1)|.
a(n) ~ 3^(3*n + 3/2) * w^(3*n+2) * n^(n - 1/2) / (2^(2*n + 5/2) * sqrt(Pi*(w-1)) * exp(n) * (3*w-2)^n), where w = -LambertW(-1,-2*exp(-2/3)/3) = 1.4293552275170056487105688431034768889546376014196... - Vaclav Kotesovec, May 18 2025

A238261 Decimal expansion of a constant related to A187235.

Original entry on oeis.org

4, 9, 1, 0, 8, 1, 4, 9, 6, 4, 5, 6, 8, 2, 5, 5, 8, 9, 8, 7, 5, 1, 5, 3, 4, 8, 0, 5, 2, 4, 0, 3, 5, 2, 1, 9, 7, 8, 9, 8, 7, 0, 5, 2, 8, 1, 7, 6, 7, 8, 4, 7, 1, 7, 6, 1, 3, 9, 4, 1, 1, 2, 0, 2, 2, 5, 6, 4, 1, 7, 8, 7, 7, 8, 7, 9, 9, 4, 7, 9, 7, 2, 9, 5, 1, 8, 1, 9, 7, 4, 1, 5, 3, 5, 5, 4, 4, 6, 1, 4, 2, 5, 0, 5, 3
Offset: 1

Views

Author

Vaclav Kotesovec, Feb 21 2014

Keywords

Examples

			4.9108149645682558987515348...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[N[-(2*LambertW[-1,-1/2/Sqrt[E]])^2/(1+2*LambertW[-1,-1/2/Sqrt[E]]), 105]][[1]]

Formula

Equals lim n->infinity (A187235(n)/(n-1)!)^(1/n).
Equals -(2*LambertW(-1,-exp(-1/2)/2))^2 / (1 + 2*LambertW(-1,-exp(-1/2)/2)).

A254882 Triangle read by rows, T(n,k) = Sum_{j=0..k-1} S(n,j+1)*S(n,k-j) where S denotes the Stirling cycle numbers A132393, T(0,0)=1, n>=0, 0<=k<=2n-1.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 1, 0, 4, 12, 13, 6, 1, 0, 36, 132, 193, 144, 58, 12, 1, 0, 576, 2400, 4180, 3980, 2273, 800, 170, 20, 1, 0, 14400, 65760, 129076, 143700, 100805, 46710, 14523, 3000, 395, 30, 1, 0, 518400, 2540160, 5450256, 6787872, 5482456, 3034920, 1184153
Offset: 0

Views

Author

Peter Luschny, Feb 10 2015

Keywords

Examples

			[1]
[0, 1]
[0, 1, 2, 1]
[0, 4, 12, 13, 6, 1]
[0, 36, 132, 193, 144, 58, 12, 1]
[0, 576, 2400, 4180, 3980, 2273, 800, 170, 20, 1]
		

Crossrefs

Programs

  • Maple
    a := n -> (x^n*pochhammer(1+1/x,n))^2:
    c := (n,k) -> coeff(expand(a(n)),x,n-k):
    for n from 0 to 5 do: `if`(n=0,[1],[seq(c(n-1,k),k=-n..n-1)]) od;
    # Second program, a special case of the recurrence given in A246117:
    t := proc(n,k) option remember; if n=0 and k=0 then 1 elif
    k <= 0 or k>n then 0 else iquo(n,2)*t(n-1,k)+t(n-1,k-1) fi end:
    A254882 := (n,k) -> `if`(n=0,1,t(2*n-1,k)):
    seq(print(seq(A254882(n,k), k=0..max(0,2*n-1))), n=0..5);
  • Mathematica
    Flatten[{1,Table[Table[Sum[Abs[StirlingS1[n,j+1]] * Abs[StirlingS1[n,k-j]],{j,0,k-1}],{k,0,2*n-1}],{n,1,10}]}] (* Vaclav Kotesovec, Feb 10 2015 *)
  • Sage
    def A254882(n,k):
        if n == 0: return 1
        return sum(stirling_number1(n,j+1)*stirling_number1(n,k-j) for j in range(k))
    for n in range (5): [A254882(n,k) for k in (0..max(0,2*n-1))]

Formula

T(n+1, n+1) = A129256(n) for n>=0.

A384017 a(n) = [x^n] Product_{k=0..n} (1 + k*x)^5.

Original entry on oeis.org

1, 5, 100, 3510, 177370, 11732175, 960453825, 93791830160, 10644367637490, 1376936603007075, 200002385378370350, 32233130183113838550, 5708169533474858008905, 1101836121788665346133960, 230256048227047074266497400, 51791322674249971562728368000
Offset: 0

Views

Author

Seiichi Manyama, May 18 2025

Keywords

Comments

From Vaclav Kotesovec, May 19 2025: (Start)
In general, for m > 1, [x^n] Product_{k=0..n} (1 + k*x)^m ~ m^(m*(n + 1/2)) * w^(m*n + (m+1)/2) * n^(n - 1/2) / (sqrt(2*Pi*(w-1)) * exp(n) * (m-1)^((m-1)*n + (m+1)/2) * (m*w-m+1)^n), where w = -LambertW(-1,-(m-1)*exp(-(m-1)/m)/m).
The general formula is valid even for m=n, where after modifications we get the formula for A351507. (End)

Crossrefs

Cf. A000142 (m=1), A129256 (m=2), A384012 (m=3), A384031 (m=4), A351507 (m=n).

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[(1+k*x)^5, {k, 1, n}], {x, 0, n}], {n, 0, 15}] (* Vaclav Kotesovec, May 19 2025 *)
  • PARI
    a(n) = polcoef(prod(k=1, n, 1+k*x)^5, n);

Formula

a(n) = Sum_{0<=i, j, k, l, m<=n and i+j+k+l+m=4*n} |Stirling1(n+1,i+1) * Stirling1(n+1,j+1) * Stirling1(n+1,k+1) * Stirling1(n+1,l+1) * Stirling1(n+1,m+1)|.
a(n) ~ 5^(5*n + 5/2) * w^(5*n+3) * n^(n - 1/2) / (2^(8*n + 13/2) * sqrt(Pi*(w-1)) * exp(n) * (5*w-4)^n), where w = -LambertW(-1,-4*exp(-4/5)/5) = 1.2308422097842590367678406745433500325966... - Vaclav Kotesovec, May 19 2025
Showing 1-10 of 15 results. Next