cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A001339 a(n) = Sum_{k=0..n} (k+1)! binomial(n,k).

Original entry on oeis.org

1, 3, 11, 49, 261, 1631, 11743, 95901, 876809, 8877691, 98641011, 1193556233, 15624736141, 220048367319, 3317652307271, 53319412081141, 909984632851473, 16436597430879731, 313262209859119579, 6282647653285676001, 132266266384961600021, 2916471173788403280463
Offset: 0

Views

Author

Keywords

Comments

Number of arrangements of {1, 2, ..., n, n + 1} containing the element 1. - Emeric Deutsch, Oct 11 2001
From Thomas Wieder, Oct 21 2004: (Start)
"Also the number of hierarchies with unlabeled elements and labeled levels where the levels are permuted.
"Let l_x denote level x, e.g. l_2 is level 2. Let * denote an element. Then l_1*l_2***l_3** denotes a hierarchy of n = 6 unlabeled elements with one element on level 1, three elements on level 2 and 2 elements on level 3.
"E.g. for n=3 one has a(3) = 11 possible hierarchies: l_1***, l_1**l_2*, l_1*l_2**, l_2**l_1*, l_2*l_1**, l_1*l_2*l_3*, l_3*l_1*l_2*, l_2*l_3*l_1*, l_1*l_3*l_2*, l_2*l_1*l_3*, l_3*l_2*l_1*. See A064618 for the number of hierarchies with labeled elements and labeled levels." (End)
Polynomials in A010027 evaluated at 2.
Also the permanent of any n X n cofactor of an n+1 X n+1 version of J+I other than an n X n version of J + I (that is, a (1, 2) matrix with n - 1 2s, at most one per row and column). - D. G. Rogers, Aug 27 2006
a(n) = number of partitions of [n+1] into lists of sets that are both non-nesting and non-crossing. Non-nesting means that no set is contained in the span (interval from min to max) of another. For example, a(1) counts 12, 1-2, 2-1 and a(2) counts 123, 1-23, 23-1, 3-12, 12-3, 1-2-3, 1-3-2, 2-1-3, 2-3-1, 3-1-2, 3-2-1. - David Callan, Sep 20 2007
Row sums of triangle A137594. - Gary W. Adamson, Jan 28 2008
From Peter Bala, Jul 10 2008: (Start)
a(n) is a difference divisibility sequence, that is, the difference a(n) - a(m) is divisible by n - m for all n and m (provided n is not equal to m). See A000522 for further properties of difference divisibility sequences.
a(n) equals the sum of the lengths of the paths between a pair of distinct vertices of the complete graph K_(n + 2) on n + 2 vertices [Hassani]. For example, for the complete graph K_4 with vertex set {A,B,C,D} the 5 paths between A and B are AB of length 1, ACB and ADB, both of length 2 and ACDB and ADCB, both of length 3. The sum of the lengths is 1 + 2 + 2 + 3 + 3 = 11 = a(2).
The number of paths between 2 distinct vertices of K_n is equal to A000522(n - 2); the number of simple cycles through a vertex of K_n equals A038154(n - 1).
Recurrence relation: a(0) = 1, a(1) = 3, a(n) = (n+2)*a(n - 1) - (n - 1)*a(n - 2) for n >= 2. The sequence b(n) := n*n! = A001563(n) satisfies the same recurrence with the initial conditions b(0) = 0, b(1) = 1. This leads to the finite continued fraction expansion a(n)/b(n) = 3 - 1/(4 - 2/(5 - 3/(6 - ... - (n - 1)/(n + 2)))), n >= 1.
Limit_{n->oo} a(n)/b(n) = e = 3 - 1/(4 - 2/(5 - 3/(6 - ... - n/((n + 3) - ...)))).
For n >= 1, a(n) = b(n)*(3 - Sum_{k=2..n} 1/(k!*(k - 1)*k)) (see the formula by Deutsch) since the rhs satisfies the above recurrence with the same initial conditions. Hence e = 3 - Sum_{k>=2} 1/(k!*(k - 1)*k).
For sequences satisfying the more general recurrence a(n) = (n + 1 + r)*a(n-1) - (n-1)*a(n-2), which yield series acceleration formulas for e/r! that involve the Poisson-Charlier polynomials c_r(-n; -1), refer to A000522 (r=0), A082030 (r=2), A095000 (r=3) and A095177 (r=4). (End)
Binomial transform of n! Offset 1. a(3) = 11. - Al Hakanson (hawkuu(AT)gmail.com), May 18 2009
Equals eigensequence of a triangle with (1, 2, 3, ...) as the right border and the rest 1's; equivalent to a(n) = [n terms of the sequence (1, 1, 1, ...) followed by (n + 1)] dot [(n + 1) terms of the sequence (1, 1, 3, 11, 245, ...)]. Example: 261 = a(4) = (1, 1, 1, 1, 5) dot (1, 1, 3, 11, 49) = 1 + 1 + 3 + 11 + 245 = 261. - Gary W. Adamson, Jul 24 2010
Number of nonnegative integers which use each digit at most once in base n+1. - Franklin T. Adams-Watters, Oct 02 2011
a(n) is the number of permutations of {1,2,...,n+2} in which there is an increasing contiguous subsequence (ascending run) beginning with 1 and ending with n+2. The number of such permutations with exactly k, 0<=k<=n, elements between the 1 and (n+2) is given by A132159(n,k) whose row sums equal this sequence. See example. - Geoffrey Critzer, Feb 15 2013

