Displaying 1-10 of 143 results found.
page
1
2
3
4
5
6
7
8
9
10
... 15
Triangle interpolating the swinging factorial ( A056040) restricted to odd indices with its binomial transform. Same as interpolating the beta numbers 1/beta(n,n) ( A002457) with ( A163869).
+20
5
1, 7, 6, 43, 36, 30, 249, 206, 170, 140, 1395, 1146, 940, 770, 630, 7653, 6258, 5112, 4172, 3402, 2772, 41381, 33728, 27470, 22358, 18186, 14784, 12012, 221399, 180018, 146290, 118820, 96462, 78276, 63492
COMMENTS
Triangle read by rows. For n >= 0, k >= 0 let
T(n,k) = sum{i=k..n} binomial(n-k,n-i)*(2i+1)$
where i$ denotes the swinging factorial of i ( A056040).
EXAMPLE
1
7, 6
43, 36, 30
249, 206, 170, 140
1395, 1146, 940, 770, 630
7653, 6258, 5112, 4172, 3402, 2772
41381, 33728, 27470, 22358, 18186, 14784, 12012
MAPLE
Computes n rows of the triangle. For the functions 'SumTria' and 'swing' see A163840.
a := n -> SumTria(k->swing(2*k+1), n, true);
MATHEMATICA
sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[Binomial[n-k, n-i]*sf[2*i+1], {i, k, n}]; Table[t[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)
1, 6, 36, 236, 1686, 13028, 108078, 956348, 8976708, 88962160, 927129786, 10125636716, 115543526476, 1373933166848, 16985192456410, 217851008508220, 2893517713599370, 39732264695056772, 563187218351672330, 8229159647194683140, 123795221970087313340
FORMULA
a(n) = sum(stirling2(n, k)*(2*k + 2)!/(2*k!*(k + 1)!), k = 0..n), n = 0, 1, ...;
E.g.f.: exp(2*exp(x) - 2)*(BesselI(0, 2*exp(x) - 2) + 4*BesselI(0, 2*exp(x) - 2)*(exp(x) - 1) + 4*(exp(x) - 1)*BesselI(1, 2*exp(x) - 2)).
MAPLE
b:= proc(n, m) option remember; `if`(n=0,
(2*m+1)!/m!^2, m*b(n-1, m)+b(n-1, m+1))
end:
a:= n-> b(n, 0):
MATHEMATICA
Table[Sum[StirlingS2[n, k]*(2*k+2)!/(2*k!*(k+1)!), {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Jul 01 2018 *)
Binomial transform of the beta numbers 1/beta(n+1,n+1) ( A002457).
+20
2
1, 7, 43, 249, 1395, 7653, 41381, 221399, 1175027, 6196725, 32512401, 169863147, 884318973, 4589954619, 23761814955, 122735222505, 632698778835, 3255832730565, 16728131746145, 85826852897675, 439793834236745, 2251006269442815, 11509340056410735, 58790764269668805
COMMENTS
Also a(n) = Sum_{i=0..n} binomial(n,n-i) (2*i+1)$ where i$ denotes the swinging factorial of i ( A056040).
FORMULA
G.f.: -sqrt(x-1)/(5*x-1)^(3/2).
Recurrence: n*a(n) = (6*n+1)*a(n-1) - 5*(n-1)*a(n-2).
a(n) ~ 4*5^(n-1/2)*sqrt(n)/sqrt(Pi).
(End)
a(n) = hypergeom([3/2, -n], [1], -4) = hypergeom([3/2, n+1], [1], 4/5)/(5*sqrt(5)). - Vladimir Reshetnikov, Apr 25 2016
E.g.f.: exp(3*x) * ((1 + 4*x) * BesselI(0,2*x) + 4 * x * BesselI(1,2*x)). - Ilya Gutkovskiy, Nov 19 2021
MAPLE
a := proc(n) local i; add(binomial(n, i)/Beta(i+1, i+1), i=0..n) end:
MATHEMATICA
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 *)
Inverse binomial transform of the beta numbers 1/beta(n+1,n+1) ( A002457).
+20
2
1, 5, 19, 67, 227, 751, 2445, 7869, 25107, 79567, 250793, 786985, 2460397, 7667921, 23832931, 73902627, 228692115, 706407903, 2178511449, 6708684009, 20632428249, 63380014845, 194486530791, 596213956023, 1826103432573, 5588435470401, 17089296473655
COMMENTS
Also a(n) = sum {i=0..n} (-1)^(n-i) binomial(n,n-i) (2*i+1)$ where i$ denotes the swinging factorial of i ( A056040).
FORMULA
O.g.f.: A(x)=1/(1-x*M(x))^3, M(x) - o.g.f. of A001006. a(n) = sum(k^3/n *sum(C(n,j)*C(j,2*j-n-k), j=0..n), k=1..n). - Vladimir Kruchinin, Sep 06 2010
Recurrence: n*a(n) = (2*n+3)*a(n-1) + 3*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 21 2012
a(n) = (-1)^n*hypergeom([-n,3/2], [1], 4). - Peter Luschny, Apr 26 2016
MAPLE
a := proc(n) local i; add((-1)^(n-i)*binomial(n, i)/Beta(i+1, i+1), i=0..n) end:
seq(simplify((-1)^n*hypergeom([-n, 3/2], [1], 4)), n=0..26); # Peter Luschny, Apr 26 2016
MATHEMATICA
CoefficientList[Series[Sqrt[x+1]/(1-3*x)^(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[(-1)^(n-i)*Binomial[n, n-i]*sf[2*i+1], {i, 0, n}]; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Jul 26 2013 *)
1, 1, 3, 27, 756, 68040, 20207880, 20228087880, 69422797604160, 828491666608045440, 34788365080871828025600, 5191328567558179408948185600, 2776779354844059467693477099212800, 5363460395055494624228658756213491712000
COMMENTS
a(n) is the determinant of the symmetric matrix (if(j<=floor((i+j)/2), A000108(j+1), A000108(i+1)))_{0<=i,j<=n}.
FORMULA
a(n) = Product_{k=0..(n-1)} 3(k+1)* A000108(k+1)/(k+3).
a(n) = Product_{k=0..(n-1)} A000245(k+1).
a(n) = (A^(3/2) 2^(n(n+1))*2^(23/24)*3^n*Pi^(-1/4-n/2)*G(n+3/2)*Gamma(n+1)) /(e^(1/8)*G(n+4)), where G is Barnes G-function, and A is the Glaisher-Kinkelin constant ( A074962) (reported by Wolfram Alpha).
a(n) ~ A^(3/2) * 2^(n^2+n+5/24) * 3^n * exp(3*n/2-1/8) / (n^(3*n/2+31/8) * Pi^(n/2+1)), where A = 1.2824271291... is the Glaisher-Kinkelin constant (see A074962). - Vaclav Kotesovec, Nov 14 2014
MATHEMATICA
Table[Product[3*(2*k+2)!/((k+3)!*k!), {k, 0, n-1}], {n, 0, 10}] (* Vaclav Kotesovec, Nov 14 2014 *)
Triangle interpolating between (-1)^n ( A033999) and the swinging factorial function ( A056040) restricted to odd indices (2n+1)$ ( A002457).
+20
0
1, -1, 6, 1, -12, 30, -1, 18, -90, 140, 1, -24, 180, -560, 630, -1, 30, -300, 1400, -3150, 2772, 1, -36, 450, -2800, 9450, -16632, 12012, -1, 42, -630, 4900, -22050, 58212, -84084, 51480, 1, -48, 840, -7840, 44100, -155232, 336336, -411840, 218790
COMMENTS
Triangle read by rows.
For n >= 0, k >= 0 let T(n, k) = (-1)^(n-k) binomial(n,k) (2*k+1)$ where i$ denotes the swinging factorial of i ( A056040).
FORMULA
Conjectural g.f.: sqrt(1 + t)/(1 + (1 - 4*x)*t)^(3/2) = 1 + (-1 + 6*x)*t + (1 - 12*x + 30*x^2)*t^2 + .... - Peter Bala, Nov 10 2013
T(n, k) = ((-1)^(k mod 2) + n)*((2*k + 1)!/(k!)^2)*binomial(n, n - k). - Detlef Meya, Oct 07 2023
EXAMPLE
1;
-1, 6;
1, -12, 30;
-1, 18, -90, 140;
1, -24, 180, -560, 630;
-1, 30, -300, 1400, -3150, 2772;
1, -36, 450, -2800, 9450, -16632, 12012;
MAPLE
swing := proc(n) option remember; if n = 0 then 1 elif
irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
a := proc(n, k) (-1)^(n-k)*binomial(n, k)*swing(2*k+1) end:
seq(print(seq(a(n, k), k=0..n)), n=0..8);
MATHEMATICA
T[n_, k_] := ((-1)^(Mod[k, 2]+n)*((2*k+1)!/(k!)^2)*Binomial[n, n-k]);
Flatten[Table[T[n, k], {n, 0, 8}, {k, 0, n}]] (*End*)
CROSSREFS
Row sums are the inverse binomial transform of the beta numbers ( A163872).
Triangular numbers: a(n) = binomial(n+1,2) = n*(n+1)/2 = 0 + 1 + 2 + ... + n.
(Formerly M2535 N1002)
+10
4710
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431
COMMENTS
Also referred to as T(n) or C(n+1, 2) or binomial(n+1, 2) (preferred).
Also generalized hexagonal numbers: n*(2*n-1), n=0, +-1, +-2, +-3, ... Generalized k-gonal numbers are second k-gonal numbers and positive terms of k-gonal numbers interleaved, k >= 5. In this case k = 6. - Omar E. Pol, Sep 13 2011 and Aug 04 2012
Number of edges in complete graph of order n+1, K_{n+1}.
Number of legal ways to insert a pair of parentheses in a string of n letters. E.g., there are 6 ways for three letters: (a)bc, (ab)c, (abc), a(b)c, a(bc), ab(c). Proof: there are C(n+2,2) ways to choose where the parentheses might go, but n + 1 of them are illegal because the parentheses are adjacent. Cf. A002415.
For n >= 1, a(n) is also the genus of a nonsingular curve of degree n+2, such as the Fermat curve x^(n+2) + y^(n+2) = 1. - Ahmed Fares (ahmedfares(AT)my_deja.com), Feb 21 2001
From Harnack's theorem (1876), the number of branches of a nonsingular curve of order n is bounded by a(n-1)+1, and the bound can be achieved. See also A152947. - Benoit Cloitre, Aug 29 2002. Corrected by Robert McLachlan, Aug 19 2024
Number of tiles in the set of double-n dominoes. - Scott A. Brown, Sep 24 2002
Number of ways a chain of n non-identical links can be broken up. This is based on a similar problem in the field of proteomics: the number of ways a peptide of n amino acid residues can be broken up in a mass spectrometer. In general, each amino acid has a different mass, so AB and BC would have different masses. - James A. Raymond, Apr 08 2003
Triangular numbers - odd numbers = shifted triangular numbers; 1, 3, 6, 10, 15, 21, ... - 1, 3, 5, 7, 9, 11, ... = 0, 0, 1, 3, 6, 10, ... - Xavier Acloque, Oct 31 2003 [Corrected by Derek Orr, May 05 2015]
Centered polygonal numbers are the result of [number of sides * A000217 + 1]. E.g., centered pentagonal numbers (1,6,16,31,...) = 5 * (0,1,3,6,...) + 1. Centered heptagonal numbers (1,8,22,43,...) = 7 * (0,1,3,6,...) + 1. - Xavier Acloque, Oct 31 2003
Maximum number of lines formed by the intersection of n+1 planes. - Ron R. King, Mar 29 2004
Number of permutations of [n] which avoid the pattern 132 and have exactly 1 descent. - Mike Zabrocki, Aug 26 2004
Number of ternary words of length n-1 with subwords (0,1), (0,2) and (1,2) not allowed. - Olivier Gérard, Aug 28 2012
Number of ways two different numbers can be selected from the set {0,1,2,...,n} without repetition, or, number of ways two different numbers can be selected from the set {1,2,...,n} with repetition.
Conjecturally, 1, 6, 120 are the only numbers that are both triangular and factorial. - Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005
Binomial transform is {0, 1, 5, 18, 56, 160, 432, ...}, A001793 with one leading zero. - Philippe Deléham, Aug 02 2005
Each pair of neighboring terms adds to a perfect square. - Zak Seidov, Mar 21 2006
Number of transpositions in the symmetric group of n+1 letters, i.e., the number of permutations that leave all but two elements fixed. - Geoffrey Critzer, Jun 23 2006
With rho(n):=exp(i*2*Pi/n) (an n-th root of 1) one has, for n >= 1, rho(n)^a(n) = (-1)^(n+1). Just use the triviality a(2*k+1) == 0 (mod (2*k+1)) and a(2*k) == k (mod (2*k)).
a(n) is the number of terms in the expansion of (a_1 + a_2 + a_3)^(n-1). - Sergio Falcon, Feb 12 2007
a(n+1) is the number of terms in the complete homogeneous symmetric polynomial of degree n in 2 variables. - Richard Barnes, Sep 06 2017
Equal to the rank (minimal cardinality of a generating set) of the semigroup PT_n\S_n, where PT_n and S_n denote the partial transformation semigroup and symmetric group on [n]. - James East, May 03 2007
a(n) gives the total number of triangles found when cevians are drawn from a single vertex on a triangle to the side opposite that vertex, where n = the number of cevians drawn+1. For instance, with 1 cevian drawn, n = 1+1 = 2 and a(n)= 2*(2+1)/2 = 3 so there is a total of 3 triangles in the figure. If 2 cevians are drawn from one point to the opposite side, then n = 1+2 = 3 and a(n) = 3*(3+1)/2 = 6 so there is a total of 6 triangles in the figure. - Noah Priluck (npriluck(AT)gmail.com), Apr 30 2007
For n >= 1, a(n) is the number of ways in which n-1 can be written as a sum of three nonnegative integers if representations differing in the order of the terms are considered to be different. In other words, for n >= 1, a(n) is the number of nonnegative integral solutions of the equation x + y + z = n-1. - Amarnath Murthy, Apr 22 2001 (edited by Robert A. Beeler)
a(n) is the number of levels with energy n + 3/2 (in units of h*f0, with Planck's constant h and the oscillator frequency f0) of the three-dimensional isotropic harmonic quantum oscillator. See the comment by A. Murthy above: n = n1 + n2 + n3 with positive integers and ordered. Proof from the o.g.f. See the A. Messiah reference. - Wolfdieter Lang, Jun 29 2007
Numbers m >= 0 such that round(sqrt(2m+1)) - round(sqrt(2m)) = 1.
Numbers m >= 0 such that ceiling(2*sqrt(2m+1)) - 1 = 1 + floor(2*sqrt(2m)).
Numbers m >= 0 such that fract(sqrt(2m+1)) > 1/2 and fract(sqrt(2m)) < 1/2, where fract(x) is the fractional part of x (i.e., x - floor(x), x >= 0). (End)
If Y and Z are 3-blocks of an n-set X, then, for n >= 6, a(n-1) is the number of (n-2)-subsets of X intersecting both Y and Z. - Milan Janjic, Nov 09 2007
a(n) is also a perfect number A000396 if n is a Mersenne prime A000668, assuming there are no odd perfect numbers. - Omar E. Pol, Sep 05 2008
The number of matches played in a round robin tournament: n*(n-1)/2 gives the number of matches needed for n players. Everyone plays against everyone else exactly once. - Georg Wrede (georg(AT)iki.fi), Dec 18 2008
-a(n+1) = E(2)*binomial(n+2,2) (n >= 0) where E(n) are the Euler numbers in the enumeration A122045. Viewed this way, a(n) is the special case k=2 in the sequence of diagonals in the triangle A153641. - Peter Luschny, Jan 06 2009
Equivalent to the first differences of successive tetrahedral numbers. See A000292. - Jeremy Cahill (jcahill(AT)inbox.com), Apr 15 2009
The general formula for alternating sums of powers is in terms of the Swiss-Knife polynomials P(n,x) A153641 2^(-n-1)(P(n,1)-(-1)^k P(n,2k+1)). Thus a(k) = |2^(-3)(P(2,1)-(-1)^k P(2,2k+1))|. - Peter Luschny, Jul 12 2009
a(n) is the smallest number > a(n-1) such that gcd(n,a(n)) = gcd(n,a(n-1)). If n is odd this gcd is n; if n is even it is n/2. - Franklin T. Adams-Watters, Aug 06 2009
The numbers along the right edge of Floyd's triangle are 1, 3, 6, 10, 15, .... - Paul Muljadi, Jan 25 2010
More generally, a(2k+1) == j*(2j-1) (mod 2k+2j+1) and
a(2k) == [-k + 2j*(j-1)] (mod 2k+2j).
Column sums of:
1 3 5 7 9 ...
1 3 5 ...
1 ...
...............
---------------
1 3 6 10 15 ...
Sum_{n>=1} 1/a(n)^2 = 4*Pi^2/3-12 = 12 less than the volume of a sphere with radius Pi^(1/3).
(End)
1/a(n+1), n >= 0, has e.g.f. -2*(1+x-exp(x))/x^2, and o.g.f. 2*(x+(1-x)*log(1-x))/x^2 (see the Stephen Crowley formula line). -1/(2*a(n+1)) is the z-sequence for the Sheffer triangle of the coefficients of the Bernoulli polynomials A196838/ A196839. - Wolfdieter Lang, Oct 26 2011
(End)
Plot the three points (0,0), (a(n), a(n+1)), (a(n+1), a(n+2)) to form a triangle. The area will be a(n+1)/2. - J. M. Bergot, May 04 2012
The sum of four consecutive triangular numbers, beginning with a(n)=n*(n+1)/2, minus 2 is 2*(n+2)^2. a(n)*a(n+2)/2 = a(a(n+1)-1). - J. M. Bergot, May 17 2012
(a(n)*a(n+3) - a(n+1)*a(n+2))*(a(n+1)*a(n+4) - a(n+2)*a(n+3))/8 = a((n^2+5*n+4)/2). - J. M. Bergot, May 18 2012
a(n)*a(n+1) + a(n+2)*a(n+3) + 3 = a(n^2 + 4*n + 6). - J. M. Bergot, May 22 2012
In general, a(n)*a(n+1) + a(n+k)*a(n+k+1) + a(k-1)*a(k) = a(n^2 + (k+2)*n + k*(k+1)). - Charlie Marion, Sep 11 2012
a(n)*a(n+3) + a(n+1)*a(n+2) = a(n^2 + 4*n + 2). - J. M. Bergot, May 22 2012
In general, a(n)*a(n+k) + a(n+1)*a(n+k-1) = a(n^2 + (k+1)*n + k-1). - Charlie Marion, Sep 11 2012
a(n)*a(n+2) + a(n+1)*a(n+3) = a(n^2 + 4*n + 3). - J. M. Bergot, May 22 2012
Three points (a(n),a(n+1)), (a(n+1),a(n)) and (a(n+2),a(n+3)) form a triangle with area 4*a(n+1). - J. M. Bergot, May 23 2012
a(n) + a(n+k) = (n+k)^2 - (k^2 + (2n-1)*k -2n)/2. For k=1 we obtain a(n) + a(n+1) = (n+1)^2 (see below). - Charlie Marion, Oct 02 2012
In n-space we can define a(n-1) nontrivial orthogonal projections. For example, in 3-space there are a(2)=3 (namely point onto line, point onto plane, line onto plane). - Douglas Latimer, Dec 17 2012
For n >= 1, a(n) is equal to the rank (minimal cardinality of a generating set) and idempotent rank (minimal cardinality of an idempotent generating set) of the semigroup P_n\S_n, where P_n and S_n denote the partition monoid and symmetric group on [n].
For n >= 3, a(n-1) is equal to the rank and idempotent rank of the semigroup T_n\S_n, where T_n and S_n denote the full transformation semigroup and symmetric group on [n].
(End)
For n >= 3, a(n) is equal to the rank and idempotent rank of the semigroup PT_n\S_n, where PT_n and S_n denote the partial transformation semigroup and symmetric group on [n]. - James East, Jan 15 2013
The formula, a(n)*a(n+4k+2)/2 + a(k) = a(a(n+2k+1) - (k^2+(k+1)^2)), is a generalization of the formula a(n)*a(n+2)/2 = a(a(n+1)-1) in Bergot's comment dated May 17 2012. - Charlie Marion, Mar 28 2013
For odd m = 2k+1, we have the recurrence a(m*n + k) = m^2*a(n) + a(k). Corollary: If number T is in the sequence then so is 9*T+1. - Lekraj Beedassy, May 29 2013
Euler, in Section 87 of the Opera Postuma, shows that whenever T is a triangular number then 9*T + 1, 25*T + 3, 49*T + 6 and 81*T + 10 are also triangular numbers. In general, if T is a triangular number then (2*k + 1)^2*T + k*(k + 1)/2 is also a triangular number. - Peter Bala, Jan 05 2015
Using 1/b and 1/(b+2) will give a Pythagorean triangle with sides 2*b + 2, b^2 + 2*b, and b^2 + 2*b + 2. Set b=n-1 to give a triangle with sides of lengths 2*n,n^2-1, and n^2 + 1. One-fourth the perimeter = a(n) for n > 1. - J. M. Bergot, Jul 24 2013
a(n) = A028896(n)/6, where A028896(n) = s(n) - s(n-1) are the first differences of s(n) = n^3 + 3*n^2 + 2*n - 8. s(n) can be interpreted as the sum of the 12 edge lengths plus the sum of the 6 face areas plus the volume of an n X (n-1) X (n-2) rectangular prism. - J. M. Bergot, Aug 13 2013
Number of positive roots in the root system of type A_n (for n > 0). - Tom Edgar, Nov 05 2013
A formula for the r-th successive summation of k, for k = 1 to n, is binomial(n+r,r+1) [H. W. Gould]. - Gary Detlefs, Jan 02 2014
For n >= 3, a(n-2) is the number of permutations of 1,2,...,n with the distribution of up (1) - down (0) elements 0...011 (n-3 zeros), or, the same, a(n-2) is up-down coefficient {n,3} (see comment in A060351). - Vladimir Shevelev, Feb 14 2014
a(n) is the dimension of the vector space of symmetric n X n matrices. - Derek Orr, Mar 29 2014
Non-vanishing subdiagonal of A132440^2/2, aside from the initial zero. First subdiagonal of unsigned A238363. Cf. A130534 for relations to colored forests, disposition of flags on flagpoles, and colorings of the vertices of complete graphs. - Tom Copeland, Apr 05 2014
The number of Sidon subsets of {1,...,n+1} of size 2. - Carl Najafi, Apr 27 2014
Number of factors in the definition of the Vandermonde determinant V(x_1,x_2,...,x_n) = Product_{1 <= i < k <= n} x_i - x_k. - Tom Copeland, Apr 27 2014
Number of weak compositions of n into three parts. - Robert A. Beeler, May 20 2014
Suppose a bag contains a(n) red marbles and a(n+1) blue marbles, where a(n), a(n+1) are consecutive triangular numbers. Then, for n > 0, the probability of choosing two marbles at random and getting two red or two blue is 1/2. In general, for k > 2, let b(0) = 0, b(1) = 1 and, for n > 1, b(n) = (k-1)*b(n-1) - b(n-2) + 1. Suppose, for n > 0, a bag contains b(n) red marbles and b(n+1) blue marbles. Then the probability of choosing two marbles at random and getting two red or two blue is (k-1)/(k+1). See also A027941, A061278, A089817, A053142, A092521. - Charlie Marion, Nov 03 2014
Let O(n) be the oblong number n(n+1) = A002378 and S(n) the square number n^2 = A000290(n). Then a(4n) = O(3n) - O(n), a(4n+1) = S(3n+1) - S(n), a(4n+2) = S(3n+2) - S(n+1) and a(4n+3) = O(3n+2) - O(n). - Charlie Marion, Feb 21 2015
Consider the partition of the natural numbers into parts from the set S=(1,2,3,...,n). The length (order) of the signature of the resulting sequence is given by the triangular numbers. E.g., for n=10, the signature length is 55. - David Neil McGrath, May 05 2015
a(n) counts the partitions of (n-1) unlabeled objects into three (3) parts (labeled a,b,c), e.g., a(5)=15 for (n-1)=4. These are (aaaa),(bbbb),(cccc),(aaab),(aaac),(aabb),(aacc),(aabc),(abbc),(abcc),(abbb),(accc ),(bbcc),(bccc),(bbbc). - David Neil McGrath, May 21 2015
Conjecture: the sequence is the genus/deficiency of the sinusoidal spirals of index n which are algebraic curves. The value 0 corresponds to the case of the Bernoulli Lemniscate n=2. So the formula conjectured is (n-1)(n-2)/2. - Wolfgang Tintemann, Aug 02 2015
Conjecture: Let m be any positive integer. Then, for each n = 1,2,3,... the set {Sum_{k=s..t} 1/k^m: 1 <= s <= t <= n} has cardinality a(n) = n*(n+1)/2; in other words, all the sums Sum_{k=s..t} 1/k^m with 1 <= s <= t are pairwise distinct. (I have checked this conjecture via a computer and found no counterexample.) - Zhi-Wei Sun, Sep 09 2015
The Pisano period lengths of reading the sequence modulo m seem to be A022998(m). - R. J. Mathar, Nov 29 2015
For n >= 1, a(n) is the number of compositions of n+4 into n parts avoiding the part 2. - Milan Janjic, Jan 07 2016
In this sequence only 3 is prime. - Fabian Kopp, Jan 09 2016
Suppose you are playing Bulgarian Solitaire (see A242424 and Chamberland's and Gardner's books) and, for n > 0, you are starting with a single pile of a(n) cards. Then the number of operations needed to reach the fixed state {n, n-1,...,1} is a(n-1). For example, {6}->{5,1}->{4,2}->{3,2,1}. - Charlie Marion, Jan 14 2016
Every perfect cube is the difference of the squares of two consecutive triangular numbers. 1^2-0^2 = 1^3, 3^2-1^2 = 2^3, 6^2-3^2 = 3^3. - Miquel Cerda, Jun 26 2016
For n > 1, a(n) = tau_n(k*) where tau_n(k) is the number of ordered n-factorizations of k and k* is the square of a prime. For example, tau_3(4) = tau_3(9) = tau_3(25) = tau_3(49) = 6 (see A007425) since the number of divisors of 4, 9, 25, and 49's divisors is 6, and a(3) = 6. - Melvin Peralta, Aug 29 2016
In an (n+1)-dimensional hypercube, number of two-dimensional faces congruent with a vertex (see also A001788). - Stanislav Sykora, Oct 23 2016
Generalizations of the familiar formulas, a(n) + a(n+1) = (n+1)^2 (Feb 19 2004) and a(n)^2 + a(n+1)^2 = a((n+1)^2) (Nov 22 2006), follow: a(n) + a(n+2k-1) + 4a(k-1) = (n+k)^2 + 6a(k-1) and a(n)^2 + a(n+2k-1)^2 + (4a(k-1))^2 + 3a(k-1) = a((n+k)^2 + 6a(k-1)). - Charlie Marion, Nov 27 2016
a(n) is also the greatest possible number of diagonals in a polyhedron with n+4 vertices. - Vladimir Letsko, Dec 19 2016
For n > 0, 2^5 * (binomial(n+1,2))^2 represents the first integer in a sum of 2*(2*n + 1)^2 consecutive integers that equals (2*n + 1)^6. - Patrick J. McNab, Dec 25 2016
Does not satisfy Benford's law (cf. Ross, 2012). - N. J. A. Sloane, Feb 12 2017
Number of ordered triples (a,b,c) of positive integers not larger than n such that a+b+c = 2n+1. - Aviel Livay, Feb 13 2017
Number of inequivalent tetrahedral face colorings using at most n colors so that no color appears only once. - David Nacin, Feb 22 2017
Also the Wiener index of the complete graph K_{n+1}. - Eric W. Weisstein, Sep 07 2017
Number of intersections between the Bernstein polynomials of degree n. - Eric Desbiaux, Apr 01 2018
a(n) is the area of a triangle with vertices at (1,1), (n+1,n+2), and ((n+1)^2, (n+2)^2). - Art Baker, Dec 06 2018
For n > 0, a(n) is the smallest k > 0 such that n divides numerator of (1/a(1) + 1/a(2) + ... + 1/a(n-1) + 1/k). It should be noted that 1/1 + 1/3 + 1/6 + ... + 2/(n(n+1)) = 2n/(n+1). - Thomas Ordowski, Aug 04 2019
Upper bound of the number of lines in an n-homogeneous supersolvable line arrangement (see Theorem 1.1 in Dimca). - Stefano Spezia, Oct 04 2019
For n > 0, a(n+1) is the number of lattice points on a triangular grid with side length n. - Wesley Ivan Hurt, Aug 12 2020
Maximum number of distinct nonempty substrings of a string of length n.
Maximum cardinality of the sumset A+A, where A is a set of n numbers. (End)
a(n) is the number of parking functions of size n avoiding the patterns 123, 132, and 312. - Lara Pudwell, Apr 10 2023
Suppose two rows, each consisting of n evenly spaced dots, are drawn in parallel. Suppose we bijectively draw lines between the dots of the two rows. For n >= 1, a(n - 1) is the maximal possible number of intersections between the lines. Equivalently, the maximal number of inversions in a permutation of [n]. - Sela Fried, Apr 18 2023
The following equation complements the generalization in Bala's Comment (Jan 05 2015). (2k + 1)^2*a(n) + a(k) = a((2k + 1)*n + k). - Charlie Marion, Aug 28 2023
a(n) + a(n+k) + a(k-1) + (k-1)*n = (n+k)^2. For k = 1, we have a(n) + a(n+1) = (n+1)^2. - Charlie Marion, Nov 17 2023
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
C. Alsina and R. B. Nelson, Charming Proofs: A Journey into Elegant Mathematics, MAA, 2010. See Chapter 1.
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.
A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 109ff.
Marc Chamberland, Single Digits: In Praise of Small Numbers, Chapter 3, The Number Three, p. 72, Princeton University Press, 2015.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 155.
J. M. De Koninck and A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 309 pp 46-196, Ellipses, Paris, 2004
E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 1.
Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.
James Gleick, The Information: A History, A Theory, A Flood, Pantheon, 2011. [On page 82 mentions a table of the first 19999 triangular numbers published by E. de Joncort in 1762.]
Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.6 Mathematical Proof and §8.6 Figurate Numbers, pp. 158-159, 289-290.
Cay S. Horstmann, Scala for the Impatient. Upper Saddle River, New Jersey: Addison-Wesley (2012): 171.
Labos E.: On the number of RGB-colors we can distinguish. Partition Spectra. Lecture at 7th Hungarian Conference on Biometry and Biomathematics. Budapest. Jul 06 2005.
A. Messiah, Quantum Mechanics, Vol.1, North Holland, Amsterdam, 1965, p. 457.
J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
T. Trotter, Some Identities for the Triangular Numbers, Journal of Recreational Mathematics, Spring 1973, 6(2).
D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 91-93 Penguin Books 1987.
LINKS
C. Hamberg, Triangular Numbers Are Everywhere, llinois Mathematics and Science Academy, IMSA Math Journal: a Resource Notebook for High School Mathematics (1992), pp. 7-10.
Ed Pegg, Jr., Sequence Pictures, Math Games column, Dec 08 2003 [Cached copy, with permission (pdf only)]
Michel Waldschmidt, Continued fractions, École de recherche CIMPA-Oujda, Théorie des Nombres et ses Applications, 18 - 29 mai 2015: Oujda (Maroc).
Eric Weisstein's World of Mathematics, Absolute Value, Binomial Coefficient, Composition, Distance, Golomb Ruler, Line Line Picking, Polygonal Number, Triangular Number, Trinomial Coefficient, and Wiener Index
FORMULA
E.g.f.: exp(x)*(x+x^2/2).
a(n) = a(-1-n).
a(n+1) = ((n+2)/n)*a(n), Sum_{n>=1} 1/a(n) = 2. - Jon Perry, Jul 13 2003
For n > 0, a(n) = A001109(n) - Sum_{k=0..n-1} (2*k+1)* A001652(n-1-k); e.g., 10 = 204 - (1*119 + 3*20 + 5*3 + 7*0). - Charlie Marion, Jul 18 2003
With interpolated zeros, this is n*(n+2)*(1+(-1)^n)/16. - Benoit Cloitre, Aug 19 2003
a(n+1) is the determinant of the n X n symmetric Pascal matrix M_(i, j) = binomial(i+j+1, i). - Benoit Cloitre, Aug 19 2003
a(n) = ((n+1)^3 - n^3 - 1)/6. - Xavier Acloque, Oct 24 2003
a(n) = a(n-1) + (1 + sqrt(1 + 8*a(n-1)))/2. This recursive relation is inverted when taking the negative branch of the square root, i.e., a(n) is transformed into a(n-1) rather than a(n+1). - Carl R. White, Nov 04 2003
a(n) = a(n-2) + 2*n - 1. - Paul Barry, Jul 17 2004
a(n) = sqrt(sqrt(Sum_{i=1..n} Sum_{j=1..n} (i*j)^3)) = (Sum_{i=1..n} Sum_{j=1..n} Sum_{k=1..n} (i*j*k)^3)^(1/6). - Alexander Adamchuk, Oct 26 2004
a(n) == 1 (mod n+2) if n is odd and a(n) == n/2+2 (mod n+2) if n is even. - Jon Perry, Dec 16 2004
a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) - a(n-2) + 1. - Miklos Kristof, Mar 09 2005
a(n) = floor((2*n+1)^2/8). - Paul Barry, May 29 2006
a(n)^2 + a(n+1)^2 = a((n+1)^2) [R B Nelsen, Math Mag 70 (2) (1997), p. 130]. - R. J. Mathar, Nov 22 2006
a(n)*a(n+k)+a(n+1)*a(n+1+k) = a((n+1)*(n+1+k)). Generalizes previous formula dated Nov 22 2006 [and comments by J. M. Bergot dated May 22 2012]. - Charlie Marion, Feb 04 2011
(sqrt(8*a(n)+1)-1)/2 = n. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 26 2007
A general formula for polygonal numbers is P(k,n) = (k-2)*(n-1)n/2 + n = n + (k-2)* A000217(n-1), for n >= 1, k >= 3. - Omar E. Pol, Apr 28 2008 and Mar 31 2013
If we define f(n,i,a) = Sum_{j=0..k-1} (binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-a-j)), then a(n) = -f(n,n-1,1), for n >= 1. - Milan Janjic, Dec 20 2008
An exponential generating function for the inverse of this sequence is given by Sum_{m>=0} ((Pochhammer(1, m)*Pochhammer(1, m))*x^m/(Pochhammer(3, m)*factorial(m))) = ((2-2*x)*log(1-x)+2*x)/x^2, the n-th derivative of which has a closed form which must be evaluated by taking the limit as x->0. A000217(n+1) = (lim_{x->0} d^n/dx^n (((2-2*x)*log(1-x)+2*x)/x^2))^-1 = (lim_{x->0} (2*Gamma(n)*(-1/x)^n*(n*(x/(-1+x))^n*(-x+1+n)*LerchPhi(x/(-1+x), 1, n) + (-1+x)*(n+1)*(x/(-1+x))^n + n*(log(1-x)+log(-1/(-1+x)))*(-x+1+n))/x^2))^-1. - Stephen Crowley, Jun 28 2009
With offset 1, a(n) = floor(n^3/(n+1))/2. - Gary Detlefs, Feb 14 2010
a(n) = 4*a(floor(n/2)) + (-1)^(n+1)*floor((n+1)/2). - Bruno Berselli, May 23 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=0, a(1)=1. - Mark Dols, Aug 20 2010
a(n) + 2*a(n-1) + a(n-2) = n^2 + (n-1)^2; and
a(n) + 3*a(n-1) + 3*a(n-2) + a(n-3) = n^2 + 2*(n-1)^2 + (n-2)^2.
In general, for n >= m > 2, Sum_{k=0..m} binomial(m,m-k)*a(n-k) = Sum_{k=0..m-1} binomial(m-1,m-1-k)*(n-k)^2.
a(n) - 2*a(n-1) + a(n-2) = 1, a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 0 and a(n) - 4*a(n-1) + 6*a(n-2) - 4*(a-3) + a(n-4) = 0.
In general, for n >= m > 2, Sum_{k=0..m} (-1)^k*binomial(m,m-k)*a(n-k) = 0.
(End)
For n > 0, a(n) = 1/(Integral_{x=0..Pi/2} 4*(sin(x))^(2*n-1)*(cos(x))^3). - Francesco Daddi, Aug 02 2011
a(n) = -s(n+1,n), where s(n,k) are the Stirling numbers of the first kind, A048994. - Mircea Merca, May 03 2012
a(n)*a(n+1) = a(Sum_{m=1..n} A005408(m))/2, for n >= 1. For example, if n=8, then a(8)*a(9) = a(80)/2 = 1620. - Ivan N. Ianakiev, May 27 2012
G.f.: x * (1 + 3x + 6x^2 + ...) = x * Product_{j>=0} (1+x^(2^j))^3 = x * A(x) * A(x^2) * A(x^4) * ..., where A(x) = (1 + 3x + 3x^2 + x^3). - Gary W. Adamson, Jun 26 2012
G.f.: G(0) where G(k) = 1 + (2*k+3)*x/(2*k+1 - x*(k+2)*(2*k+1)/(x*(k+2) + (k+1)/G(k+1))); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Nov 23 2012
G.f.: x + 3*x^2/(Q(0)-3*x) where Q(k) = 1 + k*(x+1) + 3*x - x*(k+1)*(k+4)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) + a(n+1) + ... + a(n+8) + 6*n = a(3*n+15). - Charlie Marion, Mar 18 2013
a(n) + a(n+1) + ... + a(n+20) + 2*n^2 + 57*n = a(5*n+55). - Charlie Marion, Mar 18 2013
In general, a(k*n) = (2*k-1)*a(n) + a((k-1)*n-1). - Charlie Marion, Apr 20 2015
Also, a(k*n) = a(k)*a(n) + a(k-1)*a(n-1). - Robert Israel, Apr 20 2015
a(n+1) = det(binomial(i+2,j+1), 1 <= i,j <= n). - Mircea Merca, Apr 06 2013
a(n) = floor(n/2) + ceiling(n^2/2) = n - floor(n/2) + floor(n^2/2). - Wesley Ivan Hurt, Jun 15 2013
Sum_{n>=1} a(n)/n! = 3*exp(1)/2 by the e.g.f. Also see A067764 regarding ratios calculated this way for binomial coefficients in general. - Richard R. Forberg, Jul 15 2013
Sum_{n>=1} (-1)^(n+1)/a(n) = 4*log(2) - 2 = 0.7725887... . - Richard R. Forberg, Aug 11 2014
Let O(n) be the oblong number n(n+1) = A002378(n) and S(n) the square number n^2 = A000290(n). Then a(n) + a(n+2k) = O(n+k) + S(k) and a(n) + a(n+2k+1) = S(n+k+1) + O(k). - Charlie Marion, Jul 16 2015
A generalization of the Nov 22 2006 formula, a(n)^2 + a(n+1)^2 = a((n+1)^2), follows. Let T(k,n) = a(n) + k. Then for all k, T(k,n)^2 + T(k,n+1)^2 = T(k,(n+1)^2 + 2*k) - 2*k. - Charlie Marion, Dec 10 2015
a(n)^2 + a(n+1)^2 = a(a(n) + a(n+1)). Deducible from N. J. A. Sloane's a(n) + a(n+1) = (n+1)^2 and R. B. Nelson's a(n)^2 + a(n+1)^2 = a((n+1)^2). - Ben Paul Thurston, Dec 28 2015
a(n)^2 + a(n+3)^2 + 19 = a(n^2 + 4*n + 10). - Charlie Marion, Nov 23 2016
G.f.: x/(1-x)^3 = (x * r(x) * r(x^3) * r(x^9) * r(x^27) * ...), where r(x) = (1 + x + x^2)^3 = (1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6). - Gary W. Adamson, Dec 03 2016
a(n) = sum of the elements of inverse of matrix Q(n), where Q(n) has elements q_i,j = 1/(1-4*(i-j)^2). So if e = appropriately sized vector consisting of 1's, then a(n) = e'.Q(n)^-1.e. - Michael Yukish, Mar 20 2017
a(n) = Sum_{k=1..n} ((2*k-1)!!*(2*n-2*k-1)!!)/((2*k-2)!!*(2*n-2*k)!!). - Michael Yukish, Mar 20 2017
Sum_{i=0..k-1} a(n+i) = (3*k*n^2 + 3*n*k^2 + k^3 - k)/6. - Christopher Hohl, Feb 23 2019
a(n) == 0 (mod n) iff n is odd (see De Koninck reference). - Bernard Schott, Jan 10 2020
8*a(k)*a(n) + ((a(k)-1)*n + a(k))^2 = ((a(k)+1)*n + a(k))^2. This formula reduces to the well-known formula, 8*a(n) + 1 = (2*n+1)^2, when k = 1. - Charlie Marion, Jul 23 2020
a(k)*a(n) = Sum_{i = 0..k-1} (-1)^i*a((k-i)*(n-i)). - Charlie Marion, Dec 04 2020
Product_{n>=1} (1 + 1/a(n)) = cosh(sqrt(7)*Pi/2)/(2*Pi).
Product_{n>=2} (1 - 1/a(n)) = 1/3. (End)
a(n) = Sum_{k=1..2*n-1} (-1)^(k+1)*a(k)*a(2*n-k). For example, for n = 4, 1*28 - 3*21 + 6*15 - 10*10 + 15*6 - 21*3 + 28*1 = 10. - Charlie Marion, Mar 23 2022
2*a(n) = A000384(n) - n^2 + 2*n. In general, if P(k,n) = the n-th k-gonal number, then (j+1)*a(n) = P(5 + j, n) - n^2 + (j+1)*n. More generally, (j+1)*P(k,n) = P(2*k + (k-2)*(j-1),n) - n^2 + (j+1)*n. - Charlie Marion, Mar 14 2023
a(n) = (1/6)* Sum_{k = 0..3*n} (-1)^(n+k+1) * k*(k + 1) * binomial(3*n+k, 2*k). - Peter Bala, Nov 03 2024
EXAMPLE
G.f.: x + 3*x^2 + 6*x^3 + 10*x^4 + 15*x^5 + 21*x^6 + 28*x^7 + 36*x^8 + 45*x^9 + ...
When n=3, a(3) = 4*3/2 = 6.
Example(a(4)=10): ABCD where A, B, C and D are different links in a chain or different amino acids in a peptide possible fragments: A, B, C, D, AB, ABC, ABCD, BC, BCD, CD = 10.
a(2): hollyhock leaves on the Tokugawa Mon, a(4): points in Pythagorean tetractys, a(5): object balls in eight-ball billiards. - Bradley Klee, Aug 24 2015
The a(1) = 1 through a(5) = 15 ordered triples of positive integers summing to n + 2 [Beeler, McGrath above] are the following. These compositions are ranked by A014311.
(111) (112) (113) (114) (115)
(121) (122) (123) (124)
(211) (131) (132) (133)
(212) (141) (142)
(221) (213) (151)
(311) (222) (214)
(231) (223)
(312) (232)
(321) (241)
(411) (313)
(322)
(331)
(412)
(421)
(511)
The unordered strict case is A001399(n-6), with Heinz numbers A007304.
(End)
MAPLE
istriangular:=proc(n) local t1; t1:=floor(sqrt(2*n)); if n = t1*(t1+1)/2 then return true else return false; end if; end proc; # N. J. A. Sloane, May 25 2008
ZL := [S, {S=Prod(B, B, B), B=Set(Z, 1 <= card)}, unlabeled]:
seq(combstruct[count](ZL, size=n), n=2..55); # Zerinvary Lajos, Mar 24 2007
isA000217 := proc(n)
issqr(1+8*n) ;
end proc: # R. J. Mathar, Nov 29 2015 [This is the recipe Leonhard Euler proposes in chapter VII of his "Vollständige Anleitung zur Algebra", 1765. Peter Luschny, Sep 02 2022]
MATHEMATICA
CoefficientList[Series[x / (1 - x)^3, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 30 2014 *)
(* For Mathematica 10.4+ *) Table[PolygonalNumber[n], {n, 0, 53}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
(* The following Mathematica program, courtesy of Steven J. Miller, is useful for testing if a sequence is Benford. To test a different sequence only one line needs to be changed. This strongly suggests that the triangular numbers are not Benford, since the second and third columns of the output disagree. - N. J. A. Sloane, Feb 12 2017 *)
fd[x_] := Floor[10^Mod[Log[10, x], 1]]
benfordtest[num_] := Module[{},
For[d = 1, d <= 9, d++, digit[d] = 0];
For[n = 1, n <= num, n++,
{
d = fd[n(n+1)/2];
If[d != 0, digit[d] = digit[d] + 1];
}];
For[d = 1, d <= 9, d++, digit[d] = 1.0 digit[d]/num];
For[d = 1, d <= 9, d++,
Print[d, " ", 100.0 digit[d], " ", 100.0 Log[10, (d + 1)/d]]];
];
benfordtest[20000]
Table[Length[Join@@Permutations/@IntegerPartitions[n, {3}]], {n, 0, 15}] (* Gus Wiseman, Oct 28 2020 *)
PROG
(PARI) A000217(n) = n * (n + 1) / 2;
(PARI) list(lim)=my(v=List(), n, t); while((t=n*n++/2)<=lim, listput(v, t)); Vec(v) \\ Charles R Greathouse IV, Jun 18 2021
(Haskell)
a000217 n = a000217_list !! n
(Scala) (1 to 53).scanLeft(0)(_ + _) // Horstmann (2012), p. 171
(Python) for n in range(0, 60): print(n*(n+1)/2, end=', ') # Stefano Spezia, Dec 06 2018
(Python) # Intended to compute the initial segment of the sequence, not
# isolated terms. If in the iteration the line "x, y = x + y + 1, y + 1"
# is replaced by "x, y = x + y + k, y + k" then the figurate numbers are obtained,
# for k = 0 (natural A001477), k = 1 (triangular), k = 2 (squares), k = 3 (pentagonal), k = 4 (hexagonal), k = 5 (heptagonal), k = 6 (octagonal), etc.
def aList():
x, y = 1, 1
yield 0
while True:
yield x
x, y = x + y + 1, y + 1
CROSSREFS
Cf. A000096, A000124, A000292, A000330, A000396, A000668, A001082, A001788, A002024, A002378, A002415, A003056 (inverse function), A004526, A006011, A007318, A008953, A008954, A010054 (characteristic function), A028347, A036666, A046092, A051942, A055998, A055999, A056000, A056115, A056119, A056121, A056126, A062717, A087475, A101859, A109613, A143320, A210569, A245031, A245300, A060544, A016754.
Cf. A002817 (doubly triangular numbers), A075528 (solutions of a(n)=a(m)/2).
Cf. A104712 (first column, starting with a(1)).
Some generalized k-gonal numbers are A001318 (k=5), this sequence (k=6), A085787 (k=7), etc.
A011782 counts compositions of any length.
A337461 counts pairwise coprime triples, with unordered version A307719.
KEYWORD
nonn,core,easy,nice,changed
Central binomial coefficients: binomial(2*n,n) = (2*n)!/(n!)^2.
(Formerly M1645 N0643)
+10
1083
1, 2, 6, 20, 70, 252, 924, 3432, 12870, 48620, 184756, 705432, 2704156, 10400600, 40116600, 155117520, 601080390, 2333606220, 9075135300, 35345263800, 137846528820, 538257874440, 2104098963720, 8233430727600, 32247603683100, 126410606437752, 495918532948104, 1946939425648112
COMMENTS
Devadoss refers to these numbers as type B Catalan numbers (cf. A000108).
Equal to the binomial coefficient sum Sum_{k=0..n} binomial(n,k)^2.
Number of possible interleavings of a program with n atomic instructions when executed by two processes. - Manuel Carro (mcarro(AT)fi.upm.es), Sep 22 2001
Convolving a(n) with itself yields A000302, the powers of 4. - T. D. Noe, Jun 11 2002
Number of ordered trees with 2n+1 edges, having root of odd degree and nonroot nodes of outdegree 0 or 2. - Emeric Deutsch, Aug 02 2002
Also number of directed, convex polyominoes having semiperimeter n+2.
Also number of diagonally symmetric, directed, convex polyominoes having semiperimeter 2n+2. - Emeric Deutsch, Aug 03 2002
The second inverse binomial transform of this sequence is this sequence with interpolated zeros. Its g.f. is (1 - 4*x^2)^(-1/2), with n-th term C(n,n/2)(1+(-1)^n)/2. - Paul Barry, Jul 01 2003
Number of possible values of a 2n-bit binary number for which half the bits are on and half are off. - Gavin Scott (gavin(AT)allegro.com), Aug 09 2003
Ordered partitions of n with zeros to n+1, e.g., for n=4 we consider the ordered partitions of 11110 (5), 11200 (30), 13000 (20), 40000 (5) and 22000 (10), total 70 and a(4)=70. See A001700 (esp. Mambetov Bektur's comment). - Jon Perry, Aug 10 2003
Number of nondecreasing sequences of n integers from 0 to n: a(n) = Sum_{i_1=0..n} Sum_{i_2=i_1..n}...Sum_{i_n=i_{n-1}..n}(1). - J. N. Bearden (jnb(AT)eller.arizona.edu), Sep 16 2003
Number of peaks at odd level in all Dyck paths of semilength n+1. Example: a(2)=6 because we have U*DU*DU*D, U*DUUDD, UUDDU*D, UUDUDD, UUU*DDD, where U=(1,1), D=(1,-1) and * indicates a peak at odd level. Number of ascents of length 1 in all Dyck paths of semilength n+1 (an ascent in a Dyck path is a maximal string of up steps). Example: a(2)=6 because we have uDuDuD, uDUUDD, UUDDuD, UUDuDD, UUUDDD, where an ascent of length 1 is indicated by a lower case letter. - Emeric Deutsch, Dec 05 2003
a(n-1) = number of subsets of 2n-1 distinct elements taken n at a time that contain a given element. E.g., n=4 -> a(3)=20 and if we consider the subsets of 7 taken 4 at a time with a 1 we get (1234, 1235, 1236, 1237, 1245, 1246, 1247, 1256, 1257, 1267, 1345, 1346, 1347, 1356, 1357, 1367, 1456, 1457, 1467, 1567) and there are 20 of them. - Jon Perry, Jan 20 2004
The dimension of a particular (necessarily existent) absolutely universal embedding of the unitary dual polar space DSU(2n,q^2) where q>2. - J. Taylor (jt_cpp(AT)yahoo.com), Apr 02 2004.
Number of standard tableaux of shape (n+1, 1^n). - Emeric Deutsch, May 13 2004
Erdős, Graham et al. conjectured that a(n) is never squarefree for sufficiently large n (cf. Graham, Knuth, Patashnik, Concrete Math., 2nd ed., Exercise 112). Sárközy showed that if s(n) is the square part of a(n), then s(n) is asymptotically (sqrt(2)-2)*(sqrt(n))*(Riemann Zeta Function(1/2)). Granville and Ramare proved that the only squarefree values are a(1)=2, a(2)=6 and a(4)=70. - Jonathan Vos Post, Dec 04 2004 [For more about this conjecture, see A261009. - N. J. A. Sloane, Oct 25 2015]
The MathOverflow link contains the following comment (slightly edited): The Erdős squarefree conjecture (that a(n) is never squarefree for n>4) was proved in 1980 by Sárközy, A. (On divisors of binomial coefficients. I. J. Number Theory 20 (1985), no. 1, 70-80.) who showed that the conjecture holds for all sufficiently large values of n, and by A. Granville and O. Ramaré (Explicit bounds on exponential sums and the scarcity of squarefree binomial coefficients. Mathematika 43 (1996), no. 1, 73-107) who showed that it holds for all n>4. - Fedor Petrov, Nov 13 2010. [From N. J. A. Sloane, Oct 29 2015]
p divides a((p-1)/2)-1= A030662(n) for prime p=5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, ... = A002144(n) Pythagorean primes: primes of form 4n+1. - Alexander Adamchuk, Jul 04 2006
The number of direct routes from my home to Granny's when Granny lives n blocks south and n blocks east of my home in Grid City. To obtain a direct route, from the 2n blocks, choose n blocks on which one travels south. For example, a(2)=6 because there are 6 direct routes: SSEE, SESE, SEES, EESS, ESES and ESSE. - Dennis P. Walsh, Oct 27 2006
Inverse: With q = -log(log(16)/(pi a(n)^2)), ceiling((q + log(q))/log(16)) = n. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 26 2007
Number of partitions with Ferrers diagrams that fit in an n X n box (including the empty partition of 0). Example: a(2) = 6 because we have: empty, 1, 2, 11, 21 and 22. - Emeric Deutsch, Oct 02 2007
The number of walks of length 2n on an infinite linear lattice that begins and ends at the origin. - Stefan Hollos (stefan(AT)exstrom.com), Dec 10 2007
The number of lattice paths from (0,0) to (n,n) using steps (1,0) and (0,1). - Joerg Arndt, Jul 01 2011
Integral representation: C(2n,n)=1/Pi Integral [(2x)^(2n)/sqrt(1 - x^2),{x,-1, 1}], i.e., C(2n,n)/4^n is the moment of order 2n of the arcsin distribution on the interval (-1,1). - N-E. Fahssi, Jan 02 2008
Straub, Amdeberhan and Moll: "... it is conjectured that there are only finitely many indices n such that C_n is not divisible by any of 3, 5, 7 and 11." - Jonathan Vos Post, Nov 14 2008
Also, in sports, the number of ordered ways for a "Best of 2n-1 Series" to progress. For example, a(2) = 6 means there are six ordered ways for a "best of 3" series to progress. If we write A for a win by "team A" and B for a win by "team B" and if we list the played games chronologically from left to right then the six ways are AA, ABA, BAA, BB, BAB, and ABB. (Proof: To generate the a(n) ordered ways: Write down all a(n) ways to designate n of 2n games as won by team A. Remove the maximal suffix of identical letters from each of these.) - Lee A. Newberg, Jun 02 2009
Number of n X n binary arrays with rows, considered as binary numbers, in nondecreasing order, and columns, considered as binary numbers, in nonincreasing order. - R. H. Hardin, Jun 27 2009
Hankel transform is 2^n. - Paul Barry, Aug 05 2009
It appears that a(n) is also the number of quivers in the mutation class of twisted type BC_n for n>=2.
Number of words on {a,b} of length 2n such that no prefix of the word contains more b's than a's. - Jonathan Nilsson, Apr 18 2012
From Pascal's triangle take row(n) with terms in order a1,a2,..a(n) and row(n+1) with terms b1,b2,..b(n), then 2*(a1*b1 + a2*b2 + ... + a(n)*b(n)) to get the terms in this sequence. - J. M. Bergot, Oct 07 2012. For example using rows 4 and 5: 2*(1*(1) + 4*(5) + 6*(10) + 4*(10) + 1*(5)) = 252, the sixth term in this sequence.
Take from Pascal's triangle row(n) with terms b1, b2, ..., b(n+1) and row(n+2) with terms c1, c2, ..., c(n+3) and find the sum b1*c2 + b2*c3 + ... + b(n+1)*c(n+2) to get A000984(n+1). Example using row(3) and row(5) gives sum 1*(5)+3*(10)+3*(10)+1*(5) = 70 = A000984(4). - J. M. Bergot, Oct 31 2012
a(n) == 2 mod n^3 iff n is a prime > 3. (See Mestrovic link, p. 4.) - Gary Detlefs, Feb 16 2013
Conjecture: For any positive integer n, the polynomial sum_{k=0}^n a(k)x^k is irreducible over the field of rational numbers. In general, for any integer m>1 and n>0, the polynomial f_{m,n}(x) = Sum_{k=0..n} (m*k)!/(k!)^m*x^k is irreducible over the field of rational numbers. - Zhi-Wei Sun, Mar 23 2013
This comment generalizes the comment dated Oct 31 2012 and the second of the sequence's original comments. For j = 1 to n, a(n) = Sum_{k=0..j} C(j,k)* C(2n-j, n-k) = 2*Sum_{k=0..j-1} C(j-1,k)*C(2n-j, n-k). - Charlie Marion, Jun 07 2013
The differences between consecutive terms of the sequence of the quotients between consecutive terms of this sequence form a sequence containing the reciprocals of the triangular numbers. In other words, a(n+1)/a(n)-a(n)/a(n-1) = 2/(n*(n+1)). - Christian Schulz, Jun 08 2013
Number of distinct strings of length 2n using n letters A and n letters B. - Hans Havermann, May 07 2014
Expansion of G.f. A(x) = 1/(1+q*x*c(x)), where parameter q is positive or negative (except q=-1), and c(x) is the g.f. of A000108 for Catalan numbers. The case of q=-1 recovers the g.f. of A000108 as xA^2-A+1=0. The present sequence A000984 refers to q=-2. Recurrence: (1+q)*(n+2)*a(n+2) + ((q*q-4*q-4)*n + 2*(q*q-q-1))*a(n+1) - 2*q*q*(2*n+1)*a(n) = 0, a(0)=1, a(1)=-q. Asymptotics: a(n) ~ ((q+2)/(q+1))*(q^2/(-q-1))^n, q<=-3, a(n) ~ (-1)^n*((q+2)/(q+1))*(q^2/(q+1))^n, q>=5, and a(n) ~ -Kq*2^(2*n)/sqrt(Pi*n^3), where the multiplicative constant Kq is given by K1=1/9 (q=1), K2=1/8 (q=2), K3=3/25 (q=3), K4=1/9 (q=4). These formulas apply to existing sequences A126983 (q=1), A126984 (q=2), A126982 (q=3), A126986 (q=4), A126987 (q=5), A127017 (q=6), A127016 (q=7), A126985 (q=8), A127053 (q=9), and to A007854 (q=-3), A076035 (q=-4), A076036 (q=-5), A127628 (q=-6), A126694 (q=-7), A115970 (q=-8). (End)
a(n)*(2^n)^(j-2) equals S(n), where S(n) is the n-th number in the self-convolved sequence which yields the powers of 2^j for all integers j, n>=0. For example, when n=5 and j=4, a(5)=252; 252*(2^5)^(4-2) = 252*1024 = 258048. The self-convolved sequence which yields powers of 16 is {1, 8, 96, 1280, 17920, 258048, ...}; i.e., S(5) = 258048. Note that the convolved sequences will be composed of numbers decreasing from 1 to 0, when j<2 (exception being j=1, where the first two numbers in the sequence are 1 and all others decreasing). - Bob Selcoe, Jul 16 2014
The variance of the n-th difference of a sequence of pairwise uncorrelated random variables each with variance 1. - Liam Patrick Roche, Jun 04 2015
Number of ordered trees with n edges where vertices at level 1 can be of 2 colors. Indeed, the standard decomposition of ordered trees leading to the equation C = 1 + zC^2 (C is the Catalan function), yields this time G = 1 + 2zCG, from where G = 1/sqrt(1-4z). - Emeric Deutsch, Jun 17 2015
Number of monomials of degree at most n in n variables. - Ran Pan, Sep 26 2015
Let V(n, r) denote the volume of an n-dimensional sphere with radius r, then V(n, 2^n) / Pi = V(n-1, 2^n) * a(n/2) for all even n. - Peter Luschny, Oct 12 2015
a(n) is the number of sets {i1,...,in} of length n such that n >= i1 >= i2 >= ... >= in >= 0. For instance, a(2) = 6 as there are only 6 such sets: (2,2) (2,1) (2,0) (1,1) (1,0) (0,0). - Anton Zakharov, Jul 04 2016
By analytic continuation to the entire complex plane there exist regularized values for divergent sums such as:
Sum_{k>=0} a(k)/(-2)^k = 1/sqrt(3).
Sum_{k>=0} a(k)/(-1)^k = 1/sqrt(5).
Sum_{k>=0} a(k)/(-1/2)^k = 1/3.
Sum_{k>=0} a(k)/(1/2)^k = -1/sqrt(7)i.
Sum_{k>=0} a(k)/(1)^k = -1/sqrt(3)i.
Sum_{k>=0} a(k)/2^k = -i. (End)
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) > e(j). [Martinez and Savage, 2.18] - Eric M. Schmidt, Jul 17 2017
The o.g.f. for the sequence equals the diagonal of any of the following the rational functions: 1/(1 - (x + y)), 1/(1 - (x + y*z)), 1/(1 - (x + x*y + y*z)) or 1/(1 - (x + y + y*z)). - Peter Bala, Jan 30 2018
Let s denote West's stack-sorting map. a(n) is the number of permutations pi of [n+1] such that s(pi) avoids the patterns 132, 231, and 321. a(n) is also the number of permutations pi of [n+1] such that s(pi) avoids the patterns 132, 312, and 321.
a(n) is the number of permutations of [n+1] that avoid the patterns 1342, 3142, 3412, and 3421. (End)
All binary self-dual codes of length 4n, for n>0, must contain at least a(n) codewords of weight 2n. More to the point, there will always be at least one, perhaps unique, binary self-dual code of length 4n that will contain exactly a(n) codewords that have a hamming weight equal to half the length of the code (2n). This code can be constructed by direct summing the unique binary self-dual code of length 2 (up to permutation equivalence) to itself an even number of times. A permutation equivalent code can be constructed by augmenting two identity matrices of length 2n together. - Nathan J. Russell, Nov 25 2018
Let [b/p] denote the Legendre symbol and 1/b denote the inverse of b mod p. Then, for m and n, where n is not divisible by p,
[(m+n)/p] == [n/p]*Sum_{k=0..(p-1)/2} (-m/(4*n))^k * a(k) (mod p).
Evaluating this identity for m = -1 and n = 1 demonstrates that, for all odd primes p, Sum_{k=0..(p-1)/2} (1/4)^k * a(k) is divisible by p. (End)
Number of vertices of the subgraph of the (2n-1)-dimensional hypercube induced by all bitstrings with n-1 or n many 1s. The middle levels conjecture asserts that this graph has a Hamilton cycle. - Torsten Muetze, Feb 11 2019
a(n) is the number of walks of length 2n from the origin with steps (1,1) and (1,-1) that stay on or above the x-axis. Equivalently, a(n) is the number of walks of length 2n from the origin with steps (1,0) and (0,1) that stay in the first octant. - Alexander Burstein, Dec 24 2019
Number of permutations of length n>0 avoiding the partially ordered pattern (POP) {3>1, 1>2} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the second element but smaller than the third elements. - Sergey Kitaev, Dec 08 2020
Also the number of integer compositions of 2n+1 with alternating sum 1, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. For example, the a(0) = 1 through a(2) = 6 compositions are:
(1) (2,1) (3,2)
(1,1,1) (1,2,2)
(2,2,1)
(1,1,2,1)
(2,1,1,1)
(1,1,1,1,1)
The following relate to these compositions:
- The unordered version is A000070.
- The alternating sum 0 version is counted by A088218, ranked by A344619.
- Including even indices gives A126869.
- The complement is counted by A202736.
Equivalently, a(n) counts binary numbers with 2n+1 digits and one more 1 than 0's. For example, the a(2) = 6 binary numbers are: 10011, 10101, 10110, 11001, 11010, 11100.
(End)
a(n) is the number of nx2 Young tableaux with a single horizontal wall between the first and second column. If there is a wall between two cells, the entries may be decreasing; see [Banderier, Wallner 2021].
Example for a(2)=6:
3 4 2 4 3 4 3|4 4|3 2|4
1|2, 1|3, 2|1, 1 2, 1 2, 1 3
a(n) is also the number of nx2 Young tableaux with n "walls" between the first and second column.
Example for a(2)=6:
3|4 2|4 4|3 3|4 4|3 4|2
1|2, 1|3, 1|2, 2|1, 2|1, 3|1 (End)
a(n)/4^n is the probability that a fair coin tossed 2n times will come up heads exactly n times and tails exactly n times, or that a random walk with steps of +-1 will return to the starting point after 2n steps (not necessarily for the first time). As n becomes large, this number asymptotically approaches 1/sqrt(n*Pi), using Stirling's approximation for n!.
a(n)/(4^n*(2n-1)) is the probability that a random walk with steps of +-1 will return to the starting point for the first time after 2n steps. The absolute value of the n-th term of A144704 is denominator of this fraction.
Considering all possible random walks of exactly 2n steps with steps of +-1, a(n)/(2n-1) is the number of such walks that return to the starting point for the first time after 2n steps. See the absolute values of A002420 or A284016 for these numbers. For comparison, as mentioned by Stefan Hollos, Dec 10 2007, a(n) is the number of such walks that return to the starting point after 2n steps, but not necessarily for the first time. (End)
Also the size of the shuffle product of two words of length n, such that the union of the two words consist of 2n distinct elements. - Robert C. Lyons, Mar 15 2023
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 160.
Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 575, line -3, with a=b=n.
E. Deutsch and L. Shapiro, Seventeen Catalan identities, Bulletin of the Institute of Combinatorics and its Applications, 31, 31-38, 2001.
H. W. Gould, Combinatorial Identities, Morgantown, 1972, (3.66), page 30.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, Second Ed., see Exercise 112.
M. Griffiths, The Backbone of Pascal's Triangle, United Kingdom Mathematics Trust (2008), 3-124.
Leonard Lipshitz and A. van der Poorten. "Rational functions, diagonals, automata and arithmetic." In Number Theory, Richard A. Mollin, ed., Walter de Gruyter, Berlin (1990): 339-358.
J. C. P. Miller, editor, Table of Binomial Coefficients. Royal Society Mathematical Tables, Vol. 3, Cambridge Univ. Press, 1954.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Dennis E. Davenport, Lara K. Pudwell, Louis W. Shapiro, and Leon C. Woodson, The Boundary of Ordered Trees, Journal of Integer Sequences, Vol. 18 (2015), Article 15.5.8.
L. W. Shapiro, S. Getu, Wen-Jin Woan and L. C. Woodson, The Riordan Group, Discrete Appl. Maths. 34 (1991) 229-239.
M. Wallner, Lattice Path Combinatorics, Diplomarbeit, Institut für Diskrete Mathematik und Geometrie der Technischen Universität Wien, 2013.
FORMULA
a(n)/(n+1) = A000108(n), the Catalan numbers.
G.f.: A(x) = (1 - 4*x)^(-1/2) = 1F0(1/2;;4x).
D-finite with recurrence: n*a(n) + 2*(1-2*n)*a(n-1)=0.
a(n) = 2^n/n! * Product_{k=0..n-1} (2*k+1).
Using Stirling's formula in A000142 it is easy to get the asymptotic expression a(n) ~ 4^n / sqrt(Pi * n). - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
Integral representation as n-th moment of a positive function on the interval [0, 4]: a(n) = Integral_{x=0..4}(x^n*((x*(4-x))^(-1/2))/Pi), n=0, 1, ... This representation is unique. - Karol A. Penson, Sep 17 2001
a(n) = Max_{ (i+j)!/(i!j!) | 0<=i,j<=n }. - Benoit Cloitre, May 30 2002
E.g.f.: exp(2*x)*I_0(2x), where I_0 is Bessel function. - Michael Somos, Sep 08 2002
E.g.f.: I_0(2*x) = Sum a(n)*x^(2*n)/(2*n)!, where I_0 is Bessel function. - Michael Somos, Sep 09 2002
Determinant of n X n matrix M(i, j) = binomial(n+i, j). - Benoit Cloitre, Aug 28 2003
Given m = C(2*n, n), let f be the inverse function, so that f(m) = n. Letting q denote -log(log(16)/(m^2*Pi)), we have f(m) = ceiling( (q + log(q)) / log(16) ). - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Oct 30 2003
a(n+1) = Sum_{j=n..n*2+1} binomial(j, n). E.g., a(4) = C(7,3) + C(6,3) + C(5,3) + C(4,3) + C(3,3) = 35 + 20 + 10 + 4 + 1 = 70. - Jon Perry, Jan 20 2004
a(n) = (-1)^(n)*Sum_{j=0..(2*n)} (-1)^j*binomial(2*n, j)^2. - Helena Verrill (verrill(AT)math.lsu.edu), Jul 12 2004
a(n) = Sum_{k=0..n} binomial(2n+1, k)*sin((2n-2k+1)*Pi/2). - Paul Barry, Nov 02 2004
a(n-1) = (1/2)*(-1)^n*Sum_{0<=i, j<=n}(-1)^(i+j)*binomial(2n, i+j). - Benoit Cloitre, Jun 18 2005
G.f.: c(x)^2/(2*c(x)-c(x)^2) where c(x) is the g.f. of A000108. - Paul Barry, Feb 03 2006
G.f.: 1/(1-2x-2x^2/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-... (continued fraction);
G.f.: 1/(1-2x/(1-x/(1-x/(1-x/(1-... (continued fraction). (End)
Let A(x) be the g.f. and B(x) = A(-x), then B(x) = sqrt(1-4*x*B(x)^2). - Vladimir Kruchinin, Jan 16 2011
a(n) = (-4)^n*sqrt(Pi)/(gamma((1/2-n))*gamma(1+n)). - Gerry Martens, May 03 2011
a(n) = upper left term in M^n, M = the infinite square production matrix:
2, 2, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
1, 1, 1, 1, 0, 0, ...
1, 1, 1, 1, 1, 0, ...
1, 1, 1, 1, 1, 1, ....
a(n) = Hypergeometric([-n,-n],[1],1). - Peter Luschny, Nov 01 2011
G.f.: 1 + 2*x/(U(0)-2*x) where U(k) = 2*(2*k+1)*x + (k+1) - 2*(k+1)*(2*k+3)*x/U(k+1); (continued fraction, Euler's 1st kind, 1-step). - Sergei N. Gladkovskii, Jun 28 2012
a(n) = Sum_{k=0..n} binomial(n,k)^2*H(k)/(2*H(n)-H(2*n)), n>0, where H(n) is the n-th harmonic number. - Gary Detlefs, Mar 19 2013
G.f.: Q(0)*(1-4*x), where Q(k) = 1 + 4*(2*k+1)*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - 2*x*(2*k+1)/(2*x*(2*k+1) + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 24 2013
E.g.f.: E(0)/2, where E(k) = 1 + 1/(1 - 2*x/(2*x + (k+1)^2/(2*k+1)/E(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
Special values of Jacobi polynomials, in Maple notation: a(n) = 4^n*JacobiP(n,0,-1/2-n,-1). - Karol A. Penson, Jul 27 2013
a(n) = 2^(4*n)/((2*n+1)*Sum_{k=0..n} (-1)^k*C(2*n+1,n-k)/(2*k+1)). - Mircea Merca, Nov 12 2013
a(n) = C(2*n-1,n-1)*C(4*n^2,2)/(3*n*C(2*n+1,3)), n>0. - Gary Detlefs, Jan 02 2014
0 = a(n)*(16*a(n+1) - 6*a(n+2)) + a(n+1)*(-2*a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Sep 17 2014
G.f.: Sum_{n>=0} x^n/(1-x)^(2*n+1) * Sum_{k=0..n} C(n,k)^2 * x^k. - Paul D. Hanna, Nov 08 2014
a(n) = 4^n*hypergeom([-n,1/2],[1],1). - Peter Luschny, May 19 2015
a(n) = Sum_{k=0..floor(n/2)} C(n,k)*C(n-k,k)*2^(n-2*k). - Robert FERREOL, Aug 29 2015
a(n) ~ 4^n*(2-2/(8*n+2)^2+21/(8*n+2)^4-671/(8*n+2)^6+45081/(8*n+2)^8)/sqrt((4*n+1) *Pi). - Peter Luschny, Oct 14 2015
A(-x) = 1/x * series reversion( x*(2*x + sqrt(1 + 4*x^2)) ). Compare with the o.g.f. B(x) of A098616, which satisfies B(-x) = 1/x * series reversion( x*(2*x + sqrt(1 - 4*x^2)) ). See also A214377. - Peter Bala, Oct 19 2015
Sum_{n>=0} (-1)^n/a(n) = 4*(5 - sqrt(5)*log(phi))/25 = 0.6278364236143983844442267..., where phi is the golden ratio. - Ilya Gutkovskiy, Jul 04 2016
This sequence occurs as the closed-form expression for several binomial sums:
a(n) = Sum_{k = 0..2*n} (-1)^(n+k)*binomial(2*n,k)*binomial(2*n + 1,k).
a(n) = 2*Sum_{k = 0..2*n-1} (-1)^(n+k)*binomial(2*n - 1,k)*binomial(2*n,k) for n >= 1.
a(n) = 2*Sum_{k = 0..n-1} binomial(n - 1,k)*binomial(n,k) for n >= 1.
a(n) = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x + k,n)*binomial(y + k,n) = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x - k,n)*binomial(y - k,n) for arbitrary x and y.
For m = 3,4,5,... both Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x + k,n)*binomial(y + k,n) and Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x - k,n)*binomial(y - k,n) appear to equal Kronecker's delta(n,0).
a(n) = (-1)^n*Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)*binomial(x + k,n)*binomial(y - k,n) for arbitrary x and y.
For m = 3,4,5,... Sum_{k = 0..m*n} (-1)^k*binomial(m*n,k)*binomial(x + k,n)*binomial(y - k,n) appears to equal Kronecker's delta(n,0).
a(n) = Sum_{k = 0..2n} (-1)^k*binomial(2*n,k)*binomial(3*n - k,n)^2 = Sum_{k = 0..2*n} (-1)^k*binomial(2*n,k)* binomial(n + k,n)^2. (Gould, Vol. 7, 5.23).
a(n) = Sum_{k = 0..n} (-1)^(n+k)*binomial(2*n,n + k)*binomial(n + k,n)^2. (End)
Sum_{k>=0} a(k)/(p/q)^k = sqrt(p/(p-4q)) for q in N, p in Z/{-4q< (some p) <-2}.
...
Sum_{k>=0} a(k)/(-4)^k = 1/sqrt(2).
Sum_{k>=0} a(k)/(17/4)^k = sqrt(17).
Sum_{k>=0} a(k)/(18/4)^k = 3.
Sum_{k>=0} a(k)/5^k = sqrt(5).
Sum_{k>=0} a(k)/6^k = sqrt(3).
Sum_{k>=0} a(k)/8^k = sqrt(2).
...
Sum_{k>=0} a(k)/(p/q)^k = sqrt(p/(p-4q)) for p>4q.(End)
Boas-Buck recurrence: a(n) = (2/n)*Sum_{k=0..n-1} 4^(n-k-1)*a(k), n >= 1, a(0) = 1. Proof from a(n) = A046521(n, 0). See a comment there. - Wolfdieter Lang, Aug 10 2017
a(n) = Sum_{k = 0..n} (-1)^(n-k) * binomial(2*n+1, k) for n in N. - Rene Adad, Sep 30 2017
G.f. for {1/a(n)}: 4*(sqrt(4-x) + sqrt(x)*arcsin(sqrt(x)/2)) / (4-x)^(3/2).
E.g.f. for {1/a(n)}: 1 + exp(x/4)*sqrt(Pi*x)*erf(sqrt(x)/2)/2.
Sum_{n>=0} (-1)^n/a(n) = 4*(1/5 - arcsinh(1/2)/(5*sqrt(5))). (End)
a(n) = 2^(2*n)*Product_{k=1..2*n} k^((-1)^(k+1)) = A056040(2*n).
a(n) = 4^n*binomial(n-1/2,-1/2) = 4^n*GegenbauerC(n,1/4,1). - Gerry Martens, Oct 19 2022
Occurs on the right-hand side of the binomial sum identities Sum_{k = -n..n} (-1)^k * (n + x - k) * binomial(2*n, n+k)^2 = (x + n)*a(n) and Sum_{k = -n..n} (-1)^k * (n + x - k)^2 * binomial(2*n, n+k)^3 = x*(x + 2*n)*a(n) (x arbitrary). Compare with the identity: Sum_{k = -n..n} (-1)^k * binomial(2*n, n+k)^2 = a(n). - Peter Bala, Jul 31 2023
4^n*a(n) = Sum_{k = 0..2*n} (-1)^k*a(k)*a(2*n-k).
16^n = Sum_{k = 0..2*n} a(k)*a(2*n-k). (End)
a(n) = Sum_{k=0..floor(n/2)} binomial(n,2k)*binomial(2*k,k)*2^(n-2*k). (H. W. Gould) - Gary Detlefs, May 28 2024
a(n) = Sum_{k=0..2*n} (-1)^k*binomial(2n,k)*binomial(2*n+2*k,n+k)*3^(2*n-k). (H. W. Gould) (End)
EXAMPLE
G.f.: 1 + 2*x + 6*x^2 + 20*x^3 + 70*x^4 + 252*x^5 + 924*x^6 + ...
For n=2, a(2) = 4!/(2!)^2 = 24/4 = 6, and this is the middle coefficient of the binomial expansion (a + b)^4 = a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4. - Michael B. Porter, Jul 06 2016
MAPLE
with(combstruct); [seq(count([S, {S=Prod(Set(Z, card=i), Set(Z, card=i))}, labeled], size=(2*i)), i=0..20)];
with(combstruct); [seq(count([S, {S=Sequence(Union(Arch, Arch)), Arch=Prod(Epsilon, Sequence(Arch), Z)}, unlabeled], size=i), i=0..25)];
with(combstruct):bin := {B=Union(Z, Prod(B, B))}: seq (count([B, bin, unlabeled], size=n)*n, n=1..25); # Zerinvary Lajos, Dec 05 2007
A000984List := proc(m) local A, P, n; A := [1, 2]; P := [1];
for n from 1 to m - 2 do P := ListTools:-PartialSums([op(P), 2*P[-1]]);
A := [op(A), 2*P[-1]] od; A end: A000984List(28); # Peter Luschny, Mar 24 2022
MATHEMATICA
CoefficientList[Series[1/Sqrt[1-4x], {x, 0, 25}], x] (* Harvey P. Dale, Mar 14 2011 *)
PROG
(Magma) a:= func< n | Binomial(2*n, n) >; [ a(n) : n in [0..10]];
(PARI) A000984(n)=binomial(2*n, n) \\ much more efficient than (2n)!/n!^2. \\ M. F. Hasler, Feb 26 2014
(PARI) fv(n, p)=my(s); while(n\=p, s+=n); s
(PARI) fv(n, p)=my(s); while(n\=p, s+=n); s
(Haskell)
(Python)
from __future__ import division
for n in range(10**3):
b = b*(4*n+2)//(n+1)
(GAP) List([1..1000], n -> Binomial(2*n, n)); # Muniru A Asiru, Jan 30 2018
CROSSREFS
Bisection of A001405 and of A226302. See also A025565, the same ordered partitions but without all in which are two successive zeros: 11110 (5), 11200 (18), 13000 (2), 40000 (0) and 22000 (1), total 26 and A025565(4)=26.
See A261009 for a conjecture about this sequence.
The Apéry-like numbers [or Apéry-like sequences, Apery-like numbers, Apery-like sequences] include A000172, A000984, A002893, A002895, A005258, A005259, A005260, A006077, A036917, A063007, A081085, A093388, A125143 (apart from signs), A143003, A143007, A143413, A143414, A143415, A143583, A183204, A214262, A219692, A226535, A227216, A227454, A229111 (apart from signs), A260667, A260832, A262177, A264541, A264542, A279619, A290575, A290576. (The term "Apery-like" is not well-defined.)
Sum_{k = 0..n} C(n,k)^m for m = 1..12: A000079, A000984, A000172, A005260, A005261, A069865, A182421, A182422, A182446, A182447, A342294, A342295.
KEYWORD
nonn,easy,core,nice,walk,frac,changed
a(n) = n*n! = (n+1)! - n!.
(Formerly M3545 N1436)
+10
161
0, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, 36288000, 439084800, 5748019200, 80951270400, 1220496076800, 19615115520000, 334764638208000, 6046686277632000, 115242726703104000, 2311256907767808000, 48658040163532800000, 1072909785605898240000
COMMENTS
A similar sequence, with the initial 0 replaced by 1, namely A094258, is defined by the recurrence a(2) = 1, a(n) = a(n-1)*(n-1)^2/(n-2). - Andrey Ryshevich (ryshevich(AT)notes.idlab.net), May 21 2002
Denominators in power series expansion of E_1(x) + gamma + log(x), x > 0. - Michael Somos, Dec 11 2002
If all the permutations of any length k are arranged in lexicographic order, the n-th term in this sequence (n <= k) gives the index of the permutation that rotates the last n elements one position to the right. E.g., there are 24 permutations of 4 items. In lexicographic order they are (0,1,2,3), (0,1,3,2), (0,2,1,3), ... (3,2,0,1), (3,2,1,0). Permutation 0 is (0,1,2,3), which rotates the last 1 element, i.e., it makes no change. Permutation 1 is (0,1,3,2), which rotates the last 2 elements. Permutation 4 is (0,3,1,2), which rotates the last 3 elements. Permutation 18 is (3,0,1,2), which rotates the last 4 elements. The same numbers work for permutations of any length. - Henry H. Rich (glasss(AT)bellsouth.net), Sep 27 2003
Stirling transform of a(n+1)=[4,18,96,600,...] is A083140(n+1)=[4,22,154,...]. - Michael Somos, Mar 04 2004
Stirling transform of a(n)=[1,4,18,96,...] is A069321(n)=[1,5,31,233,...].
Partial sums of a(n)=[0,1,4,18,...] is A033312(n+1)=[0,1,5,23,...].
Binomial transform of A000166(n+1)=[0,1,2,9,...] is a(n)=[0,1,4,18,...].
Binomial transform of A000255(n+1)=[1,3,11,53,...] is a(n+1)=[1,4,18,96,...].
Binomial transform of a(n)=[0,1,4,18,...] is A093964(n)=[0,1,6,33,...].
Partial sums of A001564(n)=[1,3,4,14,...] is a(n+1)=[1,4,18,96,...].
(End)
Number of small descents in all permutations of [n+1]. A small descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) =1. Example: a(2)=4 because there are 4 small descents in the permutations 123, 13\2, 2\13, 231, 312, 3\2\1 of {1,2,3} (shown by \). a(n)=Sum_{k=0..n-1}k* A123513(n,k). - Emeric Deutsch, Oct 02 2006
Equivalently, in the notation of David, Kendall and Barton, p. 263, this is the total number of consecutive ascending pairs in all permutations on n+1 letters (cf. A010027). - N. J. A. Sloane, Apr 12 2014
a(n-1) is the number of permutations of n in which n is not fixed; equivalently, the number of permutations of the positive integers in which n is the largest element that is not fixed. - Franklin T. Adams-Watters, Nov 29 2006
Number of factors in a determinant when writing down all multiplication permutations. - Mats Granvik, Sep 12 2008
a(n) is also the sum of the positions of the left-to-right maxima in all permutations of [n]. Example: a(3)=18 because the positions of the left-to-right maxima in the permutations 123,132,213,231,312 and 321 of [3] are 123, 12, 13, 12, 1 and 1, respectively and 1+2+3+1+2+1+3+1+2+1+1=18. - Emeric Deutsch, Sep 21 2008
Preface the series with another 1: (1, 1, 4, 18, ...); then the next term = dot product of the latter with "n occurs n times". Example: 96 = (1, 1, 4, 8) dot (4, 4, 4, 4) = (4 + 4 + 16 + 72). - Gary W. Adamson, Apr 17 2009
a(n) is also the number of minimum (n-)distinguishing labelings of the star graph S_{n+1} on n+1 nodes. - Eric W. Weisstein, Oct 14 2014
When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the right, i.e., a(n) is the permutation with the cycle notation (0 1 ... n-1 n). Compare array A051683 for circular shifts to the right in a broader sense. Compare sequence A007489 for circular shifts to the left. - Tilman Piesk, Apr 29 2017
a(n-1) is the number of permutations on n elements with no cycles of length n. - Dennis P. Walsh, Oct 02 2017
The number of pandigital numbers in base n+1, such that each digit appears exactly once. For example, there are a(9) = 9*9! = 3265920 pandigital numbers in base 10 ( A050278). - Amiram Eldar, Apr 13 2020
REFERENCES
A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 218.
J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 336.
F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 37, equation 37:6:1 at page 354.
FORMULA
E.g.f.: x / (1 - x)^2.
a(n) = - A021009(n, 1), n >= 0. (End)
The coefficient of y^(n-1) in expansion of (y+n!)^n, n >= 1, gives the sequence 1, 4, 18, 96, 600, 4320, 35280, ... - Artur Jasinski, Oct 22 2007
Integral representation as n-th moment of a function on a positive half-axis: a(n) = Integral_{x=0..oo} x^n*(x*(x-1)*exp(-x)) dx, for n>=0. This representation may not be unique. - Karol A. Penson, Sep 27 2001
a(0) = 0, a(n) = (n - 1) * (1 + Sum_{i=1..n-1} a(i)) for i > 0. - Gerald McGarvey, Jun 11 2004
Arises in the denominators of the following identities: Sum_{n>=1} 1/(n*(n+1)*(n+2)) = 1/4, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)) = 1/18, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)*(n+4)) = 1/96, etc. The general expression is Sum_{n>=k} 1/C(n, k) = k/(k-1). - Dick Boland, Jun 06 2005 [And the general expression implies that Sum_{n>=1} 1/(n*(n+1)*...*(n+k-1)) = (Sum_{n>=k} 1/C(n, k))/k! = 1/((k-1)*(k-1)!) = 1/a(k-1), k >= 2. - Jianing Song, May 07 2023]
a(n) = Sum_{m=2..n+1} |Stirling1(n+1, m)|, n >= 1 and a(0):=0, where Stirling1(n, m) = A048994(n, m), n >= m = 0.
The reciprocals of a(n) are the lead coefficients in the factored form of the polynomials obtained by summing the binomial coefficients with a fixed lower term up to n as the upper term, divided by the term index, for n >= 1: Sum_{k = i..n} C(k, i)/k = (1/a(n))*n*(n-1)*..*(n-i+1). The first few such polynomials are Sum_{k = 1..n} C(k, 1)/k = (1/1)*n, Sum_{k = 2..n} C(k, 2)/k = (1/4)*n*(n-1), Sum_{k = 3..n} C(k, 3)/k = (1/18)*n*(n-1)*(n-2), Sum_{k = 4..n} C(k, 4)/k = (1/96)*n*(n-1)*(n-2)*(n-3), etc. - Peter Breznay (breznayp(AT)uwgb.edu), Sep 28 2008
If we define f(n,i,x) = Sum_{k=i..n} Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)* Stirling2(j,i)*x^(k-j) then a(n) = (-1)^(n-1)*f(n,1,-2), (n >= 1). - Milan Janjic, Mar 01 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = 0.796599599... [Jolley eq. 289]
G.f.: 2*x*Q(0), where Q(k) = 1 - 1/(k+2 - x*(k+2)^2*(k+3)/(x*(k+2)*(k+3)-1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 19 2013
G.f.: W(0)*(1-sqrt(x)) - 1, where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+2)/(sqrt(x)*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 18 2013
G.f.: T(0)/x - 1/x, where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013
G.f.: Q(0)*(1-x)/x - 1/x, where Q(k) = 1 - x*(k+1)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013
D-finite with recurrence: a(n) +(-n-2)*a(n-1) +(n-1)*a(n-2)=0. - R. J. Mathar, Jan 14 2020
a(n) = (-1)^(n+1)*(n+1)*Sum_{k=1..n} A094485(n,k)*Bernoulli(k). The inverse of the Worpitzky representation of the Bernoulli numbers. - Peter Luschny, May 28 2020
Sum_{n>=1} 1/a(n) = Ei(1) - gamma = A229837.
Sum_{n>=1} (-1)^(n+1)/a(n) = gamma - Ei(-1) = A239069. (End)
EXAMPLE
E_1(x) + gamma + log(x) = x/1 - x^2/4 + x^3/18 - x^4/96 + ..., x > 0. - Michael Somos, Dec 11 2002
G.f. = x + 4*x^2 + 18*x^3 + 96*x^4 + 600*x^5 + 4320*x^6 + 35280*x^7 + 322560*x^8 + ...
PROG
(PARI) {a(n) = if( n<0, 0, n * n!)} /* Michael Somos, Dec 11 2002 */
(Haskell)
a001563 n = a001563_list !! n
a001563_list = zipWith (-) (tail a000142_list) a000142_list
(Magma) [Factorial(n+1)-Factorial(n): n in [0..20]]; // Vincenzo Librandi, Aug 08 2014
(Sage) [n*factorial(n) for n in (0..20)] # G. C. Greubel, Dec 30 2019
(GAP) List([0..20], n-> n*Factorial(n) ); # G. C. Greubel, Dec 30 2019
CROSSREFS
Cf. sequences with formula (n + k)*n! listed in A282466.
Swinging factorial, a(n) = 2^(n-(n mod 2))*Product_{k=1..n} k^((-1)^(k+1)).
+10
147
1, 1, 2, 6, 6, 30, 20, 140, 70, 630, 252, 2772, 924, 12012, 3432, 51480, 12870, 218790, 48620, 923780, 184756, 3879876, 705432, 16224936, 2704156, 67603900, 10400600, 280816200, 40116600, 1163381400, 155117520, 4808643120, 601080390, 19835652870, 2333606220
COMMENTS
a(n) is the number of 'swinging orbitals' which are enumerated by the trinomial n over [floor(n/2), n mod 2, floor(n/2)].
Similar to but different from A001405(n) = binomial(n, floor(n/2)), a(n) = lcm( A001405(n-1), A001405(n)) (for n>0).
Exactly p consecutive multiples of p follow the least positive multiple of p if p is an odd prime. Compare with the similar property of A100071. - Peter Luschny, Aug 27 2012
a(n) is the number of vertices of the polytope resulting from the intersection of an n-hypercube with the hyperplane perpendicular to and bisecting one of its long diagonals. - Didier Guillet, Jun 11 2018 [Edited by Peter Munn, Dec 06 2022]
FORMULA
a(n) = n!/floor(n/2)!^2. [Essentially the original name.]
a(0) = 1, a(n) = n^(n mod 2)*(4/n)^(n+1 mod 2)*a(n-1) for n>=1.
O.g.f.: a(n) = SeriesCoeff_{n}((1+z/(1-4*z^2))/sqrt(1-4*z^2)).
P.g.f.: a(n) = PolyCoeff_{n}((1+z^2)^n+n*z*(1+z^2)^(n-1)).
a(2*n) = binomial(2*n,n); a(2*n+1) = (2*n+1)*binomial(2*n,n). Central terms of triangle A211226. - Peter Bala, Apr 10 2012
D-finite with recurrence: n*a(n) + (n-2)*a(n-1) + 4*(-2*n+3)*a(n-2) + 4*(-n+1)*a(n-3) + 16*(n-3)*a(n-4) = 0. - Alexander R. Povolotsky, Aug 17 2012
E.g.f.: U(0) where U(k)= 1 + x/(1 - x/(x + (k+1)*(k+1)/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 19 2012
Central column of the coefficients of the swinging polynomials A162246. - Peter Luschny, Oct 22 2013
a(n) = hypergeometric([-n,-n-1,1/2],[-n-2,1],2)*2^(n-1)*(n+2). - Peter Luschny, Sep 22 2014
a(n) = 4^floor(n/2)*hypergeometric([-floor(n/2), (-1)^n/2], [1], 1). - Peter Luschny, May 19 2015
Sum_{n>=0} (-1)^n/a(n) = 4/3 - 4*Pi/(9*sqrt(3)). - Amiram Eldar, Mar 10 2022
EXAMPLE
a(10) = 10!/5!^2 = trinomial(10,[5,0,5]);
a(11) = 11!/5!^2 = trinomial(11,[5,1,5]).
MAPLE
SeriesCoeff := proc(s, n) series(s(w, n), w, n+2);
convert(%, polynom); coeff(%, w, n) end;
a1 := proc(n) local k;
2^(n-(n mod 2))*mul(k^((-1)^(k+1)), k=1..n) end:
a2 := proc(n) option remember;
`if`(n=0, 1, n^irem(n, 2)*(4/n)^irem(n+1, 2)*a2(n-1)) end;
a3 := n -> n!/iquo(n, 2)!^2;
g4 := z -> BesselI(0, 2*z)*(1+z);
a4 := n -> n!*SeriesCoeff(g4, n);
g5 := z -> (1+z/(1-4*z^2))/sqrt(1-4*z^2);
a5 := n -> SeriesCoeff(g5, n);
g6 := (z, n) -> (1+z^2)^n+n*z*(1+z^2)^(n-1);
a6 := n -> SeriesCoeff(g6, n);
a7 := n -> combinat[multinomial](n, floor(n/2), n mod 2, floor(n/2));
h := n -> binomial(n, floor(n/2)); # A001405
a8 := n -> ilcm(h(n-1), h(n));
F := [a1, a2, a3, a4, a5, a6, a7, a8];
for a in F do seq(a(i), i=0..32) od;
MATHEMATICA
f[n_] := 2^(n - Mod[n, 2])*Product[k^((-1)^(k + 1)), {k, n}]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 02 2010 *)
f[n_] := If[OddQ@n, n*Binomial[n - 1, (n - 1)/2], Binomial[n, n/2]]; Array[f, 33, 0] (* Robert G. Wilson v, Aug 10 2010 *)
sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; (* or, twice faster: *) sf[n_] := n!/Quotient[n, 2]!^2; Table[sf[n], {n, 0, 32}] (* Jean-François Alcover, Jul 26 2013, updated Feb 11 2015 *)
PROG
(Magma) [(Factorial(n)/(Factorial(Floor(n/2)))^2): n in [0..40]]; // Vincenzo Librandi, Sep 11 2011
(Sage)
r, n = 1, 0
while True:
yield r
n += 1
r *= 4/n if is_even(n) else n
Search completed in 0.140 seconds
|