login
Search: a005043 -id:a005043
     Sort: relevance | references | number | modified | created      Format: long | short | data
Inverse Euler transform of the Riordan numbers, (A005043).
+20
18
1, 0, 1, 1, 2, 5, 11, 28, 68, 174, 445, 1166, 3068, 8190, 21994, 59585, 162360, 445145, 1226376, 3394654, 9434260, 26317865, 73661588, 206809307, 582255448, 1643536725, 4650250254, 13186484316, 37468566744, 106666821221, 304200399505, 868977304140, 2486163857424
OFFSET
0,5
FORMULA
a(n) ~ 3^(n + 1/2) / (4*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Jun 15 2024
MAPLE
EulerInvTransform := proc(f) local c, b;
c := proc(n) option remember;
ifelse(n = 0, f(0), f(n) - b(n, n-1)) end:
b := proc(n, k) option remember;
if n = 0 then return 1 elif k < 1 then return 0 fi;
add(binomial(c(k) + j - 1, j)*b(n-k*j, k-1), j=0..n/k) end:
c end:
a := EulerInvTransform(A005043): seq(a(n), n = 0..32);
MATHEMATICA
EulerInvTransform[seq_List] := Module[{final = {}}, Do[AppendTo[final, i*seq[[i]] - Sum[final[[d]]*seq[[i-d]], {d, i-1}]], {i, Length[seq]}]; Table[Sum[MoebiusMu[i/d]*final[[d]], {d, Divisors[i]}]/i, {i, Length[seq] }]];
A005043[n_] := A005043[n] = If[n <= 1, 1-n, (n-1)*(2*A005043[n-1] + 3*A005043[n-2])/(n+1)];
Join[{1}, EulerInvTransform[Array[A005043, 32]]] (* Jean-François Alcover, Jun 15 2024 *)
PROG
(SageMath)
z = LazyPowerSeriesRing(ZZ, 'z').gen()
g = 1 + z + sqrt(1 - 2*z - 3*z**2)
f = -z * g.derivative() / g
print([1] + [sum(moebius(n // d) * f[d]
for d in divisors(n)) // n for n in range(1, 33)])
(Python)
from typing import Callable
from functools import cache
from math import comb
# Define 'binomial' for compatibility with Maple.
def binomial(n: int, k: int) -> int:
if 0 <= k <= n: return comb(n, k)
if k <= n < 0: return comb(-k-1, n-k)*(-1)**(n-k)
if n < 0 <= k: return comb(-n+k-1, k)*(-1)**k
return 0
def EulerInvTransform(f: Callable) -> Callable:
@cache
def h(n: int, k: int) -> int:
if n == 0: return 1
if k < 1: return 0
return sum(binomial(b(k)+j-1, j) * h(n-k*j, k-1)
for j in range(1 + n // k))
@cache
def b(n: int) -> int:
if n == 0: return f(0)
return f(n) - h(n, n - 1)
return b
a = EulerInvTransform(A005043)
print([a(n) for n in range(33)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Nov 20 2022
STATUS
approved
Inverse binomial transform of A005043.
+20
17
1, -1, 2, -3, 6, -10, 20, -35, 70, -126, 252, -462, 924, -1716, 3432, -6435, 12870, -24310, 48620, -92378, 184756, -352716, 705432, -1352078, 2704156, -5200300, 10400600, -20058300, 40116600, -77558760, 155117520, -300540195, 601080390, -1166803110
OFFSET
0,3
COMMENTS
Successive binomial transforms are A005043, A000108, A007317, A064613, A104455.
Hankel transform is A000012.
Moment sequence of the trace of the square of a random matrix in USp(2)=SU(2). If X=tr(A^2) is a random variable (a distributed with Haar measure) then a(n) = E[X^n]. - Andrew V. Sutherland, Feb 29 2008
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Mobius) transformation P(x,t) = x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); an o.g.f. of the Catalan numbers A000108, C(x) = [1-sqrt(1-4x)]/2; and its inverse Cinv(x) = x*(1-x). The Motzkin sums, or Riordan numbers, A005043 are generated by Mot(x)=C[P(x,1)]. One could, of course, choose the Riordan numbers as the parent sequence.
O.g.f.: G(x) = C[P[P(x,1),1]1] = C[P(x,2)] = (1-sqrt(1-4*x/(1+2*x)))/2 = x - x^2 + 2 x^3 - ... = Mot[P(x,1)].
Ginv(x) = Pinv[Cinv(x),2] = P[Cinv(x),-2] = x(1-x)/[1-2x(1-x)] = (x-x^2)/[1-2(x-x^2)] = x*A146559(x).
Cf. A091867 and A210736 for an unsigned version with a leading 1. (End)
LINKS
Francesc Fite, Kiran S. Kedlaya, Victor Rotger and Andrew V. Sutherland, Sato-Tate distributions and Galois endomorphism modules in genus 2, arXiv preprint arXiv:1110.6638 [math.NT], 2011-2012.
Kiran S. Kedlaya and Andrew V. Sutherland, Hyperelliptic curves, L-polynomials and random matrices, arXiv:0803.4462 [math.NT], 2008-2010.
Paveł Szabłowski, Beta distributions whose moment sequences are related to integer sequences listed in the OEIS, Contrib. Disc. Math. , Vol. 19, No. 4 (2024), 85-109. See p. 100.
FORMULA
a(n) = (-1)^n*C(n, floor(n/2)) = (-1)^n*A001405(n).
a(2*n) = A000984(n), a(2*n+1) = -A001700(n).
a(n) = (1/Pi)*Integral_{t=0..Pi}(2cos(2t))^n*2sin^2(t) dt. - Andrew V. Sutherland, Feb 29 2008, Mar 09 2008
a(n) = (-2)^n + Sum_{k=0..n-1} a(k)*a(n-1-k), a(0)=1. - Philippe Deléham, Dec 12 2009
G.f.: (1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x)). - Philippe Deléham, Mar 01 2013
O.g.f.: (1 + x*c(x^2))/(1 + 2*x), with the o.g.f. c(x) for the Catalan numbers A000108. From the o.g.f. of the Riordan type Catalan triangle A053121. This is the rewritten g.f. given in the previous formula. This is G(-x) with the o.g.f. G(x) of A001405. - Wolfdieter Lang, Sep 22 2013
D-finite with recurrence (n+1)*a(n) + 2*a(n-1) + 4*(-n+1)*a(n-2) = 0. - R. J. Mathar, Dec 04 2013
Recurrence (an alternative): (n+1)*a(n) = 8*(n-2)*a(n-3) + 4*(n-2)*a(n-2) + 2*(-n-1)*a(n-1), n>=3. - Fung Lam, Mar 22 2014
Asymptotics: a(n) ~ (-1)^n*2^(n+1/2)/sqrt(n*Pi). - Fung Lam, Mar 22 2014
E.g.f.: BesselI(0,2*x) - BesselI(1,2*x). - Peter Luschny, Dec 17 2014
a(n) = 2^n*hypergeom([3/2,-n], [2], 2). - Vladimir Reshetnikov, Nov 02 2015
G.f. A(x) satisfies: A(x) = 1/(1 + 2*x) + x*A(x)^2. - Ilya Gutkovskiy, Jul 10 2020
Sum_{n>=0} 1/a(n) = 2/3 - 2*Pi/(9*sqrt(3)). - Amiram Eldar, Oct 04 2025
MAPLE
egf := BesselI(0, 2*x) - BesselI(1, 2*x):
seq(n!*coeff(series(egf, x, 34), x, n), n=0..33); # Peter Luschny, Dec 17 2014
MATHEMATICA
CoefficientList[Series[(1 + 2 x - Sqrt[1 - 4 x^2])/(2 x (1 + 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 23 2013 *)
Table[2^n Hypergeometric2F1[3/2, -n, 2, 2], {n, 0, 20}] (* Vladimir Reshetnikov, Nov 02 2015 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((1+2*x-sqrt(1-4*x^2))/(2*x*(1+2*x))) \\ Altug Alkan, Nov 03 2015
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Mar 17 2007
STATUS
approved
Bisection of Motzkin sums (A005043).
+20
8
1, 1, 3, 15, 91, 603, 4213, 30537, 227475, 1730787, 13393689, 105089229, 834086421, 6684761125, 54022715451, 439742222071, 3602118427251, 29671013856627, 245613376802185, 2042162142208813, 17047255430494497, 142816973618414817
OFFSET
0,3
COMMENTS
The Kn4 triangle sums of A175136 lead to the sequence given above (n >= 1). For the definition of the Kn4 and other triangle sums see A180662. - Johannes W. Meijer, May 06 2011
Equals the expected value of trace(O)^(2n), where O is a 3 X 3 orthogonal matrix randomly selected according to Haar measure (see MathOverflow link). - Nathaniel Johnston, Sep 05 2014
From Petros Hadjicostas, Jul 23 2020: (Start)
In Smith (1985), we apparently have a(n) = P(2*n), where P(n) is the number of linearly independent three-dimensional n-th order isotropic tensors. In the paper, he refers to Smith (1968) for more details. It is not clear why he does not list the values of P(2*n+1). See also the 1978 letter of D. L. Andrews to N. J. A. Sloane.
Eric Weisstein gives some details on how the material in Smith (1968) about isotropic tensors is related to Motzkin sums. (End)
REFERENCES
G. F. Smith, On isotropic tensors and rotation tensors of dimension m and order n, Tensor (N.S.), Vol. 19 (1968), 79-88 (MR0224008).
LINKS
David L. Andrews, Letter to N. J. A. Sloane, Apr 10 1978.
Hacène Belbachir and José Ricardo G. Mendonça, Bounded compositions and products of chains, or bi(s)nomials everywhere from de Moivre's formula to spin multiplicities and constant-sum codes, arXiv:2610.31865 [math.CO], 2026. See p. 16 (Table 4).
Georgia Benkart and A. Elduque, Cross products, invariants, and centralizers, arXiv:1606.07588 [math.RT], 2016.
Guo-Niu Han, Enumeration of Standard Puzzles, 2011. [Cached copy]
Guo-Niu Han, Enumeration of Standard Puzzles, arXiv:2006.14070 [math.CO], 2020.
G. F. Smith, Lectures on constitutive expressions, Mathematical models and methods in mechanics, pp. 645-678, Banach Center Publ., 15, PWN, Warsaw, 1985 (MR0874855). See p. 653.
Eric Weisstein's World of Mathematics, Isotropic tensor.
FORMULA
Recurrence: n*(2*n + 1)*a(n) = (2*n - 1)*(13*n - 10)*a(n-1) - 3*(26*n^2 - 87*n + 76)*a(n-2) + 27*(n - 2)*(2*n - 5)*a(n-3). - Vaclav Kotesovec, Oct 17 2012
a(n) ~ 3^(2*n + 3/2)/(16*sqrt(2*Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 17 2012
Conjecture: a(n) = (2/Pi)*Integral_{t=0..1} sqrt((1 - t)/t)*(1 - 8*t + 16*t^2)^n. - Benedict W. J. Irwin, Oct 05 2016
a(n) = Sum_{j=0..2*n+1} (C(2*j,j)*(-1)^(j)*C(2*n+1,j+1))/(2*n+1). - Vladimir Kruchinin, Apr 02 2017
a(n) = hypergeom([1/2, -2*n], [2], 4). - Peter Luschny, Jul 25 2020
Irwin's conjecture is true (see Fried link). - Sela Fried, Mar 15 2026
MAPLE
G := (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x)): Gser := series(G, x=0, 60):
1, seq(coeff(Gser, x^(2*n)), n=1..25); # Emeric Deutsch
a := n -> hypergeom([1/2, -2*n], [2], 4):
seq(simplify(a(n)), n=0..21); # Peter Luschny, Jul 25 2020
MATHEMATICA
Take[CoefficientList[Series[(1 + x - Sqrt[1 - 2 * x - 3 * x^2])/(2 * x * (1 + x)), {x, 0, 60}], x], {1, -1, 2}] (* Vaclav Kotesovec, Oct 17 2012 *)
PROG
(PARI) x='x+O('x^66); v=Vec((1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x))); vector(#v\2, n, v[2*n-1]) \\ Joerg Arndt, May 12 2013
(Maxima)
a(n):=sum(binomial(2*j, j)*(-1)^(j)*binomial(2*n+1, j+1), j, 0, 2*n+1)/(2*n+1); /*Vladimir Kruchinin, Apr 02 2017*/
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Nov 16 2004
EXTENSIONS
More terms from Emeric Deutsch, Nov 18 2004
STATUS
approved
Numbers k such that the k-th standard ordered rooted tree is lone-child-avoiding (counted by A005043).
+20
8
1, 4, 8, 16, 18, 25, 32, 36, 50, 57, 64, 72, 100, 114, 121, 128, 137, 144, 200, 228, 242, 249, 256, 258, 274, 281, 288, 385, 393, 400, 456, 484, 498, 505, 512, 516, 548, 562, 569, 576, 770, 786, 793, 800, 897, 905, 912, 968, 996, 1010, 1017, 1024, 1032, 1096
OFFSET
1,2
COMMENTS
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.
EXAMPLE
The initial terms and their corresponding trees:
1: o
4: (oo)
8: (ooo)
16: (oooo)
18: ((oo)o)
25: (o(oo))
32: (ooooo)
36: ((oo)oo)
50: (o(oo)o)
57: (oo(oo))
64: (oooooo)
72: ((oo)ooo)
100: (o(oo)oo)
114: (oo(oo)o)
121: (ooo(oo))
128: (ooooooo)
137: ((oo)(oo))
144: ((oo)oooo)
200: (o(oo)ooo)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
srt[n_]:=If[n==1, {}, srt/@stc[n-1]];
Select[Range[100], FreeQ[srt[#], _[__]?(Length[#]==1&)]&]
CROSSREFS
These trees are counted by A005043.
The series-reduced case appears to be counted by A284778.
The unordered version is A291636, counted by A001678.
A000081 counts unlabeled rooted trees, ranked by A358378.
A358371 and A358372 count leaves and nodes in standard ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 14 2022
STATUS
approved
Triangle (read by rows) with row sums = Motzkin sums (also called Riordan numbers) (A005043): T(n,s) = (1/n)*C(n,s)*(C(n-s,s+1) - C(n-s-2,s-1)).
+20
7
1, 1, 2, 1, 5, 1, 9, 5, 1, 14, 21, 1, 20, 56, 14, 1, 27, 120, 84, 1, 35, 225, 300, 42, 1, 44, 385, 825, 330, 1, 54, 616, 1925, 1485, 132, 1, 65, 936, 4004, 5005, 1287, 1, 77, 1365, 7644, 14014, 7007, 429
OFFSET
3,3
COMMENTS
Whereas A005043 counts certain trees, or noncrossed partitions, this subdivides the counts according to the number of leaves, or the lattice rank. Analogous to the Narayana triangle (A001263), where rows sum to the Catalan numbers.
Diagonals of A132081 are rows of A033282. - Tom Copeland, May 08 2012
Related to the number of certain non-crossing partitions for the root system A_n. Cf. p. 12, Athanasiadis and Savvidou. See also A108263 and A100754. - Tom Copeland, Oct 19 2014
LINKS
Per Alexandersson and Leonardo Saud Maia Leite, Peaks and peak-nestings on unit interval graphs, arXiv:2609.38084 [math.CO], 2026. See p. 34.
Christos A. Athanasiadis and Christina Savvidou, The local h-vector of the cluster subdivision of a simplex, arXiv preprint arXiv:1204.0362 [math.CO], 2012.
Frank R. Bernhart, Catalan, Motzkin and Riordan numbers, Discr. Math. 204 (1999), 73-112.
Frank R. Bernhart and N. J. A. Sloane, Emails, April-May 1994.
Tom Copeland, Generators, Inversion, and Matrix, Binomial, and Integral Transforms, Shadows of Simplicity (blog), 2015.
FORMULA
a(n,k) = binomial(n,k)*binomial(n-2-k,k)/(k+1). - David Callan, Jul 22 2008
From Peter Bala, Oct 22 2008: (Start)
O.g.f.: (1 + x - sqrt(1 - 2*x + x^2*(1 - 4*a)))/(2*x*(1 + a*x)) = 1 + a*x^2 + a*x^3 + (a + 2*a^2)*x^4 + (a + 5*a^2)*x^5 + (a + 9*a^2 + 5*a^3)*x^6 + ... . [corrected by Jason Yuen, Sep 22 2024]
Define a functional I on formal power series of the form f(x) = 1 + a*x + b*x^2 + ... by the following iterative process. Define inductively f^(1)(x) = f(x) and f^(n+1)(x) = f(x*f^(n)(x)) for n >= 1. Then set I(f(x)) = lim n -> infinity f^(n)(x) in the x-adic topology on the ring of formal power series; the operator I may also be defined by I(f(x)) := 1/x*series reversion of x/f(x).
Let now f(x) = 1 + a*x^2 + a*x^3 + a*x^4 + ... . Then the o.g.f. for this table is I(f(x)) = 1 + a*x^2 + a*x^3 + (a + 2*a^2)*x^4 + (a + 5*a^2)*x^5 + (a + 9*a^2 + 5*a^3)*x^6 + ... . Cf. A001263 and A108767. (End)
EXAMPLE
A005043(6) = 15 = 1+9+5 since NC (noncrossed, planar) partitions of 6-point cycle without singletons have 1,9,5 items with 1,2,3 blocks.
Triangle begins:
1;
1, 2;
1, 5;
1, 9, 5;
1, 14, 21;
1, 20, 56, 14;
1, 27, 120, 84;
1, 35, 225, 300, 42;
1, 44, 385, 825, 330;
...
MATHEMATICA
Map[Most, Table[(1/n) Binomial[n, s] (Binomial[n - s, s + 1] - Binomial[n - s - 2, s - 1]), {n, 3, 14}, {s, 0, n}] /. k_ /; k <= 0 -> Nothing] // Flatten (* Michael De Vlieger, Jan 09 2016 *)
PROG
(Magma) /* triangle excluding 0 */ [[Binomial(n, k)*Binomial(n-2-k, k)/(k+1): k in [0..n-3]]: n in [3..15]]; // Vincenzo Librandi, Oct 19 2014
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Frank R. Bernhart (farb45(AT)gmail.com), Oct 30 2007
EXTENSIONS
Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar
Name corrected by Emeric Deutsch, Dec 20 2014
STATUS
approved
Bisection of A005043.
+20
3
0, 1, 6, 36, 232, 1585, 11298, 83097, 625992, 4805595, 37458330, 295673994, 2358641376, 18985057351, 154000562758, 1257643249140, 10331450919456, 85317692667643, 707854577312178, 5897493615536452, 49320944483427000, 413887836110423787, 3484084625456932134, 29412628894558563849
OFFSET
0,3
REFERENCES
G. F. Smith, On isotropic tensors and rotation tensors of dimension m and order n, Tensor (N.S.), Vol. 19 (1968), 79-88 (MR0224008).
LINKS
D. L. Andrews, Letter to N. J. A. Sloane, Apr 10 1978.
FORMULA
Recurrence: (n+1)*(2*n+1)*a(n) = n*(26*n-7)*a(n-1) - 3*(26*n^2 - 61*n + 39)*a(n-2) + 27*(n-2)*(2*n-3)*a(n-3). - Vaclav Kotesovec, Oct 17 2012
a(n) ~ 3^(2*n+5/2)/(16*sqrt(2*Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 17 2012
a(n) = -hypergeom([-2*n - 1, 1/2], [2], 4). - Peter Luschny, Jul 26 2020
MAPLE
G := (1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x)): Gser := series(G, x=0, 60):
seq(coeff(Gser, x^(2*n-1)), n=1..25); # Emeric Deutsch
a := n -> -hypergeom([-2*n-1, 1/2], [2], 4):
seq(simplify(a(n)), n=0..23); # Peter Luschny, Jul 26 2020
MATHEMATICA
Take[CoefficientList[Series[(1+x-Sqrt[1-2*x-3*x^2])/(2*x*(1+x)), {x, 0, 60}], x], {2, -1, 2}] (* Vaclav Kotesovec, Oct 17 2012 *)
PROG
(PARI) x='x+O('x^66); v=Vec((1+x-sqrt(1-2*x-3*x^2))/(2*x*(1+x))); vector(#v\2, n, v[2*n]) \\ Joerg Arndt, May 12 2013
(SageMath)
def A():
a, b, c, d, n = 0, 1, 1, -1, 1
yield 0
while True:
n += 1
a, b = b, (3*(n-1)*n*a+(2*n-1)*n*b)//((n+1)*(n-1))
c, d = d, (3*(n-1)*c-(2*n-1)*d)//n
if n%2: yield -(d + b)*(1-(-1)^n)//2
A099252 = A()
print([next(A099252) for _ in range(24)]) # Peter Luschny, May 16 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 16 2004
EXTENSIONS
More terms from Emeric Deutsch, Nov 18 2004
STATUS
approved
Riordan array ( 1/(1-x), x*A005043(x) ).
+20
3
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 1, 6, 5, 4, 1, 1, 1, 12, 12, 7, 5, 1, 1, 1, 27, 26, 19, 9, 6, 1, 1, 1, 63, 63, 43, 27, 11, 7, 1, 1, 1, 154, 153, 110, 63, 36, 13, 8, 1, 1, 1, 386, 386, 275, 169, 86, 46, 15, 9, 1, 1
OFFSET
0,8
FORMULA
R(n,k) = k*Sum_{i=0..(n-k)} (Sum_{j=k..(n-i)} binomial(2*j-k-1,j-1) *(-1)^(n-j-i) *binomial(n-i,j))/(n-i), k>0.
R(n,0)=1.
EXAMPLE
Array begins:
1;
1, 1;
1, 1, 1;
1, 2, 1, 1;
1, 3, 3, 1, 1;
1, 6, 5, 4, 1, 1;
1, 12, 12, 7, 5, 1, 1;
1, 27, 26, 19, 9, 6, 1, 1;
MAPLE
A185812 := proc(n, k) if n = k or k =0 then 1; else k*add(1/(n-i)*add(binomial(2*j-k-1, j-1) *(-1)^(n-j-i) *binomial(n-i, j), j=k..n-i), i=0..n-k) ; end if; end proc:
seq(seq(A185812(n, k), k=0..n), n=0..15) ; # R. J. Mathar, Feb 10 2011
MATHEMATICA
r[n_, k_] := k*Sum[Binomial[2*j - k - 1, j - 1]*(-1)^(n - j - i)*Binomial[n - i, j]/(n - i), {i, 0, n - k}, {j, k, n - i}]; r[n_, 0] = 1; Table[r[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 21 2013 *)
CROSSREFS
Cf. A082395, apparently R(n,1), A097332 (row sums). - R. J. Mathar, Feb 10 2011
KEYWORD
nonn,tabl
AUTHOR
Vladimir Kruchinin, Feb 05 2011
STATUS
approved
a(n) = A194588(n) - A005043(n); complementary Riordan numbers.
+20
3
0, 0, 1, 1, 5, 11, 34, 92, 265, 751, 2156, 6194, 17874, 51702, 149941, 435749, 1268761, 3700391, 10808548, 31613474, 92577784, 271407896, 796484503, 2339561795, 6877992334, 20236257626, 59581937299, 175546527727, 517538571125, 1526679067331, 4505996000730
OFFSET
0,5
COMMENTS
The inverse binomial transform of a(n) is A194590(n).
FORMULA
a(n) = Sum_{k=0..n} C(n,k)*A194590(k).
a(n) = (n mod 2)+(1/2)*Sum_{k=1..n} (-1)^k*C(n,k)*(k+1)$*((k+1)/2)^(k mod 2). Here n$ denotes the swinging factorial A056040(n).
a(n) = PSUMSIGN([0,0,1,2,6,16,45,..] = PSUMSIGN([0,0,A005717]) where PSUMSIGN is from Sloane's "Transformations of integer sequences". - Peter Luschny, Jan 17 2012
A(x) = B'(x)*(1/x^2-1/(B(x)*x)), where B(x)/x is g.f. of A005043. - Vladimir Kruchinin, Sep 28 2015
a(n) = Sum_{k=0..n/2} C(n+2,k)*C(n-k,k). - Vladimir Kruchinin, Sep 28 2015
a(n) = hypergeom([1-n/2,-n,3/2-n/2],[1,2-n],4) for n>=3. - Peter Luschny, Mar 07 2017
a(n) ~ 3^(n + 1/2) / (8*sqrt(Pi*n)). - Vaclav Kotesovec, Feb 17 2024
MAPLE
A056040 := n -> n!/iquo(n, 2)!^2:
A057977 := n -> A056040(n)/(iquo(n, 2)+1);
A001006 := n -> add(binomial(n, k)*A057977(k)*irem(k+1, 2), k=0..n):
A005043 := n -> `if`(n=0, 1, A001006(n-1)-A005043(n-1)):
A189912 := n -> add(binomial(n, k)*A057977(k), k=0..n):
A194588 := n -> `if`(n=0, 1, A189912(n-1)-A194588(n-1)):
A194589 := n -> A194588(n)-A005043(n):
# Alternative: more efficient:
A100071 := n -> A056040(n)*(n/2)^(n-1 mod 2):
A194589 := proc(n) local k;
(n mod 2)+(1/2)*add((-1)^k*binomial(n, k)*A100071(k+1), k=1..n) end:
# Alternative:
a := n -> `if`(n<3, iquo(n, 2), hypergeom([1-n/2, -n, 3/2-n/2], [1, 2-n], 4)): seq(simplify(a(n)), n=0..30); # Peter Luschny, Mar 07 2017
MATHEMATICA
sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Mod[n, 2] + (1/2)*Sum[(-1)^k*Binomial[n, k]*2^-Mod[k, 2]*(k+1)^Mod[k, 2]*sf[k+1], {k, 1, n}]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Jul 30 2013, from 2nd method *)
Table[If[n < 3, Quotient[n, 2], HypergeometricPFQ[{1 - n/2, -n, 3/2 - n/2}, {1, 2-n}, 4]], {n, 0, 30}] (* Peter Luschny, Mar 07 2017 *)
PROG
(Maxima)
a(n):=sum(binomial(n+2, k)*binomial(n-k, k), k, 0, (n)/2); /* Vladimir Kruchinin, Sep 28 2015 */
(PARI) a(n) = sum(k=0, n/2, binomial(n+2, k)*binomial(n-k, k));
vector(30, n, a(n-3)) \\ Altug Alkan, Sep 28 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Aug 30 2011
STATUS
approved
Triangle read by rows: T(n,k) = binomial(n,k)*r(k), where r(k) are the Riordan numbers (r(k) = A005043(k); 0 <= k <= n).
+20
2
1, 1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 6, 4, 3, 1, 0, 10, 10, 15, 6, 1, 0, 15, 20, 45, 36, 15, 1, 0, 21, 35, 105, 126, 105, 36, 1, 0, 28, 56, 210, 336, 420, 288, 91, 1, 0, 36, 84, 378, 756, 1260, 1296, 819, 232, 1, 0, 45, 120, 630, 1512, 3150, 4320, 4095, 2320, 603
OFFSET
0,9
COMMENTS
Row sums = Catalan numbers, A000108: (1, 1, 2, 5, 14, 42...); e.g., sum of row 4 terms = A000108(4) = 14 = (1 + 0 + 6 + 4 + 3). A005043 is the inverse binomial transform of the Catalan numbers.
EXAMPLE
First few rows of the triangle:
1;
1, 0;
1, 0, 1;
1, 0, 3, 1;
1, 0, 6, 4, 3;
1, 0, 10, 10, 15, 6;
1, 0, 15, 20, 45, 36, 15;
...
MAPLE
r:=n->(1/(n+1))*sum((-1)^i*binomial(n+1, i)*binomial(2*n-2*i, n-i), i=0..n): T:=(n, k)->r(k)*binomial(n, k): for n from 0 to 12 do seq(T(n, k), k=0..n) od; # yields sequence in triangular form
MATHEMATICA
T[n_, k_]:= T[n, k]= Binomial[n, k]*Sum[(-1)^j*Binomial[k+1, j]* Binomial[2*(k-j), k-j], {j, 0, k}]/(k+1); Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 19 2019 *)
PROG
(PARI) T(n, k) = b=binomial; b(n, k)*sum(j=0, k, (-1)^j*b(k+1, j)*b(2*(k-j), k-j))/(k+1); \\ G. C. Greubel, Nov 19 2019
(Magma) B:=Binomial; [B(n, k)*(&+[(-1)^j*B(k+1, j)*B(2*(k-j), k-j): j in [0..k]])/(k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 19 2019
(SageMath) b=binomial; [[b(n, k)*sum((-1)^j*b(k+1, j)*b(2*(k-j), k-j) for j in (0..k))/(k+1) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 19 2019
(GAP) B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> B(n, k)* Sum([0..k], j-> (-1)^j*B(k+1, j)*B(2*(k-j), k-j))/(k+1) ))); # G. C. Greubel, Nov 19 2019
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Nov 12 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 29 2006
STATUS
approved
a(n) = Sum_{j=0..n} binomial(n, j) * A005043(j)^2.
+20
2
1, 1, 2, 5, 20, 102, 612, 3999, 27680, 199700, 1488392, 11390062, 89102224, 710137300, 5750979288, 47224773405, 392536909320, 3298058212320, 27976268700480, 239354631743268, 2063696517194016, 17917829988706056, 156562239801890352, 1375981317571505910, 12157754181729121176
OFFSET
0,3
FORMULA
a(n) = A397603(n, 0).
a(n) ~ 2^(n-3) * 5^(n+3) / (27*Pi*n^3). - Vaclav Kotesovec, Jul 05 2026
MAPLE
a := n -> local j; add(binomial(n, j) * simplify(hypergeom([-j, 1/2], [2], 4))^2, j = 0..n): seq(a(n), n = 0..24);
PROG
(Python)
def gen():
a, b, n, m = 1, 0, 0, 1
row = []
while True:
row.append(m * m)
for k in range(n, 0, -1): row[k - 1] += row[k]
yield row[0]
m = n * (2 * b + 3 * a) // (n + 2)
a, b = (a, b) if n == 0 else (b, m)
n += 1
A397419 = gen()
print([next(A397419) for _ in range(25)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 02 2026
STATUS
approved

Search completed in 0.003 seconds