Examples

			G.f. = 1 + 3*x + 11*x^2 + 49*x^3 + 261*x^4 + 1631*x^5 + 11743*x^6 + 95901*x^7 + ...
a(2) = 11: {1, 12, 21, 13, 31, 123, 132, 213, 231, 312, 321}.
a(2) = 11 because we have 11 permutations of {1,2,3,4} (written in one line notation) that have an increasing subsequence beginning with 1 and ending with 4: 1,2,3,4; 1,2,4,3; 1,3,4,2; 1,4,2,3; 1,4,3,2; 2,1,3,4; 2,1,4,3; 2,3,1,4; 3,1,2,4; 3,1,4,2; 3,2,1,4. - _Geoffrey Critzer_, Feb 15 2013
		

References

  • A. Hordijk, Markov Decision Chains, pp. 97-103 in Images of SMC Research, 1996, Stichting Mathematisch Centrum, Amsterdam, Netherlands, 1996. See p. 103.
  • 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).
  • W. A. Whitworth, DCC Exercises in Choice and Chance, Stechert, NY, 1945, p. 56, ex. 232.

Crossrefs

a(n) = A000522(n+1) - A000522(n).
First differences of A000522, A007526, A026243, A073591.
Equals (1/2)*A006183(n-2).
Equals A036918(n+1) + 1.
Leftmost column of A276588.
Cf. also A136104.

Programs

  • GAP
    A001339:=List([0..20],n-> Sum([0..n], k-> Factorial(k+1)*Binomial(n,k))); # Muniru A Asiru, Feb 17 2018
    
  • Magma
    [Factorial(n)*(&+[(n-k+1)/Factorial(k): k in [0..n]]): n in [0..20]]; // G. C. Greubel, Jul 15 2019
    
  • Maple
    a:=proc(n) options operator, arrow: factorial(n)*n*(3-(sum(1/(j*(j-1)*factorial(j)), j=2..n))) end proc: 1, seq(a(n),n=1..20); # Emeric Deutsch, Apr 12 2008
    a := n -> hypergeom([2, -n], [], -1); seq(simplify(a(n)), n=0..18); # Peter Luschny, Sep 20 2014
  • Mathematica
    a[n_] := n!*Sum[(k+1)/(n-k)!, {k, 0, n}]; a /@ Range[0, 20] (* Jean-François Alcover, Jul 13 2011 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ Exp[x] / (1 - x)^2, {x, 0, n}]] (* Michael Somos, Oct 20 2011 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( exp(x + x * O(x^n)) / (1 - x)^2, n))} /* Michael Somos, Mar 04 2004 */
    
  • PARI
    vector(20, n, n--; n!*sum(k=0,n,(n-k+1)/k!)) \\ G. C. Greubel, Jul 15 2019
    
  • Sage
    [factorial(n)*sum((n-k+1)/factorial(k) for k in (0..n)) for n in (0..20)] # G. C. Greubel, Jul 15 2019

Formula

