A052841
Expansion of e.g.f.: 1/(exp(x)*(2-exp(x))).
Original entry on oeis.org
1, 0, 2, 6, 38, 270, 2342, 23646, 272918, 3543630, 51123782, 811316286, 14045783798, 263429174190, 5320671485222, 115141595488926, 2657827340990678, 65185383514567950, 1692767331628422662, 46400793659664205566, 1338843898122192101558, 40562412499252036940910
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
From _Gus Wiseman_, Feb 13 2019: (Start)
The a(4) = 38 ordered set partitions with no cyclical adjacencies:
{{1}{2}{3}{4}} {{1}{24}{3}} {{13}{24}}
{{1}{2}{4}{3}} {{1}{3}{24}} {{24}{13}}
{{1}{3}{2}{4}} {{13}{2}{4}}
{{1}{3}{4}{2}} {{13}{4}{2}}
{{1}{4}{2}{3}} {{2}{13}{4}}
{{1}{4}{3}{2}} {{2}{4}{13}}
{{2}{1}{3}{4}} {{24}{1}{3}}
{{2}{1}{4}{3}} {{24}{3}{1}}
{{2}{3}{1}{4}} {{3}{1}{24}}
{{2}{3}{4}{1}} {{3}{24}{1}}
{{2}{4}{1}{3}} {{4}{13}{2}}
{{2}{4}{3}{1}} {{4}{2}{13}}
{{3}{1}{2}{4}}
{{3}{1}{4}{2}}
{{3}{2}{1}{4}}
{{3}{2}{4}{1}}
{{3}{4}{1}{2}}
{{3}{4}{2}{1}}
{{4}{1}{2}{3}}
{{4}{1}{3}{2}}
{{4}{2}{1}{3}}
{{4}{2}{3}{1}}
{{4}{3}{1}{2}}
{{4}{3}{2}{1}}
(End)
- Alois P. Heinz, Table of n, a(n) for n = 0..200
- C. G. Bower, Transforms (2)
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 808
- Svante Janson, Euler-Frobenius numbers and rounding, preprint arXiv:1305.3512 [math.PR], 2013.
- Lukas Spiegelhofer, A lower bound for Cusick's conjecture on the digits of n+t, arXiv:1910.13170 [math.NT], 2019.
Inverse binomial transform of
A000670.
-
R:=PowerSeriesRing(Rationals(), 40);
Coefficients(R!(Laplace( Exp(-x)/(2-Exp(x)) ))); // G. C. Greubel, Jun 11 2024
-
spec := [S,{B=Prod(C,C),C=Set(Z,1 <= card),S=Sequence(B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
P := proc(n,x) option remember; if n = 0 then 1 else
(n*x+2*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x); expand(%) fi end:
A052841 := n -> subs(x=2, P(n,x)):
seq(A052841(n), n=0..21); # Peter Luschny, Mar 07 2014
h := n -> add(combinat:-eulerian1(n, k)*2^k, k=0..n):
a := n -> (h(n)+(-1)^n)/2: seq(a(n), n=0..21); # Peter Luschny, Sep 19 2015
b := proc(n, m) option remember; if n = 0 then 1 else
(m - 1)*b(n - 1, m) + (m + 1)*b(n - 1, m + 1) fi end:
a := n -> b(n, 0): seq(a(n), n = 0..21); # Peter Luschny, Jun 23 2023
-
a[n_] := If[n == 0, 1, (PolyLog[-n, 1/2]/2 + (-1)^n)/2]; (* or *)
a[n_] := HurwitzLerchPhi[1/2, -n, -1]/2; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Feb 19 2016, after Vladeta Jovovic *)
With[{nn=30},CoefficientList[Series[1/(Exp[x](2-Exp[x])),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Apr 08 2019 *)
-
a(n)=if(n<0,0,n!*polcoeff(subst(1/(1-y^2),y,exp(x+x*O(x^n))-1),n))
-
{a(n)=polcoeff(sum(m=0,n,(2*m)!*x^(2*m)/prod(k=1,2*m,1-k*x+x*O(x^n))),n)} /* Paul D. Hanna, Jul 20 2011 */
-
def A052841_list(prec):
P. = PowerSeriesRing(QQ, prec)
return P( exp(-x)/(2-exp(x)) ).egf_to_ogf().list()
A052841_list(40) # G. C. Greubel, Jun 11 2024
A098557
Expansion of e.g.f. (1/2)*(1+x)*log((1+x)/(1-x)).
Original entry on oeis.org
0, 1, 2, 2, 8, 24, 144, 720, 5760, 40320, 403200, 3628800, 43545600, 479001600, 6706022400, 87178291200, 1394852659200, 20922789888000, 376610217984000, 6402373705728000, 128047474114560000, 2432902008176640000, 53523844179886080000, 1124000727777607680000
Offset: 0
Cf.
A109613 (odd numbers repeated).
Equals the first left hand column of
A167552.
Equals the first right hand column of
A167556.
(End)
-
[0,1] cat [Factorial(n-1) + Factorial(n-2)*(1+(-1)^n)/2: n in [2..30]]; // G. C. Greubel, Jan 17 2018
-
Join[{0,1}, Table[(n-1)! + (n-2)!*(1+(-1)^n)/2, {n,2,30}]] (* or *) With[{nmax = 50}, CoefficientList[Series[(1/2)*(1 + x)*Log[(1 + x)/(1 - x)], {x,0,nmax}], x]*Range[0,nmax]!] (* G. C. Greubel, Jan 17 2018 *)
-
for(n=0, 30, print1(if(n==0,0, if(n==1, 1, (n-1)! + (n-2)!*(1 + (-1)^n)/2)), ", ")) \\ G. C. Greubel, Jan 17 2018
A030077
Take n equally spaced points on circle, connect them by a path with n-1 line segments; sequence gives number of distinct path lengths.
Original entry on oeis.org
1, 1, 1, 3, 5, 17, 28, 105, 161, 670, 1001, 2869, 6188, 26565, 14502, 167898, 245157, 445507, 1562275, 6055315, 2571120, 44247137, 64512240, 65610820, 362592230, 1850988412, 591652989, 11453679146, 17620076360, 1511122441, 114955808528, 511647729284, 67876359922, 3347789809236, 1882352047787, 1404030562068, 32308782859535
Offset: 1
For n=4 the 3 lengths are: 3 boundary edges (length 3), edge-diagonal-edge (2 + sqrt(2)) and diagonal-edge-diagonal (1 + 2*sqrt(2)).
For n=5, the 4 edges of the path may include 0,...,4 diagonals, so a(5)=5.
See
A352568 for the multisets of line lengths.
Removed unnecessary mention of dihedral group from definition. -
N. J. A. Sloane, Apr 02 2022
A052591
Expansion of e.g.f. x/((1-x)(1-x^2)).
Original entry on oeis.org
0, 1, 2, 12, 48, 360, 2160, 20160, 161280, 1814400, 18144000, 239500800, 2874009600, 43589145600, 610248038400, 10461394944000, 167382319104000, 3201186852864000, 57621363351552000, 1216451004088320000, 24329020081766400000, 562000363888803840000
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
-
spec := [S,{S=Prod(Z,Sequence(Z),Sequence(Prod(Z,Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
G(x):=x/(1-x)/(1-x^2): f[0]:=G(x): for n from 1 to 19 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..19); # Zerinvary Lajos, Apr 03 2009
-
a(n)=if(n<0,0,n!*polcoeff(x/(1-x)/(1-x^2)+x*O(x^n),n))
A152664
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} for which k is the maximal number of initial even entries (0 <= k <= floor(n/2)).
Original entry on oeis.org
1, 1, 1, 4, 2, 12, 8, 4, 72, 36, 12, 360, 216, 108, 36, 2880, 1440, 576, 144, 20160, 11520, 5760, 2304, 576, 201600, 100800, 43200, 14400, 2880, 1814400, 1008000, 504000, 216000, 72000, 14400, 21772800, 10886400, 4838400, 1814400, 518400, 86400
Offset: 1
T(3,0)=4 because we have 123, 132, 312 and 321.
T(4,2)=4 because we have 2413, 2431, 4213 and 4231.
Triangle starts:
1;
1, 1;
4, 2;
12, 8, 4;
72, 36, 12;
360, 216, 108, 36;
-
T := proc (n, k) if `mod`(n, 2) = 1 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-k-1, (1/2)*n-1/2) else factorial((1/2)*n)^2*binomial(n-k-1, (1/2)*n-1) end if end proc: for n to 11 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
A007874
Distinct perimeter lengths of polygons with regularly spaced vertices.
Original entry on oeis.org
1, 1, 1, 2, 4, 10, 24, 63, 177, 428, 1230, 2556, 8202, 18506, 18162, 119069
Offset: 1
Peter H. Borcherds (p.h.borcherds(AT)bham.ac.uk)
Consider n=4. Label the points on the circle A,B,C and D. Suppose that AB has unit length. Then a(4)=2 because the two 4-gons are ABCDA and ACBDA, with perimeters 4 and 2+2*sqrt(2), respectively.
A161133
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having exactly k odd fixed points (0 <= k <= ceiling(n/2)).
Original entry on oeis.org
1, 0, 1, 1, 1, 3, 2, 1, 14, 8, 2, 64, 42, 12, 2, 426, 234, 54, 6, 2790, 1704, 468, 72, 6, 24024, 12864, 3024, 384, 24, 205056, 120120, 32160, 5040, 480, 24, 2170680, 1145400, 272400, 37200, 3000, 120, 22852200, 13024080, 3436200, 544800, 55800
Offset: 0
T(3,0)=3 because we have 312, 231, 321; T(3,2)=1 because we have 123.
Triangle starts:
1;
0, 1;
1, 1;
3, 2, 1;
14, 8, 2;
64, 42, 12, 2;
426, 234, 54, 6;
-
T := proc (n, k) options operator, arrow: binomial(ceil((1/2)*n), k)*add((-1)^j*binomial(ceil((1/2)*n)-k, j)*factorial(n-k-j), j = 0 .. ceil((1/2)*n)-k) end proc: for n from 0 to 12 do seq(T(n, k), k = 0 .. ceil((1/2)*n)) end do; # yields sequence in triangular form
-
Flatten[Table[Binomial[Ceiling[n/2], k]*Sum[(-1)^j*(n - k - j)!*Binomial[Ceiling[n/2] - k, j], {j, 0, Ceiling[n/2] - k}],{n, 0, 11}, {k, 0, Ceiling[n/2]}]] (* Indranil Ghosh, Mar 08 2017 *)
-
tabf(nn) = { for(n=0, nn, for(k = 0, ceil(n/2), print1(binomial(ceil(n/2), k) * sum(j=0, ceil(n/2) - k, (-1)^j*(n - k - j)! * binomial(ceil(n/2) - k, j)),", ");); print();); };
tabf(12); \\ Indranil Ghosh, Mar 08 2017
A327882
a(n) = n*(2*(n-1))! for n > 0, a(0) = 1.
Original entry on oeis.org
1, 1, 4, 72, 2880, 201600, 21772800, 3353011200, 697426329600, 188305108992000, 64023737057280000, 26761922089943040000, 13488008733331292160000, 8065829222532112711680000, 5646080455772478898176000000, 4573325169175707907522560000000, 4244045756995056938180935680000000
Offset: 0
2 + x^2 - 2*cos(x) - 2*x*sin(x) = (1/4)*x^4 - (1/72)*x^6 + (1/2880)*x^8 - (1/201600)*x^10 + (1/21772800)*x^12 - ...
-
Denominator[CoefficientList[ Series[2 - 2 Cos[x] - (2 x) Sin[x] + x^2, {x, 0, 33}], x][[ ;; ;; 2]]]
-
a(n) = {if(n<1, n==0, (2*n)!/(2*(2*n-1)))} \\ Andrew Howroyd, Oct 09 2019
Original entry on oeis.org
1, 0, 1, 2, 0, 2, 0, 6, 0, 6, 24, 0, 24, 0, 24, 0, 120, 0, 120, 0, 120, 720, 0, 720, 0, 720, 0, 720, 0, 5040, 0, 5040, 0, 5040, 0, 5040
Offset: 0
First few rows of the triangle:
1;
0, 1;
2, 0, 2;
0, 6, 0, 6;
24, 0, 24, 0, 24;
0, 120, 0, 120, 0, 120;
...
Showing 1-9 of 9 results.
Comments