A220002
Numerators of the coefficients of an asymptotic expansion in even powers of the Catalan numbers.
Original entry on oeis.org
1, 5, 21, 715, -162877, 19840275, -7176079695, 1829885835675, -5009184735027165, 2216222559226679575, -2463196751104762933637, 1679951011110471133453965, -5519118103058048675551057049, 5373485053345792589762994345215, -12239617587594386225052760043303511
Offset: 0
With N = 4*n+3 the first few terms of A are A = 1 + 5/(4*N^2) + 21/(32*N^4) + 715/(128*N^6) - 162877/(2048*N^8) + 19840275/(8192*N^10). With this A C(n) = round(8*4^n*A/(N*sqrt(N*Pi))) for n = 0..39 (if computed with sufficient numerical precision).
- Donald E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees—History of Combinatorial Generation, 2006.
- Y. L. Luke, The Special Functions and their Approximations, Vol. 1. Academic Press, 1969.
-
A220002 := proc(n) local s; s := n -> `if`(n > 0, s(iquo(n,2))+n, 0);
(-1)^n*mul(4*i+2, i = 1..2*n)*2^s(iquo(n,2))*coeff(taylor(sqrt(sin(x)/x), x,2*n+2), x, 2*n) end: seq(A220002(n), n = 0..14);
# Second program illustrating J. L. Fields expansion of gamma quotients.
A220002 := proc(n) local recF, binSum, swing;
binSum := n -> add(i,i=convert(n,base,2));
swing := n -> n!/iquo(n, 2)!^2;
recF := proc(n, x) option remember; `if`(n=0, 1, -2*x*add(binomial(n-1,2*k+1)*bernoulli(2*k+2)/(2*k+2)*recF(n-2*k-2,x),k=0..n/2-1)) end: recF(2*n,-1/4)*2^(3*n-binSum(n))*swing(4*n+1) end:
-
max = 14; CoefficientList[ Series[ Sqrt[ Sinc[x]], {x, 0, 2*max+1}], x^2][[1 ;; max+1]]*Table[ (-1)^n*Product[ (2*k+1), {k, 1, 2*n}], {n, 0, max}] // Numerator (* Jean-François Alcover, Jun 26 2013 *)
-
length = 15; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
def A005187(n): return A005187(n//2) + n if n > 0 else 0
def A220002(n):
P = mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
return (-1)^n*P*T.coefficient(x, 2*n)
[A220002(n) for n in range(length)]
-
# Second program illustrating the connection with the Euler numbers.
def A220002_list(n):
S = lambda n: sum((4-euler_number(2*k))/(4*k*x^(2*k)) for k in (1..n))
T = taylor(exp(S(2*n+1)),x,infinity,2*n-1).coefficients()
return [t[0].numerator() for t in T][::-1]
A220002_list(15)
A107373
a(n) = (n/2)*binomial(n-1, floor((n-1)/2)) - 2^(n-2).
Original entry on oeis.org
0, 0, 1, 2, 7, 14, 38, 76, 187, 374, 874, 1748, 3958, 7916, 17548, 35096, 76627, 153254, 330818, 661636, 1415650, 2831300, 6015316, 12030632, 25413342, 50826684, 106853668, 213707336, 447472972, 894945944, 1867450648, 3734901296, 7770342787, 15540685574
Offset: 1
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Jean-Luc Baril, Alexander Burstein, and Sergey Kirgizov, Pattern statistics in faro words and permutations, arXiv:2010.06270 [math.CO], 2020. See Table 1.
- F. Disanto and S. Rinaldi, Symmetric convex permutominoes and involutions, PU. M. A. 22:1 (2011), 39-60.
- Igor Pak, The area of cyclic polygons: Recent progress on Robbins' Conjectures, Adv. Applied Math. 34 (2005), 690-696. Special issue in memory of David Robbins.
-
[(n/2)*Binomial(n-1, Floor((n-1)/2)) - 2^(n-2): n in [1..40]]; // Vincenzo Librandi, Oct 01 2013
-
A056040 := n -> n!/iquo(n,2)!^2:
A133265 := n -> (n+2+(n-2)*(-1)^n)/2:
A107373 := n -> (A056040(n)*A133265(n)-2^n)/4:
seq(A107373(n),n=1..34); # Peter Luschny, Aug 30 2011
-
Table[(n/2) Binomial[n-1, Floor[(n-1)/2]] - 2^(n-2), {n, 1, 40}] (* Vincenzo Librandi, Oct 01 2013 *)
A137762
Central elements in writing first the numerator and then the denominator (left to right) of Leibniz's harmonic-like triangle.
Original entry on oeis.org
1, 1, 5, 6, 31, 30, 209, 140, 1471, 630, 10625, 2772
Offset: 1
1/1; --> 1 1
1/2, 1/2; -->
1/3, 5/6, 1/3; --> 5 6
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
Cf.
A003506,
A046201,
A046204,
A046205,
A046206,
A046208,
A046212,
A137752,
A137753,
A137754,
A137755,
A137756,
A137757,
A137758,
A137759,
A137760,
A137761.
A137763
Central elements in writing first the denominator and then the numerator(left to right) of Leibniz's harmonic-like triangle.
Original entry on oeis.org
1, 1, 6, 5, 30, 31, 140, 209, 630, 1471, 2772, 10625
Offset: 1
1/1; --> 1 1
1/2, 1/2; -->
1/3, 5/6, 1/3; --> 6 5
1/4, 7/12, 7/12, 1/4; --> ...
1/5, 9/20, 31/30, 9/20, 1/5;
Cf.
A046201,
A046204,
A046205,
A046206,
A046208,
A046212,
A137752,
A137753,
A137754,
A137755,
A137756,
A137757,
A137758,
A137759,
A137760,
A137761,
A137762.
A162246
Swinging polynomials, coefficients read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 3, 3, 6, 3, 3, 1, 1, 4, 4, 12, 6, 12, 4, 4, 1, 1, 5, 5, 20, 10, 30, 10, 20, 5, 5, 1, 1, 6, 6, 30, 15, 60, 20, 60, 15, 30, 6, 6, 1, 1, 7, 7, 42, 21, 105, 35, 140, 35, 105, 21, 42, 7, 7, 1
Offset: 0
The central coefficients are marked by [].
[1]
1,[1],1
1,2,[2],2,1
1,3,3,[6],3,3,1
1,4,4,12,[6],12,4,4,1
1,5,5,20,10,[30],10,20,5,5,1
1,6,6,30,15,60,[20],60,15,30,6,6,1
1,7,7,42,21,105,35,[140],35,105,21,42,7,7,1
p(0,x) = 1
p(1,x) = x^2+x+1
p(2,x) = x^4+2x^3+2x^2+2x+1
p(3,x) = x^6+3x^5+3x^4+6x^3+3x^2+3x+1
p(4,x) = x^8+4x^7+4x^6+12x^5+6x^4+12x^3+4x^2+4x+1
p(5,x) = x^10+5x^9+5x^8+20x^7+10x^6+30x^5+10x^4+20x^3+5x^2+5x+1
-
p := (n,x) -> (1+x^2)^n+n*x*(1+x^2)^(n-1):
seq(print(seq(coeff(expand(p(n,x)),x,i),i=0..2*n)),n=0..7);
T := (n,k) -> n!/((n-ceil(k/2))!*floor(k/2)!);
seq(print(seq(T(n,k),k=0..2*n)),n=0..7);
-
t[n_, k_] := If[EvenQ[k], Binomial[n, k/2], Binomial[n, (k-1)/2]*(n-(k-1)/2)]; Table[t[n, k], {n, 0, 7}, {k, 0, 2*n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)
A163869
Binomial transform of the beta numbers 1/beta(n+1,n+1) (A002457).
Original entry on oeis.org
1, 7, 43, 249, 1395, 7653, 41381, 221399, 1175027, 6196725, 32512401, 169863147, 884318973, 4589954619, 23761814955, 122735222505, 632698778835, 3255832730565, 16728131746145, 85826852897675, 439793834236745, 2251006269442815, 11509340056410735, 58790764269668805
Offset: 0
-
a := proc(n) local i; add(binomial(n,i)/Beta(i+1,i+1), i=0..n) end:
-
CoefficientList[Series[-Sqrt[x-1]/(5*x-1)^(3/2), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 21 2012 *)
sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Sum[ Binomial[n, n-i]*sf[2*i+1], {i, 0, n}]; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Jul 26 2013 *)
Table[Hypergeometric2F1[3/2, -n, 1, -4], {n, 0, 20}] (* Vladimir Reshetnikov, Apr 25 2016 *)
A212303
a(n) = n!/([(n-1)/2]!*[(n+1)/2]!) for n>0, a(0)=0, and where [ ] = floor.
Original entry on oeis.org
0, 1, 2, 3, 12, 10, 60, 35, 280, 126, 1260, 462, 5544, 1716, 24024, 6435, 102960, 24310, 437580, 92378, 1847560, 352716, 7759752, 1352078, 32449872, 5200300, 135207800, 20058300, 561632400, 77558760, 2326762800, 300540195, 9617286240, 1166803110, 39671305740
Offset: 0
-
A212303 := proc(n) if n mod 2 = 0 then n*binomial(n, iquo(n,2))/2 else binomial(n+1, iquo(n,2)+1)/2 fi end: seq(A212303(i), i=0..36);
-
a[n_?EvenQ] := n*Binomial[n, n/2]/2; a[n_?OddQ] := Binomial[n+1, Quotient[n, 2]+1]/2; Table[a[n], {n, 0, 36}] (* Jean-François Alcover, Feb 05 2014 *)
nxt[{n_,a_}]:={n+1,If[OddQ[n],a(n+1),(4a(n+1))/(n(n+2))]}; Join[{0}, Transpose[ NestList[ nxt,{1,1},40]][[2]]] (* Harvey P. Dale, Dec 20 2014 *)
-
def A212303():
yield 0
r, n = 1, 1
while True:
yield r
n += 1
r *= n if is_even(n) else 4*n/((n-1)*(n+1))
a = A212303(); [next(a) for i in range(36)]
A274888
Triangle read by rows: the q-analog of the swinging factorial which is defined as q-multinomial([floor(n/2), n mod 2, floor(n/2)]).
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 4, 5, 6, 5, 4, 2, 1, 1, 1, 2, 3, 3, 3, 3, 2, 1, 1, 1, 2, 4, 7, 10, 13, 16, 17, 17, 16, 13, 10, 7, 4, 2, 1, 1, 1, 2, 3, 5, 5, 7, 7, 8, 7, 7, 5, 5, 3, 2, 1, 1, 1, 2, 4, 7, 12, 17, 24, 31, 39, 45, 51, 54, 56, 54, 51, 45, 39, 31, 24, 17, 12, 7, 4, 2, 1
Offset: 0
The polynomials start:
[0] 1
[1] 1
[2] q + 1
[3] (q + 1) * (q^2 + q + 1)
[4] (q^2 + 1) * (q^2 + q + 1)
[5] (q^2 + 1) * (q^2 + q + 1) * (q^4 + q^3 + q^2 + q + 1)
[6] (q + 1) * (q^2 - q + 1) * (q^2 + 1) * (q^4 + q^3 + q^2 + q + 1)
The coefficients of the polynomials start:
[n] [k=0,1,2,...] [row sum]
[0] [1] [1]
[1] [1] [1]
[2] [1, 1] [2]
[3] [1, 2, 2, 1] [6]
[4] [1, 1, 2, 1, 1] [6]
[5] [1, 2, 4, 5, 6, 5, 4, 2, 1] [30]
[6] [1, 1, 2, 3, 3, 3, 3, 2, 1, 1] [20]
[7] [1, 2, 4, 7, 10, 13, 16, 17, 17, 16, 13, 10, 7, 4, 2, 1] [140]
[8] [1, 1, 2, 3, 5, 5, 7, 7, 8, 7, 7, 5, 5, 3, 2, 1, 1] [70]
T(5, 4) = 6 because the 2 orbitals [-1,-1,1,1,0] and [-1,0,1,1,-1] have at position 4 and the 4 orbitals [0,-1,1,-1,1], [1,-1,0,-1,1], [1,-1,1,-1,0] and [1,0,1,-1,-1] at positions 1 and 3 a down step.
-
QSwingFactorial_coeffs := proc(n) local P,a,b;
a := mul((p^(n-i)-1)/(p^(i+1)-1),i=0..iquo(n,2)-1);
b := ((p^(iquo(n,2)+1)-1)/(p-1))^((1-(-1)^n)/2);
P := simplify(a*b); seq(coeff(P,p,j),j=0..degree(P)) end:
for n from 0 to 9 do print(QSwingFactorial_coeffs(n)) od;
# Alternatively (recursive):
with(QDifferenceEquations):
QSwingRec := proc(n,q) local r; if n = 0 then return 1 fi:
if irem(n,2) = 0 then r := (1+q^(n/2))/QBrackets(n/2,q)
else r := QBrackets(n,q) fi; r*QSwingRec(n-1,q) end:
Trow := proc(n) expand(QSimplify(QSwingRec(n,q)));
seq(coeff(%,q,j),j=0..degree(%)) end: seq(Trow(n),n=0..10);
-
p[n_] := QFactorial[n, q] / QFactorial[Quotient[n, 2], q]^2
Table[CoefficientList[p[n] // FunctionExpand, q], {n,0,9}] // Flatten
-
from sage.combinat.q_analogues import q_factorial
def q_swing_factorial(n, q=None):
return q_factorial(n)//q_factorial(n//2)^2
for n in (0..8): print(q_swing_factorial(n).list())
-
# uses[unit_orbitals from A274709]
# Brute force counting
def orbital_major_index(n):
S = [0]*(((n+1)//2)^2 + ((n+1) % 2))
for u in unit_orbitals(n):
L = [i+1 if u[i+1] < u[i] else 0 for i in (0..n-2)]
# i+1 because u is 0-based whereas convention assumes 1-base.
S[sum(L)] += 1
return S
for n in (0..9): print(orbital_major_index(n))
Original entry on oeis.org
1, 4, 8, 32, 128, 512, 1024, 4096, 32768, 131072, 262144, 1048576, 4194304, 16777216, 33554432, 134217728, 2147483648, 8589934592, 17179869184, 68719476736, 274877906944, 1099511627776, 2199023255552, 8796093022208, 70368744177664, 281474976710656, 562949953421312
Offset: 0
-
bitcount(n) = sum(digits(n, base = 2))
A327493(n) = 2^(2n - bitcount(n) + mod(n, 2))
[A327493(n) for n in 0:26] |> println # Peter Luschny, Oct 03 2019
-
A327493 := n -> 2^(A327492_list(n+1)[n+1]):
seq(A327493(n), n = 0..26);
-
seq(n)={my(a=vector(n+1)); a[1]=1; for(n=1, n, a[n+1] = a[n] * 2^if(n%4, n%2 + 1, valuation(n,2))); a} \\ Andrew Howroyd, Sep 28 2019
-
a(n)={ denominator(sum(j=0, n, j!/(2^j*(j\2)!)^2)) } \\ Andrew Howroyd, Sep 28 2019
Comments