E.g.f.: exp(x)/(1-x)^2.
a(n) = round(evalf(exp(1)*(n-1)*(n-1)!)) (n>1).
a(n) = floor(n*n!*e) + 1. - Melvin J. Knight (knightmj(AT)juno.com), May 30 2001
a(n) = {e*n*n!} for n > 0, where {x} denotes the nearest integer part. Proposed by Simon Plouffe, March 1993.
The n-th row of array A089900 is the n-th binomial transform of this sequence. The (n+1)-th term of the n-th binomial transform is (n+1)^(n+1), for n >= 0. E.g., the 5th term of the 4th binomial transform is 5^5: [1, 7, 51, 389, 3125, ...]. - Paul D. Hanna, Nov 14 2003
G.f.: Sum_{k>=0} k! * (x / (1 - x))^k. - Michael Somos, Mar 04 2004
a(n) = Sum_{k = 0..n} A046716(n, k)*2^(n-k). - Philippe Deléham, Jun 12 2004
(n-1)*a(n) = n^2*a(n-1)-1. - Vladeta Jovovic, Sep 04 2004
a(n) = Sum_{k=0..n} P(n, k)*(k+1). - Ross La Haye, Aug 28 2005
a(n) = n!*n*(3 - Sum_{j=2..n} 1/(j*(j-1)*j!)) for n>=1. - Emeric Deutsch, Apr 12 2008
a(n) = (a(n-1)^2 + 2 * a(n-2)^2 + a(n-2) * a(n-3) - 4 * a(n-1) * a(n-3)) / (a(n-2) - a(n-3)) if n>1. - Michael Somos, Oct 20 2011
E.g.f.:1/Q(0); Q(k) = 1 - 2*x/(1+x/(2-x-2/(1-x*(k+1)/Q(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Nov 18 2011
G.f.: 1/Q(0), where Q(k) = 1 - x - x*(k+2)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
G.f.: Q(0)/x - 1/x, where Q(k) = 1 + (2*k + 1)*x/( 1 - x - 2*x*(1-x)*(k+1)/(2*x*(k+1) + (1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 09 2013
G.f.: (2/x)/G(0) - 1/x, where G(k) = 1 + 1/(1 - x*(2*k+2)/(x*(2*k+3) - 1 + x*(2*k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 31 2013
G.f.: Q(0)/(2*x) - 1/x, where Q(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + (1-x)/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 08 2013
G.f.: W(0)/x - 1/x, where W(k) = 1 - x*(k+1)/( x*(k+2) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 25 2013
a(n) = hypergeometric([2, -n], [], -1). - Peter Luschny, Sep 20 2014
Upper and bottom right terms of the infinite 2 X 2 matrix product_{N=1,2,3,...} [(1,1); (1,N)]. - Gary W. Adamson, Jul 28 2016
a(n) = R(n,n+1,n) where R(x,y,z) is defined to be R(x+1,y,z+1) = R(y,x,x) + R(z,y,z), R(0,y,z+1) = R(z,y,z), R(x+1,y,0) = R(y,x,x), and R(0,y,0) = y. - David M. Cerna, Feb 16 2018
a(n) = (n + 1)!*hypergeom([-n], [-n-1], 1). - Peter Luschny, Nov 02 2018
a(n) = Integral_{x=0..1} (-LambertW(-1,-x/e))^n dx. - Gleb Koloskov, Jul 25 2021
a(n) = KummerU(-n, -n-1, 1). - Peter Luschny, May 10 2022

Extensions

Typo in description in 1995 Encyclopedia of Integer Sequences corrected Mar 15 1997
Link updated by Susanne Wienand, Nov 19 2011

A136717 Triangle T(n,k), 1 <= k <= n, read by rows: T(n,k) is the number of permutations in the symmetric group S_n having k multiplicative 3-excedances. Equivalently, the number of permutations of the set {3,6,9,...,3n} with k excedances.

Original entry on oeis.org

1, 0, 2, 0, 2, 4, 0, 0, 12, 12, 0, 0, 0, 72, 48, 0, 0, 0, 72, 456, 192, 0, 0, 0, 0, 960, 3120, 960, 0, 0, 0, 0, 0, 10800, 23760, 5760, 0, 0, 0, 0, 0, 10800, 133920, 183600, 34560, 0, 0, 0, 0, 0, 0, 241920, 1572480, 1572480, 241920
Offset: 1

Views

Author

Peter Bala, Jan 23 2008

Keywords

Comments

A permutation (p(1),p(2),...,p(n)) in the symmetric group S_n has a multiplicative 3-excedance at position i, 1 <= i <= n, if 3*p(i) > i. The (n,k)-th entry in this array gives the number of permutations in S_n with k multiplicative 3-excedances.
Compare with A008292, the triangle of Eulerian numbers, which enumerates permutations by the usual excedance number and with A136715, which enumerates permutations by multiplicative 2-excedances.
Let e(p)= |{i | 1 <= i < = n, 3*p(i) > i}| denote the number of multiplicative 3-excedances in the permutation p. This 3-excedance statistic e(p) on the symmetric group S_n is related to a descent statistic as follows. Define a permutation p in S_n to have a multiplicative 3-descent at position i, 1 <= i <= n-1, if p(i) is divisible by 3 and p(i) > p(i+1). For example, the permutation (4,1,6,5,3,2) in S_6 has two multiplicative 3-descents (at position 3 and position 5). Array A136718 records the number of permutations of S_n with k multiplicative 3-descents.
Let d(p) = |{i | 1 <= i <= n-1, p(i) is divisible by 3 & p(i) > p(i+1)}| count the multiplicative 3-descents in the permutation p. Comparison of the recursion relations for the entries of this table with the recursion relations for the entries of A136718 shows that e(p) and d(p) are related by sum {p in S_n} x^e(p) = x^ceiling(2*n/3)* sum {p in S_n} x^d(p). Thus the shifted multiplicative 3-excedance statistic e(p) - ceiling(2*n/3) and the multiplicative 3-descent statistic d(p) are equidistributed on the symmetric group S_n.
(Note: There is also an additive r-excedance statistic on the symmetric group, due to Riordan, where the condition r*p(i) > i is replaced by p(i) >= i+r. See A120434 for the r = 2 case.)
An alternative interpretation of this array is as follows: Let T_n denote the set {3,6,9,...,3n} and let now p denote a bijection p:T_n -> T_n. We say the permutation p has an excedance at position i, 1 <= i <= n, if p(3i) > i. For example, if we represent p in one line notation by the vector (p(3),p(6),...,p(3n)), then the permutation (9,18,3,12,15,6) of T_6 has four excedances in total (at positions 1, 2, 4 and 5). This array gives the number of permutations of the set T_n with k excedances. This is the viewpoint taken in [Jansson].
A137593 = A000012 * this triangular matrix. A137594 = A007318 * this triangular matrix. - Gary W. Adamson, Jan 28 2008

Examples

			T(3,3) = 4; the four permutations in S_3 with three multiplicative 3-excedances are (1,2,3), (1,3,2), (2,1,3) and (3,1,2). The remaining two permutations (2,3,1) and (3,2,1) each have two multiplicative 3-excedances.
Equivalently, the four permutations of the set {3,6,9} with 3 excedances are (3,6,9), (3,9,6), (6,3,9) and (9,3,6). The remaining two permutations (6,9,3) and (9,6,3) each have 2 excedances.
Triangle starts
n\k|..1....2....3....4....5....6
---+----------------------------
1..|..1
2..|..0....2
3..|..0....2....4
4..|..0....0...12...12
5..|..0....0....0...72...48
6..|..0....0....0...72..456..192
		

Crossrefs

Cf. A000142 (row sums), A008292, A136718, A136715.

Formula

Recurrence relations (apply proposition 2.2 of [Jansson]):
T(3n,k) = (k+1-2n)*T(3n-1,k) + (5n-k)*T(3n-1,k-1) for n >= 1;
T(3n+1,k) = (k-2n)*T(3n,k) + (5n+2-k)*T(3n,k-1) for n >= 0;
T(3n+2,k) = (k-1-2n)*T(3n+1,k) + (5n+4-k)*T(3n+1,k-1) for n >= 0.
Boundary conditions: T(0,k) = 0 all k; T(n,0) = 0 all n; T(1,1) = 1.
Define the shifted row polynomials R(n,x) by
R(n,x) := x^(1+floor(n/3)-n)* sum {k = n-floor(n/3)..n} T(n,k)*x^k.
The first few values are R(1,x) = x, R(2,x) = 2x, R(3,x) = 2x+4x^2 and R(4,x) = 12x+12x^2.
The recurrence relations yield the identities:
x*d/dx(1/x*R(3n,x)/(1-x)^(3n+1)) = R(3n+1,x)/(1-x)^(3n+2);
x*d/dx(1/x*R(3n+1,x)/(1-x)^(3n+2)) = R(3n+2,x)/(1-x)^(3n+3);
x*d/dx(R(3n+2,x)/(1-x)^(3n+3)) = R(3n+3,x)/(1-x)^(3n+4).
An easy induction argument now gives the Taylor series expansions:
R(3n,x)/(1-x)^(3n+1) = sum {m = 1..inf} m^2*(m+1)*(m+2)^2*(m+3)*...* (m+2n-2)^2*(m+2n-1)*x^m;
R(3n+1,x)/(1-x)^(3n+2) = sum {m = 1..inf} m*((m+1)^2*(m+2)*(m+3)^2*(m+4) *...*(m+2n-1)^2*(m+2n))*x^m.
R(3n+2,x)/(1-x)^(3n+3) = sum {m = 1..inf} m*((m+1)*(m+2)^2*(m+3)*(m+4)^2 *...*(m+2n-1)*(m+2n)^2)*(m+2n+1)*x^m.
For example, for row 6 (n = 2) we have the expansion (72x+456x^2+192x^3)/(1-x)^7 = 72x + 960x^2 + 5400x^3 + ... = (1^2*2*3^2*4)*x + (2^2*3*4^2*5)*x^2 + (3^2*4*5^2*6)*x^3 + ... .
Showing 1-2 of 2 results.