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-10 of 12 results. Next

A084938 Triangle read by rows: T(n,k) = Sum_{j>=0} j!*T(n-j-1, k-1) for n >= 0, k >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 6, 5, 3, 1, 0, 24, 16, 9, 4, 1, 0, 120, 64, 31, 14, 5, 1, 0, 720, 312, 126, 52, 20, 6, 1, 0, 5040, 1812, 606, 217, 80, 27, 7, 1, 0, 40320, 12288, 3428, 1040, 345, 116, 35, 8, 1, 0, 362880, 95616, 22572, 5768, 1661, 519, 161, 44, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Jul 16 2003; corrections Dec 17 2008, Dec 20 2008, Feb 05 2009

Keywords

Comments

Triangle T(n,k) is [0,1,1,2,2,3,3,4,4,...] DELTA [1,0,0,0,0,0,...] = A110654 DELTA A000007.
In general, the triangle [r_0,r_1,r_2,r_3,...] DELTA [s_0,s_1,s_2,s_3,...] has generating function 1/(1-(r_0*x+s_0*x*y)/(1-(r_1*x+s_1*x*y)/(1-(r_2*x+s_2*x*y)/(1-(r_3*x+s_3*x*y)/(1-...(continued fraction). See also the Formula section below.
T(n,k) = number of permutations on [n] that (i) contain a 132 pattern only as part of a 4132 pattern and (ii) start with n+1-k. For example, for n >= 1, T(n,1) = (n-1)! counts all (n-1)! permutations on [n] that start with n: either they avoid 132 altogether or the initial entry serves as the "4" in a 4132 pattern and T(4,3) = 3 counts 2134, 2314, 2341. - David Callan, Jul 20 2005
T(n,k) is the number of permutations on [n] that (i) contain a (scattered) 342 pattern only as part of a 1342 pattern and (ii) contain 1 in position k. For example, T(4,3) counts 3214, 4213, 4312. (It does not count, say, 2314 because 231 forms an offending 342 pattern.) - David Callan, Jul 20 2005
Riordan array (1,x*g(x)) where g(x) is the g.f. of the factorials (n!). - Paul Barry, Sep 25 2008
Modulo 2, this sequence becomes A106344.
T(n,k) is the number of permutations of {1,2,...,n} having k cycles such that the elements of each cycle of the permutation form an interval. - Ran Pan, Nov 11 2016
The convolution triangle of the factorial numbers. - Peter Luschny, Oct 09 2022

Examples

			From _Paul Barry_, Sep 25 2008: (Start)
Triangle [0,1,1,2,2,3,3,4,4,5,5,...] DELTA [1,0,0,0,0,...] begins
  1;
  0,      1;
  0,      1,     1;
  0,      2,     2,     1;
  0,      6,     5,     3,    1;
  0,     24,    16,     9,    4,    1;
  0,    120,    64,    31,   14,    5,   1;
  0,    720,   312,   126,   52,   20,   6,   1;
  0,   5040,  1812,   606,  217,   80,  27,   7,  1;
  0,  40320, 12288,  3428, 1040,  345, 116,  35,  8, 1;
  0, 362880, 95616, 22572, 5768, 1661, 519, 161, 44, 9, 1. (End)
From _Paul Barry_, May 14 2009: (Start)
The production matrix is
  0,   1;
  0,   1,  1;
  0,   1,  1, 1;
  0,   2,  1, 1, 1;
  0,   7,  2, 1, 1, 1;
  0,  34,  7, 2, 1, 1, 1;
  0, 206, 34, 7, 2, 1, 1, 1;
which is based on A075834. (End)
		

Crossrefs

Programs

  • Magma
    function T(n,k) // T = A084938
      if k lt 0 or k gt n then return 0;
      elif n eq 0 or k eq n then return 1;
      elif k eq 0 then return 0;
      else return (&+[Factorial(j)*T(n-j-1,k-1): j in [0..n-1]]);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 10 2022
  • Maple
    DELTA := proc(r,s,n) local T,x,y,q,P,i,j,k,t1; T := array(0..n,0..n);
    for i from 0 to n do q[i] := x*r[i+1]+y*s[i+1]; od: for k from 0 to n do P[0,k] := 1; od: for i from 0 to n do P[i,-1] := 0; od:
    for i from 1 to n do for k from 0 to n do P[i,k] := sort(expand(P[i,k-1] + q[k]*P[i-1,k+1])); od: od:
    for i from 0 to n do t1 := P[i,0]; for j from 0 to i do T[i,j] := coeff(coeff(t1,x,i-j),y,j); od: lprint( seq(T[i,j],j=0..i) ); od: end;
    # To produce the current triangle: s3 := n->floor((n+1)/2); s4 := n->if n = 0 then 1 else 0; fi; r := [seq(s3(i),i= 0..40)]; s := [seq(s4(i),i=0..40)]; DELTA(r,s,20);
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> factorial(n - 1)); # Peter Luschny, Oct 09 2022
  • Mathematica
    a[0, 0] = 1; a[n_, k_] := a[n, k] = Sum[j! a[n - j - 1, k - 1], {j, 0, n - 1}]; Flatten[Table[a[i, j], {i, 0, 10}, {j, 0, i}]] (* T. D. Noe, Feb 22 2012 *)
    DELTA[r_, s_, m_] := Module[{p, q, t, x, y}, q[k_] := x*r[[k+1]] + y*s[[k+1]]; p[0, ] = 1; p[, -1] = 0; p[n_ /; n >= 1, k_ /; k >= 0] := p[n, k] = p[n, k-1] + q[k]*p[n-1, k+1] // Expand; t[n_, k_] := Coefficient[p[n, 0], x^(n-k)*y^k]; t[0, 0] = p[0, 0]; Table[t[n, k], {n, 0, m}, {k, 0, n}]]; DELTA[Floor[Range[10]/2], Prepend[Table[0, {10}], 1], 10] (* Jean-François Alcover, Sep 12 2013, after Philippe Deléham *)
  • Sage
    def delehamdelta(R, S) :
        L = min(len(R), len(S)) + 1
        ring = PolynomialRing(ZZ, 'x')
        x = ring.gen()
        A = [Rk + x*Sk for Rk, Sk in zip(R, S)]
        C = [ring(0)] + [ring(1) for i in range(L)]
        for k in (1..L) :
            for n in range(k-1,0,-1) :
                C[n] = C[n-1] + C[n+1]*A[n-1]
            yield list(C[1])
    def A084938_triangle(n) :
        for row in delehamdelta([(i+1)//2 for i in (0..n)], [0^i for i in (0..n)]):
            print(row)
    A084938_triangle(10) # Peter Luschny, Jan 28 2012
    

Formula

The operator DELTA takes two sequences r = (r_0, r_1, ...), s = (s_0, s_1, ...) and produces a triangle T(n, k), 0 <= k <= n, as follows:
Let q(k) = x*r_k + y*s_k for k >= 0; let P(n, k) (n >= 0, k >= -1) be defined recursively by P(0, k) = 1 for k >= 0; P(n, -1) = 0 for n >= 1; P(n, k) = P(n, k-1) + q(k)*P(n-1, k+1) for n >= 1, k >= 0. Then P(n, k) is a homogeneous polynomial in x and y of degree n and T(n, k) = coefficient of x^(n-k)*y^k in P(n, 0).
T(n, n) = 1.
T(k+1, k) = A001477(k).
T(k+2, k) = A000096(k).
T(n+1, 1) = A000142(n).
T(n+2, 2) = A003149(n).
T(n+3, 3) = A090595(n).
T(n+4, 4) = A090319(n).
T(m+n, m) = Sum_{k=0..n} A090238(n, k)*binomial(m, k).
G.f. for column k: Sum_{n>=0} T(k+n, k)*x^n = (Sum_{n>=0} n!*x^n )^k.
For k>0, T(n+k, k) = Sum_{a_1 + a_2 + .. + a_k = n} (a_1)!*(a_2)!*..*(a_k)!; a_i>=0, n>=0.
T(n,k) = Sum_{j>=0} A075834(j)*T(n-1,k+j-1).
T(2n,n) = A287899(n). - Alois P. Heinz, Jun 02 2017
From G. C. Greubel, Nov 10 2022: (Start)
Sum_{k=0..n} T(n, k) = A051295(n).
Sum_{k=0..n} (-1)^k*T(n, k) = [n=0] - A052186(n-1)*[n>0]. (End)

Extensions

Name edited by Derek Orr, May 01 2015

A003319 Number of connected permutations of [1..n] (those not fixing [1..j] for 0 < j < n). Also called indecomposable permutations, or irreducible permutations.

Original entry on oeis.org

1, 1, 1, 3, 13, 71, 461, 3447, 29093, 273343, 2829325, 31998903, 392743957, 5201061455, 73943424413, 1123596277863, 18176728317413, 311951144828863, 5661698774848621, 108355864447215063, 2181096921557783605, 46066653228356851631, 1018705098450570562877
Offset: 0

Views

Author

Keywords

Comments

Also the number of permutations with no global descents, as introduced by Aguiar and Sottile [Corollaries 6.3, 6.4 and Remark 6.5].
Also the dimensions of the homogeneous components of the space of primitive elements of the Malvenuto-Reutenauer Hopf algebra of permutations. This result, due to Poirier and Reutenauer [Theoreme 2.1] is stated in this form in the work of Aguiar and Sottile [Corollary 6.3] and also in the work of Duchamp, Hivert and Thibon [Section 3.3].
Related to number of subgroups of index n-1 in free group of rank 2 (i.e., maximal number of subgroups of index n-1 in any 2-generator group). See Problem 5.13(b) in Stanley's Enumerative Combinatorics, Vol. 2.
Also the left border of triangle A144107, with row sums = n!. - Gary W. Adamson, Sep 11 2008
Hankel transform is A059332. Hankel transform of aerated sequence is A137704(n+1). - Paul Barry, Oct 07 2008
For every n, a(n+1) is also the moment of order n for the probability density function rho(x) = exp(x)/(Ei(1,-x)*(Ei(1,-x) + 2*I*Pi)) on the interval 0..infinity, with Ei the exponential-integral function. - Groux Roland, Jan 16 2009
Also (apparently), a(n+1) is the number of rooted hypermaps with n darts on a surface of any genus (see Walsh 2012). - N. J. A. Sloane, Aug 01 2012
Also recurrent sequence A233824 (for n > 0) in Panaitopol's formula for pi(x), the number of primes <= x. - Jonathan Sondow, Dec 19 2013
Also the number of mobiles (cyclic rooted trees) with an arrow from each internal vertex to a descendant of that vertex. - Brad R. Jones, Sep 12 2014
Up to sign, Möbius numbers of the shard intersection orders of type A, see Theorem 1.3 in Reading reference. - F. Chapoton, Apr 29 2015
Also, a(n) is the number of distinct leaf matrices of complete non-ambiguous trees of size n. - Daniel Chen, Oct 23 2022

Examples

			G.f. = 1 + x + x^2 + 3*x^3 + 13*x^4 + 71*x^5 + 461*x^6 + 3447*x^7 + 29093*x^8 + ...
From _Peter Luschny_, Aug 03 2022: (Start)
A permutation p in [n] (where n >= 0) is reducible if there exists an i in 1..n-1 such that for all j in the range 1..i and all k in the range i+1..n it is true that p(j) < p(k). (Note that a range a..b includes a and b.) If such an i exists we say that i splits the permutation at i.
Examples:
* () is not reducible since there is no index i which splits (). (=> a(0) = 1)
* (1) is not reducible since there is no index i which splits (1). (=> a(1) = 1)
* (1, 2) is reducible since index 1 splits (1, 2) as p(1) < p(2).
* (2, 1) is not reducible since at the only potential splitting point i = 1 we have p(1) > p(2). (=> a(2) = 1)
* For n = 3 we have (1, 2, 3), (1, 3, 2), and (2, 1, 3) are reducible and (2, 3, 1), (3, 1, 2), and (3, 2, 1) are irreducible. (End)
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 25, Example 20.
  • E. W. Bowen, Letter to N. J. A. Sloane, Aug 27 1976.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 84 (#25), 262 (#14) and 295 (#16).
  • P. de la Harpe, Topics in Geometric Group Theory, Univ. Chicago Press, 2000, p. 23, N_{n,2}.
  • I. M. Gessel and R. P. Stanley, Algebraic Enumeration, chapter 21 in Handbook of Combinatorics, Vol. 2, edited by R. L. Graham et al., The MIT Press, Mass, 1995.
  • M. Kauers and P. Paule, The Concrete Tetrahedron, Springer 2011, p. 22.
  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 19 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 1, Chap. 1, Ex. 128; Vol. 2, 1999, see Problem 5.13(b).

Crossrefs

See A167894 for another version.
Bisections give A272656, A272657.
Row sums of A111184 and A089949.
Leading diagonal of A059438. A diagonal of A263484.
Cf. A090238, A000698, A356291 (reducible permutations).
Column k=0 of A370380 and A370381 (without pair of initial terms and with different offset).

Programs

  • Maple
    INVERTi([seq(n!,n=1..20)]);
    A003319 := proc(n) option remember; n! - add((n-j)!*A003319(j), j=1..n-1) end;
    [seq(A003319(n), n=0..50)]; # N. J. A. Sloane, Dec 28 2011
    series(2 - 1/hypergeom([1,1], [], x), x=0,50); # Mark van Hoeij, Apr 18 2013
  • Mathematica
    a[n_] := a[n] = n! - Sum[k!*a[n-k], {k, 1, n-1}]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Oct 11 2011, after given formula *)
    CoefficientList[Assuming[Element[x,Reals],Series[2-E^(1/x)* x/ExpIntegralEi[1/x],{x,0,20}]],x] (* Vaclav Kotesovec, Mar 07 2014 *)
    a[ n_] := If[ n < 2, 1, a[n] = (n - 2) a[n - 1] + Sum[ a[k] a[n - k], {k, n - 1}]]; (* Michael Somos, Feb 23 2015 *)
    Table[SeriesCoefficient[1 + x/(1 + ContinuedFractionK[-Floor[(k + 2)/2]*x, 1, {k, 1, n}]), {x, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Sep 29 2017 *)
  • PARI
    {a(n) = my(A); if( n<1, 1, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (k - 2) * A[k-1] + sum( j=1, k-1, A[j] * A[k-j])); A[n])}; /* Michael Somos, Jul 24 2011 */
    
  • PARI
    {if(n<1,1,a(n)=local(A=x);for(i=1,n,A=x-x*A+A^2+x^2*A' +x*O(x^n));polcoeff(A,n))} /* Paul D. Hanna, Jul 30 2011 */
    
  • Sage
    def A003319_list(len):
        R, C = [1], [1] + [0] * (len - 1)
        for n in range(1, len):
            for k in range(n, 0, -1):
                C[k] = C[k - 1] * k
            C[0] = -sum(C[k] for k in range(1, n + 1))
            R.append(-C[0])
        return R
    print(A003319_list(21))  # Peter Luschny, Feb 19 2016

Formula

G.f.: 2 - 1/Sum_{k>=0} k!*x^k.
Also a(n) = n! - Sum_{k=1..n-1} k!*a(n-k) [Bowen, 1976].
Also coefficients in the divergent series expansion log Sum_{n>=0} n!*x^n = Sum_{n>=1} a(n+1)*x^n/n [Bowen, 1976].
a(n) = (-1)^(n-1) * det {| 1! 2! ... n! | 1 1! ... (n-1)! | 0 1 1! ... (n-2)! | ... | 0 ... 0 1 1! |}.
INVERTi transform of factorial numbers, A000142 starting from n=1. - Antti Karttunen, May 30 2003
Gives the row sums of the triangle [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] DELTA [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...] where DELTA is the operator defined in A084938; this triangle A089949. - Philippe Deléham, Dec 30 2003
a(n+1) = Sum_{k=0..n} A089949(n,k). - Philippe Deléham, Oct 16 2006
L.g.f.: Sum_{n>=1} a(n)*x^n/n = log( Sum_{n>=0} n!*x^n ). - Paul D. Hanna, Sep 19 2007
G.f.: 1+x/(1-x/(1-2*x/(1-2*x/(1-3*x/(1-3*x/(1-4*x/(1-4*x/(1-...)))))))) (continued fraction). - Paul Barry, Oct 07 2008
a(n) = -Sum_{i=0..n} (-1)^i*A090238(n, i) for n > 0. - Peter Luschny, Mar 13 2009
From Gary W. Adamson, Jul 14 2011: (Start)
a(n) = upper left term in M^(n-1), M = triangle A128175 as an infinite square production matrix (deleting the first "1"); as follows:
1, 1, 0, 0, 0, 0, ...
2, 2, 1, 0, 0, 0, ...
4, 4, 3, 1, 0, 0, ...
8, 8, 7, 4, 1, 0, ...
16, 16, 15, 11, 5, 1, ...
... (End)
O.g.f. satisfies: A(x) = x - x*A(x) + A(x)^2 + x^2*A'(x). - Paul D. Hanna, Jul 30 2011
From Sergei N. Gladkovskii, Jun 24 2012: (Start)
Let A(x) be the g.f.; then
A(x) = 1/Q(0), where Q(k) = x + 1 + x*k - (k+2)*x/Q(k+1).
A(x) = (1-1/U(0))/x, when U(k) = 1 + x*(2*k+1)/(1 - 2*x*(k+1)/(2*x*(k+1) + 1/U(k+1))). (End)
From Sergei N. Gladkovskii, Aug 03 2013: (Start)
Continued fractions:
G.f.: 1 - G(0)/2, where G(k) = 1 + 1/(1 - x*(2*k+2)/(x*(2*k+2) - 1 + x*(2*k+2)/G(k+1))).
G.f.: (x/2)*G(0), where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1/2) + 1/G(k+1))).
G.f.: x*G(0), where G(k) = 1 - x*(k+1)/(x - 1/G(k+1)).
G.f.: 1 - 1/G(0), where G(k) = 1 - x*(k+1)/(x*(k+1) - 1/(1 - x*(k+1)/(x*(k+1) - 1/G(k+1)))).
G.f.: x*W(0), where W(k) = 1 - x*(k+1)/(x*(k+1) - 1/(1 - x*(k+2)/(x*(k+2) - 1/W(k+1)))).
(End)
a(n) = A233824(n-1) if n > 0. (Proof. Set b(n) = A233824(n), so that b(n) = n*n! - Sum_{k=1..n-1} k!*b(n-k). To get a(n+1) = b(n) for n >= 0, induct on n, use (n+1)! = n*n! + n!, and replace k with k+1 in the sum.) - Jonathan Sondow, Dec 19 2013
a(n) ~ n! * (1 - 2/n - 1/n^2 - 5/n^3 - 32/n^4 - 253/n^5 - 2381/n^6 - 25912/n^7 - 319339/n^8 - 4388949/n^9 - 66495386/n^10), for coefficients see A260503. - Vaclav Kotesovec, Jul 27 2015
For n>0, a(n) = (A059439(n) - A259472(n))/2. - Vaclav Kotesovec, Aug 03 2015
From Peter Bala, May 23 2017: (Start)
G.f.: 1 + x/(1 + x - 2*x/(1 + 2*x - 3*x/(1 + 3*x - 4*x/(1 + 4*x - ...)))). Cf. A000698.
G.f.: 1/(1 - x/(1 + x - x/(1 - 2*x/(1 - 2*x/(1 - 3*x/(1 - 3*x/(1 - 4*x/(1 - 4*x/(1 - ...))))))))). (End)
Conjecture: a(n) = A370380(n-2, 0) = A370381(n-2, 0) for n > 1 with a(0) = a(1) = 1. - Mikhail Kurkov, Apr 26 2024

Extensions

More terms from Michael Somos, Jan 26 2000
Additional comments from Marcelo Aguiar (maguiar(AT)math.tamu.edu), Mar 28 2002
Added a(0)=0 (some of the formulas may now need adjusting). - N. J. A. Sloane, Sep 12 2012
Edited and set a(0) = 1 by Peter Luschny, Aug 03 2022

A357368 Triangle read by rows. Convolution triangle of the prime indicator sequence A089026.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 4, 1, 0, 1, 10, 6, 1, 0, 5, 14, 21, 8, 1, 0, 1, 23, 47, 36, 10, 1, 0, 7, 28, 90, 108, 55, 12, 1, 0, 1, 49, 147, 258, 205, 78, 14, 1, 0, 1, 46, 249, 520, 595, 346, 105, 16, 1, 0, 1, 75, 360, 978, 1437, 1185, 539, 136, 18, 1
Offset: 0

Views

Author

Peter Luschny, Oct 03 2022

Keywords

Comments

To clarify our terminology: We say T is the convolution triangle of a (or T is the partition transform of a), if a is a sequence of integers defined for n >= 1, and the transformation, as defined by the Maple function below, applied to a, returns T. In the generated lower triangular matrix T, i.e., in the convolution triangle of a, T(n, 1) = a(n) for n >= 1.
For instance, let a(n) = Bell(n), then we call A357583 the convolution triangle of the Bell numbers, but not A205574, which is also called the "Bell convolution triangle" in the comments but leads to a different triangle. Similarly, if a(n) = n!, then A090238 is the convolution triangle of the factorial numbers, not A084938. Third example: A128899 is the convolution triangle of the Catalan numbers in our setup, not A059365. More generally, we recommend that when computing the transform of a 0-based sequence to use only the terms for n >= 1 and not to shift the sequence.
Note that T is (0, 0)-based and the first column of a convolution triangle always is 1, 0, 0, 0, ... and the main diagonal is 1, 1, 1, 1, ... if a(1) = 1. The (1, 1)-based subtriangle of a genuine convolution triangle, i.e., a convolution triangle without column 0 and row 0, is often used in place of the convolution triangle but does not fit well into some applications of the convolution triangles.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0, 1;
[2] 0, 2,  1;
[3] 0, 3,  4,   1;
[4] 0, 1, 10,   6,   1;
[5] 0, 5, 14,  21,   8,   1;
[6] 0, 1, 23,  47,  36,  10,   1;
[7] 0, 7, 28,  90, 108,  55,  12,   1;
[8] 0, 1, 49, 147, 258, 205,  78,  14,  1;
[9] 0, 1, 46, 249, 520, 595, 346, 105, 16, 1;
		

Crossrefs

Programs

  • Maple
    PMatrix := proc(dim, a) local n, k, m, g, M, A;
       if n = 0 then return [1] fi;
       A := [seq(a(i), i = 1..dim-1)];
       M := Matrix(dim, shape=triangular[lower]); M[1, 1] := 1;
       for m from 2 to dim do
           M[m, m] := M[m - 1, m - 1] * A[1];
           for k from m-1 by -1 to 2 do
               M[m, k] := add(A[i]*M[m-i, k-1], i = 1..m-k+1)
    od od; M end:
    a := n -> if isprime(n) then n else 1 fi: PMatrix(10, a);
    # Alternatively, as the coefficients of row polynomials:
    P := proc(n, x, a) option remember; ifelse(n = 0, 1,
        x*add(a(n - k)*P(k, x, a), k = 0..n-1)) end:
    Pcoeffs := proc(n, a) seq(coeff(P(n, x, a), x, k), k=0..n) end:
    seq(Pcoeffs(n, a), n = 0..9);
    # Alternatively, term by term:
    T := proc(n, k, a) option remember; # Alois P. Heinz style
        `if`(k=0, `if`(n=0, 1, 0), `if`(k=1, `if`(n=0, 0, a(n)),
        (q->add(T(j, q, a)*T(n-j, k-q, a), j=0..n))(iquo(k, 2)))) end:
    seq(seq(T(n, k, a), k=0..n), n=0..9);
  • Mathematica
    PMatrix[dim_, a_] := Module[{n, k, m, g, M, A}, If[n == 0, Return[1]]; A = Array[a, dim-1]; M = Array[0&, {dim, dim}]; M[[1, 1]] = 1; For[m = 2, m <= dim, m++, M[[m, m]] = M[[m-1, m-1]]*A[[1]]; For[k = m-1, k >= 2, k--, M[[m, k]] = Sum[A[[i]]*M[[m-i, k-1]], {i, 1, m-k+1}]]]; M];
    a[n_] :=  If[PrimeQ[n], n, 1];
    nmax = 10;
    PM = PMatrix[nmax+1, a];
    T[n_, k_] := PM[[n+1, k+1]];
    Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 21 2022 *)
  • Python
    def ConvTriangle(dim: int, a) -> list[list[int]]:
        if callable(a): # Cache the input sequence.
            A = [a(i) for i in range(1, dim)]
        else:
            A = a
        print("In:", A)
        C = [[0 for k in range(m + 1)] for m in range(dim)]
        C[0][0] = 1
        for m in range(1, dim):
            C[m][m] = C[m - 1][m - 1] * A[0]
            for k in range(m - 1, 0, -1):
                C[m][k] = sum(A[i] * C[m - i - 1][k - 1] for i in range(m - k + 1))
        return C
    from sympy import isprime, flatten
    def a(n): return n if isprime(n) else 1
    print(flatten(ConvTriangle(10, a)))

A051296 INVERT transform of factorial numbers.

Original entry on oeis.org

1, 1, 3, 11, 47, 231, 1303, 8431, 62391, 524495, 4960775, 52223775, 605595319, 7664578639, 105046841127, 1548880173119, 24434511267863, 410503693136559, 7315133279097607, 137787834979031839, 2734998201208351479, 57053644562104430735, 1247772806059088954855
Offset: 0

Views

Author

Keywords

Comments

a(n) = Sum[ a1!a2!...ak! ] where (a1,a2,...,ak) ranges over all compositions of n. a(n) = number of trees on [0,n] rooted at 0, consisting entirely of filaments and such that the non-root labels on each filament, when arranged in order, form an interval of integers. A filament is a maximal path (directed away from the root) whose interior vertices all have outdegree 1 and which terminates at a leaf. For example with n=3, a(n) = 11 counts all n^(n-2) = 16 trees on [0,3] except the 3 trees {0->1, 1->2, 1->3}, {0->2, 2->1, 2->3}, {0->3, 3->1, 3->2} (they fail the all-filaments test) and the 2 trees {0->2, 0->3, 3->1}, {0->2, 0->1, 1->3} (they fail the interval-of-integers test). - David Callan, Oct 24 2004
a(n) is the number of lists of "unlabeled" permutations whose total length is n. "Unlabeled" means each permutation is on an initial segment of the positive integers (cf. A090238). Example: with dashes separating permutations, a(3) = 11 counts 123, 132, 213, 231, 312, 321, 1-12, 1-21, 12-1, 21-1, 1-1-1. - David Callan, Sep 20 2007
Number of compositions of n where there are k! sorts of part k. - Joerg Arndt, Aug 04 2014

Examples

			a(4) = 47 = 1*24 + 1*6 + 3*2 + 11*1.
a(4) = 47, the upper left term of M^4.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974.

Crossrefs

Cf. A051295, row sums of A090238.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<1, 1,
          add(a(n-i)*factorial(i), i=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 28 2015
  • Mathematica
    CoefficientList[Series[Sum[Sum[k!*x^k, {k, 1, 20}]^n, {n, 0, 20}], {x, 0, 20}], x] (* Geoffrey Critzer, Mar 22 2009 *)
  • Sage
    h = lambda x: 1/(1-x*hypergeometric((1, 2), (), x))
    taylor(h(x),x,0,22).list() # Peter Luschny, Jul 28 2015
    
  • Sage
    def A051296_list(len):
        R, C = [1], [1]+[0]*(len-1)
        for n in (1..len-1):
            for k in range(n, 0, -1):
                C[k] = C[k-1] * k
            C[0] = sum(C[k] for k in (1..n))
            R.append(C[0])
        return R
    print(A051296_list(23)) # Peter Luschny, Feb 21 2016

Formula

G.f.: 1/(1-Sum_{n>=1} n!*x^n).
a(0) = 1; a(n) = Sum_{k=1..n} a(n-k)*k! for n>0.
a(n) = Sum_{k>=0} A090238(n, k). - Philippe Deléham, Feb 05 2004
From Gary W. Adamson, Sep 26 2011: (Start)
a(n) is the upper left term of M^n, M = an infinite square production matrix as follows:
1, 1, 0, 0, 0, 0, ...
2, 0, 2, 0, 0, 0, ...
3, 0, 0, 3, 0, 0, ...
4, 0, 0, 0, 4, 0, ...
5, 0, 0, 0, 0, 5, ...
... (End)
G.f.: 1 + x/(G(0) - 2*x) where G(k) = 1 + (k+1)*x - x*(k+2)/G(k+1); (recursively defined continued fraction). - Sergei N. Gladkovskii, Dec 26 2012
a(n) ~ n! * (1 + 2/n + 7/n^2 + 35/n^3 + 216/n^4 + 1575/n^5 + 13243/n^6 + 126508/n^7 + 1359437/n^8 + 16312915/n^9 + 217277446/n^10), for coefficients see A260530. - Vaclav Kotesovec, Jul 28 2015
From Peter Bala, May 26 2017: (Start)
G.f. as an S-fraction: A(x) = 1/(1 - x/(1 - 2*x/(1 - x/(1 - 3*x/(1 - 2*x/(1 - 4*x/(1 - 3*x/(1 - n*x/(1 - (n - 1)*x/(1 - ...)))))))))). Cf. S-fraction for the o.g.f. of A000142.
A(x) = 1/(1 - x/(1 - x - x/(1 - 2*x/(1 - 2*x/(1 - 3*x/(1 - 3*x/(1 - 4*x/(1 - 4*x/(1 - ... ))))))))). (End)

Extensions

Entry revised by David Callan, Sep 20 2007

A090753 Coefficients of power series A(x) such that n-th term of A(x)^n = n!*n*x^(n-1), for n>0.

Original entry on oeis.org

1, 2, 2, 4, 16, 88, 600, 4800, 43680, 443296, 4949920, 60217408, 792134528, 11200176128, 169375195136, 2728019576832, 46626359376384, 842947307334144, 16073131554826752, 322403473258650624, 6786861273524305920
Offset: 0

Views

Author

Philippe Deléham, Feb 06 2004

Keywords

Comments

At n=4 the 4th term of A(x)^4 is 4!*4x^3 = 96*x^3, as demonstrated by A(x)^4 = 1 + 8*x + 32*x^2 + 96*x^3 + 296*x^4 + ... See also A075834.

Crossrefs

Programs

  • PARI
    a(n)=if(n<0,0,polcoeff(x/serreverse(sum(k=1,n+1,k!*x^k,x^2*O(x^n))),n)) /* Michael Somos, Feb 14 2004 */
    
  • PARI
    a(n)=local(A=1+x); for(i=1, n, A=1+2*sum(m=1, n, m^m*x^m/(A+m*x+x*O(x^n))^m)); polcoeff(A, n)
    for(n=0, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Feb 04 2013

Formula

a(n) = Sum_{j=2..(n-2)} (j-1)*a(j)*a(n-j) for n>=2, with a(0)=1, a(1)=2.
Sum_{j>=0} a(j)*A090238(n-1, k+j-1) = A090238(n, k).
G.f. satisfies: A(x) = 1 + 2*Sum_{n>=1} n^n * x^n / (A(x) + n*x)^n. - Paul D. Hanna, Feb 04 2013
a(n) ~ exp(-2) * n! * n. - Vaclav Kotesovec, Nov 23 2024

A059369 Triangle of numbers T(n,k) = T(n-1,k-1) + ((n+k-1)/k)*T(n-1,k), n >= 1, 1 <= k <= n, with T(n,1) = n!, T(n,n) = 1; read from right to left.

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 1, 6, 16, 24, 1, 8, 30, 72, 120, 1, 10, 48, 152, 372, 720, 1, 12, 70, 272, 828, 2208, 5040, 1, 14, 96, 440, 1576, 4968, 14976, 40320, 1, 16, 126, 664, 2720, 9696, 33192, 115200, 362880, 1, 18, 160, 952, 4380, 17312, 64704, 247968, 996480
Offset: 1

Views

Author

N. J. A. Sloane, Jan 28 2001

Keywords

Comments

Another version of triangle in A090238. - Philippe Deléham, Jun 14 2007

Examples

			When read from left to right the rows {T(n,k), 1 <= k <= n} for n=1,2,3,... are 1; 2,1; 6,4,1; 24,16,6,1; ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 171, #34.

Crossrefs

Programs

  • Mathematica
    nmax = 10; t[n_, k_] := Sum[(m+1)!*t[n-m-1, k-1], {m, 0, n-k}]; t[n_, 1] = n!; t[n_, n_] = 1; Flatten[ Table[ t[n, k], {n, 1, nmax}, {k, n, 1, -1}]] (* Jean-François Alcover, Nov 14 2011 *)

Formula

G.f. for k-th diagonal: (Sum_{i >= 1} i!*t^i)^k = Sum_{n >= k} T(n, k)*t^n.
T(n,k) = n! if k=1, 1 if k=n, Sum_{m=0..n-k} (m+1)!*T(n-m-1,k-1) otherwise. - Vladimir Kruchinin, Aug 18 2010

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 31 2001

A090386 Fifth diagonal (m=4) of triangle A084938; a(n) = A084938(n+4,n) = (n^4 + 18*n^3 + 131*n^2 + 426*n)/24.

Original entry on oeis.org

0, 24, 64, 126, 217, 345, 519, 749, 1046, 1422, 1890, 2464, 3159, 3991, 4977, 6135, 7484, 9044, 10836, 12882, 15205, 17829, 20779, 24081, 27762, 31850, 36374, 41364, 46851, 52867, 59445, 66619, 74424, 82896, 92072, 101990, 112689
Offset: 0

Views

Author

Philippe Deléham, Jan 30 2004

Keywords

Crossrefs

Programs

  • Magma
    [(n^4+18*n^3+131*n^2+426*n)/24: n in [0..40]]; // Vincenzo Librandi, Feb 24 2014
  • Mathematica
    Table[(n^4+18n^3+131n^2+426n)/24,{n,0,40}] (* or *) LinearRecurrence[ {5,-10,10,-5,1},{0,24,64,126,217},40] (* Harvey P. Dale, Feb 23 2014 *)

Formula

a(n) = A084938(n+4, n) = Sum_{k=0..4} A090238(4, k)*binomial(n, k).
a(0)=0, a(1)=24, a(2)=64, a(3)=126, a(4)=217, a(n)=5*a(n-1)- 10*a(n-2)+ 10*a(n-3)-5*a(n-4)+a(n-5). - Harvey P. Dale, Feb 23 2014

Extensions

Corrected by T. D. Noe, Nov 08 2006

A090391 a(n) = n*(n^4 + 30*n^3 + 395*n^2 + 2910*n + 11064)/120.

Original entry on oeis.org

0, 120, 312, 606, 1040, 1661, 2526, 3703, 5272, 7326, 9972, 13332, 17544, 22763, 29162, 36933, 46288, 57460, 70704, 86298, 104544, 125769, 150326, 178595, 210984, 247930, 289900, 337392, 390936, 451095, 518466, 593681, 677408
Offset: 0

Views

Author

Philippe Deléham, Jan 31 2004

Keywords

Crossrefs

Cf. A084938 (sixth diagonal), A090238.

Programs

  • Mathematica
    Table[n (n^4 + 30 n^3 + 395 n^2 + 2910 n + 11064)/120, {n, 0, 40}] (* Bruno Berselli, Feb 12 2015 *)
  • PARI
    concat(0, Vec(x*(71*x^4-316*x^3+534*x^2-408*x+120)/(x-1)^6 + O(x^100))) \\ Colin Barker, Feb 12 2015
    
  • PARI
    vector(40, n, n--; n*(n^4+30*n^3+395*n^2+2910*n+11064)/120) \\ Bruno Berselli, Feb 12 2015

Formula

a(n) = A084938(n+5, n) = Sum_{k=0..5} A090238(5, k)*binomial(n, k).
a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6) for n>5. - Colin Barker, Feb 12 2015
G.f.: x*(71*x^4-316*x^3+534*x^2-408*x+120) / (x-1)^6. - Colin Barker, Feb 12 2015

Extensions

Name rewritten by Bruno Berselli, Feb 12 2015

A090392 Seventh diagonal (m=6) of triangle A084938; a(n) = A084938(n+6,n) = (n^6 + 45*n^5 + 925*n^4 + 11475*n^3 + 92314*n^2 + 413640*n)/720.

Original entry on oeis.org

0, 720, 1812, 3428, 5768, 9090, 13721, 20069, 28636, 40032, 54990, 74382, 99236, 130754, 170331, 219575, 280328, 354688, 445032, 554040, 684720, 840434, 1024925, 1242345, 1497284, 1794800, 2140450, 2540322, 3001068, 3529938, 4134815
Offset: 0

Views

Author

Philippe Deléham, Jan 31 2004

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,720,1812,3428,5768,9090,13721},40] (* Harvey P. Dale, Jul 20 2016 *)
  • Python
    A090392_list, m = [], [1, 5, 18, 58, 177, 461, 0]
    for _ in range(1001):
        A090392_list.append(m[-1])
        print(m[-1])
        for i in range(6):
            m[i+1] += m[i] # Chai Wah Wu, Jun 04 2016

Formula

a(n) = A084938(n+6, n) = Sum_{k=0..6} A090238(6, k)*binomial(n, k).
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7) for n > 6.
G.f.: x*(461*x^5 - 2482*x^4 + 5376*x^3 - 5864*x^2 + 3228*x - 720)/(x - 1)^7. (End)

A090393 Eighth diagonal (m=7) of triangle A084938; a(n) = A084938(n+7,n) = (n^7 + 63*n^6 + 1855*n^5 + 34125*n^4 + 438424*n^3 + 3980172*n^2 + 20946960*n)/5040.

Original entry on oeis.org

0, 5040, 12288, 22572, 36992, 56990, 84432, 121703, 171816, 238536, 326520, 441474, 590328, 781430, 1024760, 1332165, 1717616, 2197488, 2790864, 3519864, 4410000, 5490558, 6795008, 8361443, 10233048, 12458600, 15093000, 18197838
Offset: 0

Views

Author

Philippe Deléham, Jan 31 2004

Keywords

Crossrefs

Programs

  • Python
    A090393_list, m = [], [1, 6, 25, 92, 327, 1142, 3447, 0]
    for _ in range(1001):
        A090393_list.append(m[-1])
        print(m[-1])
        for i in range(7):
            m[i+1] += m[i] # Chai Wah Wu, Jun 04 2016

Formula

a(n) = A084938(n+7, n) = Sum_{k=0..7} A090238(7, k)*binomial(n, k).
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8) for n > 7.
G.f.: x*(3447*x^6 - 21824*x^5 + 57742*x^4 - 81760*x^3 + 65388*x^2 - 28032*x + 5040)/(x - 1)^8. (End)
Showing 1-10 of 12 results. Next