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 17 results. Next

A059439 A diagonal of A059438.

Original entry on oeis.org

0, 0, 1, 2, 7, 32, 177, 1142, 8411, 69692, 642581, 6534978, 72754927, 880877928, 11530686953, 162331760494, 2446380427331, 39300220067668, 670480457586813, 12106985274788506, 230691361507912471, 4625811718758963136
Offset: 0

Views

Author

N. J. A. Sloane, Feb 01 2001

Keywords

Comments

Self-convolution of A003319. - Vaclav Kotesovec, Aug 03 2015

Examples

			G.f. = x^2 + 2*x^3 + 7*x^4 + 32*x^5 + 177*x^6 + 1142*x^7 + 8411*x^8 + ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Crossrefs

Programs

  • Mathematica
    a[0]=0; a[n_]:=a[n] = n!-Sum[k!*a[n-k], {k,1,n-1}]; Table[Sum[a[k]*a[n-k],{k,0,n}],{n,0,20}] (* Vaclav Kotesovec, Aug 03 2015 *)
    CoefficientList[Assuming[Element[x, Reals], Series[(1 - x*E^(1/x) / ExpIntegralEi[1/x])^2, {x, 0, 20}]], x] (* Vaclav Kotesovec, Aug 03 2015 *)

Formula

G.f.: (1-1/Sum (k! x^k ))^2.
For n>0, a(n) = A259472(n) + 2*A003319(n). - Vaclav Kotesovec, Aug 03 2015
a(n) ~ 2*(n-1)! * (1 - 1/n - 1/n^2 + 1/n^3 + 30/n^4 + 404/n^5 + 5379/n^6 + 76021/n^7 + 1155805/n^8 + 18931873/n^9 + 333434490/n^10), for coefficients see A260913. - Vaclav Kotesovec, Aug 03 2015

Extensions

More terms from Vladeta Jovovic, Mar 04 2001
Prepended a(0)=0, a(1)=0 from Vaclav Kotesovec, Aug 03 2015

A085771 Triangle read by rows. T(n, k) = A059438(n, k) for 1 <= k <= n, and T(n, 0) = n^0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 2, 1, 0, 13, 7, 3, 1, 0, 71, 32, 12, 4, 1, 0, 461, 177, 58, 18, 5, 1, 0, 3447, 1142, 327, 92, 25, 6, 1, 0, 29093, 8411, 2109, 531, 135, 33, 7, 1, 0, 273343, 69692, 15366, 3440, 800, 188, 42, 8, 1, 0, 2829325, 642581, 125316, 24892, 5226, 1146, 252, 52, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Jul 22 2003

Keywords

Comments

The convolution triangle of A003319, the number of irreducible permutations. - Peter Luschny, Oct 09 2022

Examples

			Triangle starts:
[0] [1]
[1] [0,      1]
[2] [0,      1,     1]
[3] [0,      3,     2,     1]
[4] [0,     13,     7,     3,    1]
[5] [0,     71,    32,    12,    4,   1]
[6] [0,    461,   177,    58,   18,   5,   1]
[7] [0,   3447,  1142,   327,   92,  25,   6,  1]
[8] [0,  29093,  8411,  2109,  531, 135,  33,  7, 1]
[9] [0, 273343, 69692, 15366, 3440, 800, 188, 42, 8, 1]
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Crossrefs

T(2*n, n) = A308650(n).
Variants: A059439, A263484 (row reversed).

Programs

  • Maple
    # Uses function PMatrix from A357368.
    PMatrix(10, A003319); # Peter Luschny, Oct 09 2022
  • SageMath
    # Using function delehamdelta from A084938.
    def A085771_triangle(n) :
        a = [0, 1] + [(i + 3) // 2 for i in range(1, n-1)]
        b = [0^i for i in range(n)]
        return delehamdelta(a, b)
    A085771_triangle(9) # Peter Luschny, Sep 10 2022

Formula

Let f(x) = Sum_{n>=0} n!*x^n, g(x) = 1 - 1/f(x). Then g(x) is the g.f. of the second column, A003319.
Triangle T(n, k) read by rows, given by [0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, ...] DELTA A000007, where DELTA is Deléham's operator defined in A084938.
G.f.: 1/(1 - xy/(1 - x/(1 - 2x/(1 - 2x/(1 - 3x/(1 - 3x/(1 - 4x/(1-.... (continued fraction). - Paul Barry, Jan 29 2009

A059440 A diagonal of A059438.

Original entry on oeis.org

1, 3, 12, 58, 327, 2109, 15366, 125316, 1135329, 11348623, 124359336, 1484796894, 19204214363, 267627706257, 3998828758938, 63777662250440, 1081442839245381, 19426122224995107, 368492543629967292
Offset: 3

Views

Author

N. J. A. Sloane, Feb 01 2001

Keywords

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Formula

G.f.: (1-1/Sum (k! x^k ))^3.
a(n) ~ 3*sqrt(2*Pi) * n^(n - 3/2) / exp(n). - Vaclav Kotesovec, Jun 25 2019

Extensions

More terms from Vladeta Jovovic, Mar 04 2001

A091063 Triangle, read by rows, such that the initial terms of the binomial transform of the n-th row forms the n-th row of triangle A059438 transposed (permutations of [1..n] with k components).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 5, 7, 0, 1, 4, 9, 18, 34, 0, 1, 5, 14, 34, 86, 206, 0, 1, 6, 20, 56, 162, 508, 1476, 0, 1, 7, 27, 85, 269, 939, 3549, 12123, 0, 1, 8, 35, 122, 415, 1540, 6413, 28498, 111866, 0, 1, 9, 44, 168, 609, 2361, 10314, 50382, 257922, 1143554, 0, 1
Offset: 0

Views

Author

Paul D. Hanna, Dec 17 2003

Keywords

Comments

The main diagonal equals A075834 shift 1 place left; subsequent diagonals of this triangle are self-convolutions of the main diagonal. A075834 has the property that the n-th term of the n-th self-convolution of A075834 equals n!. The first (n+1) terms of the binomial transform of the n-th row forms the n-th row of triangle A059438 transposed, which has row sums equal to the factorials. A059438 is also formed from the self-convolutions of its main diagonal (A003319).

Examples

			Rows begin:
{1},
{1,0},
{1,1,0},
{1,2,2,0},
{1,3,5,7,0},
{1,4,9,18,34,0},
{1,5,14,34,86,206,0},
{1,6,20,56,162,508,1476,0},
{1,7,27,85,269,939,3549,12123,0},...
Initial terms of the binomial transform of each row forms A059438:
{1},
{1,1},
{1,2,3},
{1,3,7,13},
{1,4,12,32,71},
{1,5,18,58,177,461},
{1,6,25,92,327,1142,3447},
{1,7,33,135,531,2109,8411,29093},
{1,8,42,188,800,3440,15366,69692,273343},...
which has row sums equal to the factorials.
		

Crossrefs

A357078 Triangle read by rows. The partition transform of A355488, which are the alternating row sums of the number of permutations of [n] with k components (A059438).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 8, 4, 0, 1, 0, 48, 16, 6, 0, 1, 0, 328, 100, 24, 8, 0, 1, 0, 2560, 688, 156, 32, 10, 0, 1, 0, 22368, 5376, 1080, 216, 40, 12, 0, 1, 0, 216224, 46816, 8456, 1504, 280, 48, 14, 0, 1, 0, 2291456, 450240, 73440, 11808, 1960, 348, 56, 16, 0, 1
Offset: 0

Views

Author

Peter Luschny, Sep 10 2022

Keywords

Comments

The partition transform (also called De Moivre polynomials by Cormac O'Sullivan) is defined in the program section as a Sage script.
The triangle represents a refinement of the number of irreducible permutations, A003319. Together with the refinement of the number of reducible permutations A356265 the triangle sums to the refinement of the factorial numbers given in A357079.

Examples

			Triangle T(n, k) starts:                         [Row sums]
[0] 1;                                               [1]
[1] 0,      1;                                       [1]
[2] 0,      0,     1;                                [1]
[3] 0,      2,     0,    1;                          [3]
[4] 0,      8,     4,    0,    1;                    [13]
[5] 0,     48,    16,    6,    0,   1;               [71]
[6] 0,    328,   100,   24,    8,   0,  1;           [461]
[7] 0,   2560,   688,  156,   32,  10,  0,  1;       [3447]
[8] 0,  22368,  5376, 1080,  216,  40, 12,  0, 1;    [29093]
[9] 0, 216224, 46816, 8456, 1504, 280, 48, 14, 0, 1; [273343]
		

Crossrefs

Programs

  • SageMath
    from functools import cache
    def PartTrans(dim, f):
        X = var(['x' + str(i) for i in range(dim + 1)])
        @cache
        def PCoeffs(n: int, k: int):
            R = PolynomialRing(ZZ, X[1: n - k + 2], n - k + 1, order='lex')
            if k == 0: return R(k^n)
            return R(sum(PCoeffs(n - j, k - 1) * f(j)
                         for j in range(1, n - k + 2)))
        return [[PCoeffs(n, k) for k in range(n + 1)] for n in range(dim)]
    def A357078_triangle(dim):
        A = ZZ[['t']]; g = A([0] + [factorial(n) for n in range(1, 30)]).O(dim+2)
        return PartTrans(dim, lambda n: list(g / (1 + 2 * g))[n])
    A357078_triangle(9)

A047999 Sierpiński's [Sierpinski's] triangle (or gasket): triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 2.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

Restored the alternative spelling of Sierpinski to facilitate searching for this triangle using regular-expression matching commands in ASCII. - N. J. A. Sloane, Jan 18 2016
Also triangle giving successive states of cellular automaton generated by "Rule 60" and "Rule 102". - Hans Havermann, May 26 2002
Also triangle formed by reading triangle of Eulerian numbers (A008292) mod 2. - Philippe Deléham, Oct 02 2003
Self-inverse when regarded as an infinite lower triangular matrix over GF(2).
Start with [1], repeatedly apply the map 0 -> [00/00], 1 -> [10/11] [Allouche and Berthe]
Also triangle formed by reading triangles A011117, A028338, A039757, A059438, A085881, A086646, A086872, A087903, A104219 mod 2. - Philippe Deléham, Jun 18 2005
J. H. Conway writes (in Math Forum): at least the first 31 rows give odd-sided constructible polygons (sides 1, 3, 5, 15, 17, ... see A001317). The 1's form a Sierpiński sieve. - M. Dauchez (mdzzdm(AT)yahoo.fr), Sep 19 2005
When regarded as an infinite lower triangular matrix, its inverse is a (-1,0,1)-matrix with zeros undisturbed and the nonzero entries in every column form the Prouhet-Thue-Morse sequence (1,-1,-1,1,-1,1,1,-1,...) A010060 (up to relabeling). - David Callan, Oct 27 2006
Triangle read by rows: antidiagonals of an array formed by successive iterates of running sums mod 2, beginning with (1, 1, 1, ...). - Gary W. Adamson, Jul 10 2008
T(n,k) = A057427(A143333(n,k)). - Reinhard Zumkeller, Oct 24 2010
The triangle sums, see A180662 for their definitions, link Sierpiński’s triangle A047999 with seven sequences, see the crossrefs. The Kn1y(n) and Kn2y(n), y >= 1, triangle sums lead to the Sierpiński-Stern triangle A191372. - Johannes W. Meijer, Jun 05 2011
Used to compute the total Steifel-Whitney cohomology class of the Real Projective space. This was an essential component of the proof that there are no product operations without zero divisors on R^n for n not equal to 1, 2, 4 or 8 (real numbers, complex numbers, quaternions, Cayley numbers), proved by Bott and Milnor. - Marcus Jaiclin, Feb 07 2012
T(n,k) = A134636(n,k) mod 2. - Reinhard Zumkeller, Nov 23 2012
T(n,k) = 1 - A219463(n,k), 0 <= k <= n. - Reinhard Zumkeller, Nov 30 2012
From Vladimir Shevelev, Dec 31 2013: (Start)
Also table of coefficients of polynomials s_n(x) of degree n which are defined by formula s_n(x) = Sum_{i=0..n} (binomial(n,i) mod 2)*x^k. These polynomials we naturally call Sierpiński's polynomials. They also are defined by the recursion: s_0(x)=1, s_(2*n+1)(x) = (x+1)*s_n(x^2), n>=0, and s_(2*n)(x) = s_n(x^2), n>=1.
Note that: s_n(1) = A001316(n),
s_n(2) = A001317(n),
s_n(3) = A100307(n),
s_n(4) = A001317(2*n),
s_n(5) = A100308(n),
s_n(6) = A100309(n),
s_n(7) = A100310(n),
s_n(8) = A100311(n),
s_n(9) = A100307(2*n),
s_n(10) = A006943(n),
s_n(16) = A001317(4*n),
s_n(25) = A100308(2*n), etc.
The equality s_n(10) = A006943(n) means that sequence A047999 is obtained from A006943 by the separation by commas of the digits of its terms. (End)
Comment from N. J. A. Sloane, Jan 18 2016: (Start)
Take a diamond-shaped region with edge length n from the top of the triangle, and rotate it by 45 degrees to get a square S_n. Here is S_6:
[1, 1, 1, 1, 1, 1]
[1, 0, 1, 0, 1, 0]
[1, 1, 0, 0, 1, 1]
[1, 0, 0, 0, 1, 0]
[1, 1, 1, 1, 0, 0]
[1, 0, 1, 0, 0, 0].
Then (i) S_n contains no square (parallel to the axes) with all four corners equal to 1 (cf. A227133); (ii) S_n can be constructed by using the greedy algorithm with the constraint that there is no square with that property; and (iii) S_n contains A064194(n) 1's. Thus A064194(n) is a lower bound on A227133(n). (End)
See A123098 for a multiplicative encoding of the rows, i.e., product of the primes selected by nonzero terms; e.g., 1 0 1 => 2^1 * 3^0 * 5^1. - M. F. Hasler, Sep 18 2016
From Valentin Bakoev, Jul 11 2020: (Start)
The Sierpinski's triangle with 2^n rows is a part of a lower triangular matrix M_n of dimension 2^n X 2^n. M_n is a block matrix defined recursively: M_1= [1, 0], [1, 1], and for n>1, M_n = [M_(n-1), O_(n-1)], [M_(n-1), M_(n-1)], where M_(n-1) is a block matrix of the same type, but of dimension 2^(n-1) X 2^(n-1), and O_(n-1) is the zero matrix of dimension 2^(n-1) X 2^(n-1). Here is how M_1, M_2 and M_3 look like:
1 0 1 0 0 0 1 0 0 0 0 0 0 0
1 1 1 1 0 0 1 1 0 0 0 0 0 0 - It is seen the self-similarity of the
1 0 1 0 1 0 1 0 0 0 0 0 matrices M_1, M_2, ..., M_n, ...,
1 1 1 1 1 1 1 1 0 0 0 0 analogously to the Sierpinski's fractal.
1 0 0 0 1 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1
M_n can also be defined as M_n = M_1 X M_(n-1) where X denotes the Kronecker product. M_n is an important matrix in coding theory, cryptography, Boolean algebra, monotone Boolean functions, etc. It is a transformation matrix used in computing the algebraic normal form of Boolean functions. Some properties and links concerning M_n can be seen in LINKS. (End)
Sierpinski's gasket has fractal (Hausdorff) dimension log(A000217(2))/log(2) = log(3)/log(2) = 1.58496... (and cf. A020857). This gasket is the first of a family of gaskets formed by taking the Pascal triangle (A007318) mod j, j >= 2 (see CROSSREFS). For prime j, the dimension of the gasket is log(A000217(j))/log(j) = log(j(j + 1)/2)/log(j) (see Reiter and Bondarenko references). - Richard L. Ollerton, Dec 14 2021

Examples

			Triangle begins:
              1,
             1,1,
            1,0,1,
           1,1,1,1,
          1,0,0,0,1,
         1,1,0,0,1,1,
        1,0,1,0,1,0,1,
       1,1,1,1,1,1,1,1,
      1,0,0,0,0,0,0,0,1,
     1,1,0,0,0,0,0,0,1,1,
    1,0,1,0,0,0,0,0,1,0,1,
   1,1,1,1,0,0,0,0,1,1,1,1,
  1,0,0,0,1,0,0,0,1,0,0,0,1,
  ...
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • Brand, Neal; Das, Sajal; Jacob, Tom. The number of nonzero entries in recursively defined tables modulo primes. Proceedings of the Twenty-first Southeastern Conference on Combinatorics, Graph Theory, and Computing (Boca Raton, FL, 1990). Congr. Numer. 78 (1990), 47--59. MR1140469 (92h:05004).
  • John W. Milnor and James D. Stasheff, Characteristic Classes, Princeton University Press, 1974, pp. 43-49 (sequence appears on p. 46).
  • H.-O. Peitgen, H. Juergens and D. Saupe: Chaos and Fractals (Springer-Verlag 1992), p. 408.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: (this sequence) (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).
Other versions: A090971, A038183.
From Johannes W. Meijer, Jun 05 2011: (Start)
A106344 is a skew version of this triangle.
Triangle sums (see the comments): A001316 (Row1; Related to Row2), A002487 (Related to Kn11, Kn12, Kn13, Kn21, Kn22, Kn23), A007306 (Kn3, Kn4), A060632 (Fi1, Fi2), A120562 (Ca1, Ca2), A112970 (Gi1, Gi2), A127830 (Ze3, Ze4). (End)

Programs

  • Haskell
    import Data.Bits (xor)
    a047999 :: Int -> Int -> Int
    a047999 n k = a047999_tabl !! n !! k
    a047999_row n = a047999_tabl !! n
    a047999_tabl = iterate (\row -> zipWith xor ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Dec 11 2011, Oct 24 2010
    
  • Magma
    A047999:= func< n,k | BitwiseAnd(n-k, k) eq 0 select 1 else 0 >;
    [A047999(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 03 2024
  • Maple
    # Maple code for first M rows (here M=10) - N. J. A. Sloane, Feb 03 2016
    ST:=[1,1,1]; a:=1; b:=2; M:=10;
    for n from 2 to M do ST:=[op(ST),1];
    for i from a to b-1 do ST:=[op(ST), (ST[i+1]+ST[i+2]) mod 2 ]; od:
    ST:=[op(ST),1];
    a:=a+n; b:=a+n; od:
    ST; # N. J. A. Sloane
    # alternative
    A047999 := proc(n,k)
        modp(binomial(n,k),2) ;
    end proc:
    seq(seq(A047999(n,k),k=0..n),n=0..12) ; # R. J. Mathar, May 06 2016
  • Mathematica
    Mod[ Flatten[ NestList[ Prepend[ #, 0] + Append[ #, 0] &, {1}, 13]], 2] (* Robert G. Wilson v, May 26 2004 *)
    rows = 14; ca = CellularAutomaton[60, {{1}, 0}, rows-1]; Flatten[ Table[ca[[k, 1 ;; k]], {k, 1, rows}]] (* Jean-François Alcover, May 24 2012 *)
    Mod[#,2]&/@Flatten[Table[Binomial[n,k],{n,0,20},{k,0,n}]] (* Harvey P. Dale, Jun 26 2019 *)
    A047999[n_,k_]:= Boole[BitAnd[n-k,k]==0];
    Table[A047999[n,k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 03 2025 *)
  • PARI
    \\ Recurrence for Pascal's triangle mod p, here p = 2.
    p = 2; s=13; T=matrix(s,s); T[1,1]=1;
    for(n=2,s, T[n,1]=1; for(k=2,n, T[n,k] = (T[n-1,k-1] + T[n-1,k])%p ));
    for(n=1,s,for(k=1,n,print1(T[n,k],", "))) \\ Gerald McGarvey, Oct 10 2009
    
  • PARI
    A011371(n)=my(s);while(n>>=1,s+=n);s
    T(n,k)=A011371(n)==A011371(k)+A011371(n-k) \\ Charles R Greathouse IV, Aug 09 2013
    
  • PARI
    T(n,k)=bitand(n-k,k)==0 \\ Charles R Greathouse IV, Aug 11 2016
    
  • Python
    def A047999_T(n,k):
        return int(not ~n & k) # Chai Wah Wu, Feb 09 2016
    

Formula

Lucas's Theorem is that T(n,k) = 1 if and only if the 1's in the binary expansion of k are a subset of the 1's in the binary expansion of n; or equivalently, k AND NOT n is zero, where AND and NOT are bitwise operators. - Chai Wah Wu, Feb 09 2016 and N. J. A. Sloane, Feb 10 2016
Sum_{k>=0} T(n, k) = A001316(n) = 2^A000120(n).
T(n,k) = T(n-1,k-1) XOR T(n-1,k), 0 < k < n; T(n,0) = T(n,n) = 1. - Reinhard Zumkeller, Dec 13 2009
T(n,k) = (T(n-1,k-1) + T(n-1,k)) mod 2 = |T(n-1,k-1) - T(n-1,k)|, 0 < k < n; T(n,0) = T(n,n) = 1. - Rick L. Shepherd, Feb 23 2018
From Vladimir Shevelev, Dec 31 2013: (Start)
For polynomial {s_n(x)} we have
s_0(x)=1; for n>=1, s_n(x) = Product_{i=1..A000120(n)} (x^(2^k_i) + 1),
if the binary expansion of n is n = Sum_{i=1..A000120(n)} 2^k_i;
G.f. Sum_{n>=0} s_n(x)*z^n = Product_{k>=0} (1 + (x^(2^k)+1)*z^(2^k)) (0
Let x>1, t>0 be real numbers. Then
Sum_{n>=0} 1/s_n(x)^t = Product_{k>=0} (1 + 1/(x^(2^k)+1)^t);
Sum_{n>=0} (-1)^A000120(n)/s_n(x)^t = Product_{k>=0} (1 - 1/(x^(2^k)+1)^t).
In particular, for t=1, x>1, we have
Sum_{n>=0} (-1)^A000120(n)/s_n(x) = 1 - 1/x. (End)
From Valentin Bakoev, Jul 11 2020: (Start)
(See my comment about the matrix M_n.) Denote by T(i,j) the number in the i-th row and j-th column of M_n (0 <= i, j < 2^n). When i>=j, T(i,j) is the j-th number in the i-th row of the Sierpinski's triangle. For given i and j, we denote by k the largest integer of the type k=2^m and k
T(i,0) = T(i,i) = 1, or
T(i,j) = 0 if i < j, or
T(i,j) = T(i-k,j), if j < k, or
T(i,j) = T(i-k,j-k), if j >= k.
Thus, for given i and j, T(i,j) can be computed in O(log_2(i)) steps. (End)

Extensions

Additional links from Lekraj Beedassy, Jan 22 2004

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

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

A109062 Triangle read by rows: number of atomic set compositions of size n and length k (see description in A095989) 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 4, 3, 1, 11, 23, 13, 1, 26, 112, 158, 71, 1, 57, 446, 1170, 1241, 461, 1, 120, 1593, 6880, 12871, 10912, 3447, 1, 247, 5337, 35503, 103887, 150413, 106031, 29093, 1, 502, 17190, 168982, 724148, 1589266, 1872286, 1128218, 273343, 1, 1013, 54008
Offset: 1

Author

Mike Zabrocki, Aug 24 2005

Keywords

Comments

Also the number of free generators and primitives of the quasi-symmetric functions in non-commuting variables. - Mike Zabrocki, Aug 06 2006
Triangle given by [1,0,2,0,3,0,4,0,5,...] DELTA [1,2,2,3,3,4,4,5,5,6,6,7,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Aug 01 2007
Apparently, the alternating sums vanish for n > 1. - F. Chapoton, Sep 05 2023

Examples

			Atomic set compositions a(1,1)=1: [{1}]; a(2,1)=1, a(2,2)=1: [{12}], [{2},{1}]; a(3,1)=1, a(3,2)=4, a(3,3)=3: [{123}], [{2},{13}], [{3}, {12}], [{23}, {1}], [{13},{2}], [{2},{3},{1}], [{3},{1},{2}], [{3},{2},{1}].
Triangle begins:
  1;
  1,  1;
  1,  4,   3;
  1, 11,  23,  13;
  1, 26, 112, 158, 71;
  ...
		

Crossrefs

Row sums are equal to A095989, a(n,n) = A003319, a(n,2) = A000295.

Programs

  • Maple
    f:=(n,k)->coeff(coeff(series(1-1/(1+add(add(q^m*t^i*
        Stirling2(m,i)*i!,i=1..m),m=1..n)),q,n+1),q,n),t,k):
    seq(seq(f(n,k), k=1..n), n=1..10);

Formula

G.f.: 1-1/(1+Sum_{n>=1} Sum_{k=1..n} q^n*t^k*Stirling2(n,k)*k!).

A136128 Number of components in all permutations of [1,2,...,n].

Original entry on oeis.org

1, 3, 10, 40, 192, 1092, 7248, 55296, 478080, 4625280, 49524480, 581368320, 7422589440, 102372076800, 1516402944000, 24004657152000, 404347023360000, 7220327288832000, 136227009945600000, 2707657158721536000, 56546150835879936000, 1237826569587277824000
Offset: 1

Author

Emeric Deutsch, Jan 21 2008

Keywords

Examples

			a(3) = 10 because the permutations of [1,2,3], with components separated by /, are 1/2/3, 1/32, 21/3, 231, 312 and 321.
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 262 (#14).

Crossrefs

Programs

  • Maple
    seq(add(factorial(i)*factorial(n-i),i=0..n-1),n=1..20);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<2, n,
          (a(n-1)+(n-1)!)*(n+1)/2)
        end:
    seq(a(n), n=1..23);  # Alois P. Heinz, Jun 13 2019
  • Mathematica
    nn=20; p=Sum[n!x^n,{n,0,nn}]; Drop[CoefficientList[Series[p(p-1), {x,0,nn}], x], 1] (* Geoffrey Critzer, Apr 20 2012 *)
    Table[(n + 1)! Re[-LerchPhi[2, 1, n + 1]], {n, 1, 20}]  (* Peter Luschny, Jan 04 2018 *)
  • PARI
    a(n) = 2*sum(k=0, (n+1)\2, (4^k-1)*abs(stirling(n+1, 2*k, 1))*bernfrac(2*k)); \\ Seiichi Manyama, Oct 05 2022
    
  • PARI
    a(n) = my(A = 1, B = 1); for(k=1, n, B *= k; A = (n-k+1)*A + B); A-B \\ Mikhail Kurkov, Aug 09 2025
    
  • Python
    def aList(n) -> list[int]:
        f, al, A = 1, 1, [1]
        for i in range(2, n + 1):
            f, al = f * i, (al + f) * (i + 1) >> 1
            A.append(al)
        return A
    print(aList(22))  # Peter Luschny, Aug 09 2025

Formula

a(n) = A003149(n) - n!.
a(n) = A059371(n) + n! (n>=2).
a(n) = Sum_{k=1..n} k*A059438(n,k).
a(n) = Sum_{i=0..n-1} i!*(n-i)!.
a(n) = (n+1)!*(1 + Sum_{j=1..n-1} 2^j/(j+1))/2^n.
a(n) = (n+1)*a(n-1)/2 + (n-1)!*(n+1)/2, a(1)=1.
G.f.: f(f-1), where f(x) = Sum_{j>=0} j!*x^j.
a(n) = (n + 1)!*Re(-LerchPhi(2, 1, n + 1)). - Peter Luschny, Jan 04 2018
D-finite with recurrence: 2*a(n) +(-3*n+1)*a(n-1) +(n^2-3*n+4)*a(n-2) +(n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
a(n) = 2 * Sum_{k=0..floor((n+1)/2)} (4^k-1) * |Stirling1(n+1,2*k)| * Bernoulli(2*k). - Seiichi Manyama, Oct 05 2022
E.g.f.: x/((2-x)*(1-x)) - 2*log(1-x)/((2-x)^2). - Vladimir Kruchinin, Nov 16 2022

A263484 Triangle read by rows: T(n,k) (n>=1, 0<=k

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 7, 13, 1, 4, 12, 32, 71, 1, 5, 18, 58, 177, 461, 1, 6, 25, 92, 327, 1142, 3447, 1, 7, 33, 135, 531, 2109, 8411, 29093, 1, 8, 42, 188, 800, 3440, 15366, 69692, 273343, 1, 9, 52, 252, 1146, 5226, 24892, 125316, 642581, 2829325
Offset: 1

Author

Christian Stump, Oct 19 2015

Keywords

Comments

Row sums give A000142, n >= 1.
From Allan C. Wechsler, Jun 14 2019 (Start):
Suppose we are permuting the numbers from 1 through 5. For example, consider the permutation (1,2,3,4,5) -> (3,1,2,5,4). Notice that there is exactly one point where we can cut this permutation into two consecutive pieces in such a way that no item is permuted from one piece to the other, namely (3,1,2 | 5,4). This "cut" has the property that all the indices to its left are less than all the indices to its right. There are no other such cut-points: (3,1 | 2,5,4) doesn't work, for example, because 3 > 2.
Stanley defines the "connectivity set" as the set of positions at which you can make such a cut. In this case, the connectivity set is {3}.
In the present sequence, T(n,k) is the number of permutations of n elements with k cut points. (End)
Essentially the same triangle as [1, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [0, 1, 2, 2, 3, 3, 4, 4, 5, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 18 2020

Examples

			Triangle begins:
  1,
  1, 1,
  1, 2,  3,
  1, 3,  7, 13,
  1, 4, 12, 32,  71,
  1, 5, 18, 58, 177, 461,
  ...
Triangle [1, 0, 0, 0, 0, ...] DELTA [0, 1, 2, 2, 3, 3, ...]:
  1;
  1, 0;
  1, 1,  0;
  1, 2,  3,  0;
  1, 3,  7, 13,  0;
  1, 4, 12, 32, 71, 0;
... - _Philippe Deléham_, Feb 18 2020
		

Crossrefs

Cf. A000142.
T(n,n-1) gives A003319.
A version with reflected rows is A059438, A085771.
T(2n,n) gives A308650.

Programs

  • Mathematica
    rows = 11;
    (* DELTA is defined in A084938 *)
    Most /@ DELTA[Table[Boole[n == 1], {n, rows}], Join[{0, 1}, LinearRecurrence[{1, 1, -1}, {2, 2, 3}, rows]], rows] // Flatten (* Jean-François Alcover, Feb 18 2020, after Philippe Deléham *)
  • SageMath
    # cf. FindStat link
    def statistic(x):
         return len(set(x.reduced_word()))
    for n in [1..6]:
        for pi in Permutations(n):
            print(pi, "=>", statistic(pi))

Extensions

More terms from Fred Lunnon and Christian Stump
Name changed by Georg Fischer as proposed by Allan C. Wechsler, Jun 13 2019
Showing 1-10 of 17 results. Next