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

A001316 Gould's sequence: a(n) = Sum_{k=0..n} (binomial(n,k) mod 2); number of odd entries in row n of Pascal's triangle (A007318); a(n) = 2^A000120(n).

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32
Offset: 0

Views

Author

Keywords

Comments

Also called Dress's sequence.
This sequence might be better called Glaisher's sequence, since James Glaisher showed that odd binomial coefficients are counted by 2^A000120(n) in 1899. - Eric Rowland, Mar 17 2017 [However, the name "Gould's sequence" is deeply entrenched in the literature. - N. J. A. Sloane, Mar 17 2017] [Named after the American mathematician Henry Wadsworth Gould (b. 1928). - Amiram Eldar, Jun 19 2021]
All terms are powers of 2. The first occurrence of 2^k is at n = 2^k - 1; e.g., the first occurrence of 16 is at n = 15. - Robert G. Wilson v, Dec 06 2000
a(n) is the highest power of 2 dividing binomial(2n,n) = A000984(n). - Benoit Cloitre, Jan 23 2002
Also number of 1's in n-th row of triangle in A070886. - Hans Havermann, May 26 2002. Equivalently, number of live cells in generation n of a one-dimensional cellular automaton, Rule 90, starting with a single live cell. - Ben Branman, Feb 28 2009. Ditto for Rule 18. - N. J. A. Sloane, Aug 09 2014. This is also the odd-rule cellular automaton defined by OddRule 003 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link). - N. J. A. Sloane, Feb 25 2015
Also number of numbers k, 0<=k<=n, such that (k OR n) = n (bitwise logical OR): a(n) = #{k : T(n,k)=n, 0<=k<=n}, where T is defined as in A080098. - Reinhard Zumkeller, Jan 28 2003
To construct the sequence, start with 1 and use the rule: If k >= 0 and a(0),a(1),...,a(2^k-1) are the first 2^k terms, then the next 2^k terms are 2*a(0),2*a(1),...,2*a(2^k-1). - Benoit Cloitre, Jan 30 2003
Also, numerator((2^k)/k!). - Mohammed Bouayoun (mohammed.bouayoun(AT)sanef.com), Mar 03 2004
The odd entries in Pascal's triangle form the Sierpiński Gasket (a fractal). - Amarnath Murthy, Nov 20 2004
Row sums of Sierpiński's Gasket A047999. - Johannes W. Meijer, Jun 05 2011
Fixed point of the morphism "1" -> "1,2", "2" -> "2,4", "4" -> "4,8", ..., "2^k" -> "2^k,2^(k+1)", ... starting with a(0) = 1; 1 -> 12 -> 1224 -> = 12242448 -> 122424482448488(16) -> ... . - Philippe Deléham, Jun 18 2005
a(n) = number of 1's of stage n of the one-dimensional cellular automaton with Rule 90. - Andras Erszegi (erszegi.andras(AT)chello.hu), Apr 01 2006
a(33)..a(63) = A117973(1)..A117973(31). - Stephen Crowley, Mar 21 2007
Or the number of solutions of the equation: A000120(x) + A000120(n-x) = A000120(n). - Vladimir Shevelev, Jul 19 2009
For positive n, a(n) equals the denominator of the permanent of the n X n matrix consisting entirely of (1/2)'s. - John M. Campbell, May 26 2011
Companions to A001316 are A048896, A105321, A117973, A151930 and A191488. They all have the same structure. We observe that for all these sequences a((2*n+1)*2^p-1) = C(p)*A001316(n), p >= 0. If C(p) = 2^p then a(n) = A001316(n), if C(p) = 1 then a(n) = A048896(n), if C(p) = 2^p+2 then a(n) = A105321(n+1), if C(p) = 2^(p+1) then a(n) = A117973(n), if C(p) = 2^p-2 then a(n) = (-1)*A151930(n) and if C(p) = 2^(p+1)+2 then a(n) = A191488(n). Furthermore for all a(2^p - 1) = C(p). - Johannes W. Meijer, Jun 05 2011
a(n) = number of zeros in n-th row of A219463 = number of ones in n-th row of A047999. - Reinhard Zumkeller, Nov 30 2012
This is the Run Length Transform of S(n) = {1,2,4,8,16,...} (cf. A000079). The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g., 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product). - N. J. A. Sloane, Sep 05 2014
A105321(n+1) = a(n+1) + a(n). - Reinhard Zumkeller, Nov 14 2014
a(n) = A261363(n,n) = number of distinct terms in row n of A261363 = number of odd terms in row n+1 of A261363. - Reinhard Zumkeller, Aug 16 2015
From Gary W. Adamson, Aug 26 2016: (Start)
A production matrix for the sequence is lim_{k->infinity} M^k, the left-shifted vector of M:
1, 0, 0, 0, 0, ...
2, 0, 0, 0, 0, ...
0, 1, 0, 0, 0, ...
0, 2, 0, 0, 0, ...
0, 0, 1, 0, 0, ...
0, 0, 2, 0, 0, ...
0, 0, 0, 1, 0, ...
...
The result is equivalent to the g.f. of Apr 06 2003: Product_{k>=0} (1 + 2*z^(2^k)). (End)
Number of binary palindromes of length n for which the first floor(n/2) symbols are themselves a palindrome (Ji and Wilf 2008). - Jeffrey Shallit, Jun 15 2017

Examples

			Has a natural structure as a triangle:
  1,
  2,
  2,4,
  2,4,4,8,
  2,4,4,8,4,8,8,16,
  2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,
  2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,32,64,
  ...
The rows converge to A117973.
From _Omar E. Pol_, Jun 07 2009: (Start)
Also, triangle begins:
   1;
   2,2;
   4,2,4,4;
   8,2,4,4,8,4,8,8;
  16,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16;
  32,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,32;
  64,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,...
(End)
G.f. = 1 + 2*x + 2*x^2 + 4*x^3 + 2*x^4 + 4*x^5 + 4*x^6 + 8*x^7 + 2*x^8 + ... - _Michael Somos_, Aug 26 2015
		

References

  • Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A., 2003, p. 75ff.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 145-151.
  • James W. L. Glaisher, On the residue of a binomial-theorem coefficient with respect to a prime modulus, Quarterly Journal of Pure and Applied Mathematics, Vol. 30 (1899), pp. 150-156.
  • H. W. Gould, Exponential Binomial Coefficient Series. Tech. Rep. 4, Math. Dept., West Virginia Univ., Morgantown, WV, Sep 1961.
  • Olivier Martin, Andrew M. Odlyzko, and Stephen Wolfram, Algebraic properties of cellular automata, Comm. Math. Physics, Vol. 93 (1984), pp. 219-258. Reprinted in Theory and Applications of Cellular Automata, S Wolfram, Ed., World Scientific, 1986, pp. 51-90 and in Cellular Automata and Complexity: Collected Papers of Stephen Wolfram, Addison-Wesley, 1994, pp. 71-113
  • Manfred R. Schroeder, Fractals, Chaos, Power Laws, W. H. Freeman, NY, 1991, page 383.
  • 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).
  • Andrew Wuensche, Exploring Discrete Dynamics, Luniver Press, 2011. See Fig. 2.3.

Crossrefs

Equals left border of triangle A166548. - Gary W. Adamson, Oct 16 2009
For generating functions Product_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
For partial sums see A006046. For first differences see A151930.
This is the numerator of 2^n/n!, while A049606 gives the denominator.
If we subtract 1 from the terms we get a pair of essentially identical sequences, A038573 and A159913.
A163000 and A163577 count binomial coefficients with 2-adic valuation 1 and 2. A275012 gives a measure of complexity of these sequences. - Eric Rowland, Mar 15 2017
Cf. A286575 (run-length transform), A368655 (binomial transform), also A037445.

Programs

  • Haskell
    import Data.List (transpose)
    a001316 = sum . a047999_row  -- Reinhard Zumkeller, Nov 24 2012
    a001316_list = 1 : zs where
       zs = 2 : (concat $ transpose [zs, map (* 2) zs])
    -- Reinhard Zumkeller, Aug 27 2014, Sep 16 2011
    (Sage, Python)
    from functools import cache
    @cache
    def A001316(n):
        if n <= 1: return n+1
        return A001316(n//2) << n%2
    print([A001316(n) for n in range(88)])  # Peter Luschny, Nov 19 2012
    
  • Maple
    A001316 := proc(n) local k; add(binomial(n,k) mod 2, k=0..n); end;
    S:=[1]; S:=[op(S),op(2*s)]; # repeat ad infinitum!
    a := n -> 2^add(i,i=convert(n,base,2)); # Peter Luschny, Mar 11 2009
  • Mathematica
    Table[ Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ], {n, 0, 100} ]
    Nest[ Join[#, 2#] &, {1}, 7] (* Robert G. Wilson v, Jan 24 2006 and modified Jul 27 2014 *)
    Map[Function[Apply[Plus,Flatten[ #1]]], CellularAutomaton[90,{{1},0},100]] (* Produces counts of ON cells. N. J. A. Sloane, Aug 10 2009 *)
    ArrayPlot[CellularAutomaton[90, {{1}, 0}, 20]] (* Illustration of first 20 generations. - N. J. A. Sloane, Aug 14 2014 *)
    Table[2^(RealDigits[n - 1, 2][[1]] // Total), {n, 1, 100}] (* Gabriel C. Benamy, Dec 08 2009 *)
    CoefficientList[Series[Exp[2*x], {x, 0, 100}], x] // Numerator (* Jean-François Alcover, Oct 25 2013 *)
    Count[#,?OddQ]&/@Table[Binomial[n,k],{n,0,90},{k,0,n}] (* _Harvey P. Dale, Sep 22 2015 *)
    2^DigitSum[Range[0, 100], 2] (* Paolo Xausa, Jul 31 2025 *)
  • PARI
    {a(n) = if( n<0, 0, numerator(2^n / n!))};
    
  • PARI
    A001316(n)=1<M. F. Hasler, May 03 2009
    
  • PARI
    a(n)=2^hammingweight(n) \\ Charles R Greathouse IV, Jan 04 2013
    
  • Python
    def A001316(n):
        return 2**bin(n)[2:].count("1") # Indranil Ghosh, Feb 06 2017
    
  • Python
    def A001316(n): return 1<Karl-Heinz Hofmann, Aug 01 2025
    
  • Python
    import numpy # (version >= 2.0.0)
    n_up_to = 2**22
    A000079 = 1 << numpy.arange(n_up_to.bit_length())
    A001316 = A000079[numpy.bitwise_count(numpy.arange(n_up_to))]
    print(A001316[0:100]) # Karl-Heinz Hofmann, Aug 01 2025
    
  • Scheme
    (define (A001316 n) (let loop ((n n) (z 1)) (cond ((zero? n) z) ((even? n) (loop (/ n 2) z)) (else (loop (/ (- n 1) 2) (* z 2)))))) ;; Antti Karttunen, May 29 2017

Formula

a(n) = 2^A000120(n).
a(0) = 1; for n > 0, write n = 2^i + j where 0 <= j < 2^i; then a(n) = 2*a(j).
a(n) = 2*a(n-1)/A006519(n) = A000079(n)*A049606(n)/A000142(n).
a(n) = A038573(n) + 1.
G.f.: Product_{k>=0} (1+2*z^(2^k)). - Ralf Stephan, Apr 06 2003
a(n) = Sum_{i=0..2*n} (binomial(2*n, i) mod 2)*(-1)^i. - Benoit Cloitre, Nov 16 2003
a(n) mod 3 = A001285(n). - Benoit Cloitre, May 09 2004
a(n) = 2^n - 2*Sum_{k=0..n} floor(binomial(n, k)/2). - Paul Barry, Dec 24 2004
a(n) = Product_{k=0..log_2(n)} 2^b(n, k), b(n, k) = coefficient of 2^k in binary expansion of n. - Paul D. Hanna
Sum_{k=0..n-1} a(k) = A006046(n).
a(n) = n/2 + 1/2 + (1/2)*Sum_{k=0..n} (-(-1)^binomial(n,k)). - Stephen Crowley, Mar 21 2007
G.f. for a(n)/A156769(n): (1/2)*z^(1/2)*sinh(2*z^(1/2)). - Johannes W. Meijer, Feb 20 2009
Equals infinite convolution product of [1,2,0,0,0,0,0,0,0] aerated (A000079 - 1) times, i.e., [1,2,0,0,0,0,0,0,0] * [1,0,2,0,0,0,0,0,0] * [1,0,0,0,2,0,0,0,0]. - Mats Granvik, Gary W. Adamson, Oct 02 2009
a(n) = f(n, 1) with f(x, y) = if x = 0 then y otherwise f(floor(x/2), y*(1 + x mod 2)). - Reinhard Zumkeller, Nov 21 2009
a(n) = 2^(number of 1's in binary form of (n-1)). - Gabriel C. Benamy, Dec 08 2009
a((2*n+1)*2^p-1) = (2^p)*a(n), p >= 0. - Johannes W. Meijer, Jun 05 2011
a(n) = A000120(A001317(n)). - Reinhard Zumkeller, Nov 24 2012
a(n) = A226078(n,1). - Reinhard Zumkeller, May 25 2013
a(n) = lcm(n!, 2^n) / n!. - Daniel Suteu, Apr 28 2017
a(n) = A061142(A005940(1+n)). - Antti Karttunen, May 29 2017
a(0) = 1, a(2*n) = a(n), a(2*n+1) = 2*a(n). - Daniele Parisse, Feb 15 2024
a(n*m) <= a(n)^A000120(m). - Joe Amos, Mar 27 2025

Extensions

Additional comments from Henry Bottomley, Mar 12 2001
Further comments from N. J. A. Sloane, May 30 2009

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 *)
  • 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

A074909 Running sum of Pascal's triangle (A007318), or beheaded Pascal's triangle read by beheaded rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 10, 5, 1, 6, 15, 20, 15, 6, 1, 7, 21, 35, 35, 21, 7, 1, 8, 28, 56, 70, 56, 28, 8, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11
Offset: 0

Author

Wouter Meeussen, Oct 01 2002

Keywords

Comments

This sequence counts the "almost triangular" partitions of n. A partition is triangular if it is of the form 0+1+2+...+k. Examples: 3=0+1+2, 6=0+1+2+3. An "almost triangular" partition is a triangular partition with at most 1 added to each of the parts. Examples: 7 = 1+1+2+3 = 0+2+2+3 = 0+1+3+3 = 0+1+2+4. Thus a(7)=4. 8 = 1+2+2+3 = 1+1+3+3 = 1+1+2+4 = 0+2+3+3 = 0+2+2+4 = 0+1+3+4 so a(8)=6. - Moshe Shmuel Newman, Dec 19 2002
The "almost triangular" partitions are the ones cycled by the operation of "Bulgarian solitaire", as defined by Martin Gardner.
Start with A007318 - I (I = Identity matrix), then delete right border of zeros. - Gary W. Adamson, Jun 15 2007
Also the number of increasing acyclic functions from {1..n-k+1} to {1..n+2}. A function f is acyclic if for every subset B of the domain the image of B under f does not equal B. For example, T(3,1)=4 since there are exactly 4 increasing acyclic functions from {1,2,3} to {1,2,3,4,5}: f1={(1,2),(2,3),(3,4)}, f2={(1,2),(2,3),(3,5)}, f3={(1,2),(2,4),(3,5)} and f4={(1,3),(2,4),(4,5)}. - Dennis P. Walsh, Mar 14 2008
Second Bernoulli polynomials are (from A164555 instead of A027641) B2(n,x) = 1; 1/2, 1; 1/6, 1, 1; 0, 1/2, 3/2, 1; -1/30, 0, 1, 2, 1; 0, -1/6, 0, 5/3, 5/2, 1; ... . Then (B2(n,x)/A002260) = 1; 1/2, 1/2; 1/6, 1/2, 1/3; 0, 1/4, 1/2, 1/4; -1/30, 0, 1/3, 1/2, 1/5; 0, -1/12, 0, 5/12, 1/2, 1/6; ... . See (from Faulhaber 1631) Jacob Bernoulli Summae Potestatum (sum of powers) in A159688. Inverse polynomials are 1; -1, 2; 1, -3, 3; -1, 4, -6, 4; ... = A074909 with negative even diagonals. Reflected A053382/A053383 = reflected B(n,x) = RB(n,x) = 1; -1/2, 1; 1/6, -1, 1; 0, 1/2, -3/2, 1; ... . A074909 is inverse of RB(n,x)/A002260 = 1; -1/2, 1/2; 1/6, -1/2, 1/3; 0, 1/4, -1/2, 1/4; ... . - Paul Curtz, Jun 21 2010
A054143 is the fission of the polynomial sequence (p(n,x)) given by p(n,x) = x^n + x^(n-1) + ... + x + 1 by the polynomial sequence ((x+1)^n). See A193842 for the definition of fission. - Clark Kimberling, Aug 07 2011
Reversal of A135278. - Philippe Deléham, Feb 11 2012
For a closed-form formula for arbitrary left and right borders of Pascal-like triangles see A228196. - Boris Putievskiy, Aug 19 2013
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 09 2013
From A238363, the operator equation d/d(:xD:)f(xD)={exp[d/d(xD)]-1}f(xD) = f(xD+1)-f(xD) follows. Choosing f(x) = x^n and using :xD:^n/n! = binomial(xD,n) and (xD)^n = Bell(n,:xD:), the Bell polynomials of A008277, it follows that the lower triangular matrix [padded A074909]
A) = [St2]*[dP]*[St1] = A048993*A132440*[padded A008275]
B) = [St2]*[dP]*[St2]^(-1)
C) = [St1]^(-1)*[dP]*[St1],
where [St1]=padded A008275 just as [St2]=A048993=padded A008277 whereas [padded A074909]=A007318-I with I=identity matrix. - Tom Copeland, Apr 25 2014
T(n,k) generated by m-gon expansions in the case of odd m with "vertex to side" version or even m with "vertex to vertes" version. Refer to triangle expansions in A061777 and A101946 (and their companions for m-gons) which are "vertex to vertex" and "vertex to side" versions respectively. The label values at each iteration can be arranged as a triangle. Any m-gon can also be arranged as the same triangle with conditions: (i) m is odd and expansion is "vertex to side" version or (ii) m is even and expansion is "vertex to vertex" version. m*Sum_{i=1..k} T(n,k) gives the total label value at the n-th iteration. See also A247976. Vertex to vertex: A061777, A247618, A247619, A247620. Vertex to side: A101946, A247903, A247904, A247905. - Kival Ngaokrajang Sep 28 2014
From Tom Copeland, Nov 12 2014: (Start)
With P(n,x) = [(x+1)^(n+1)-x^(n+1)], the row polynomials of this entry, Up(n,x) = P(n,x)/(n+1) form an Appell sequence of polynomials that are the umbral compositional inverses of the Bernoulli polynomials B(n,x), i.e., B[n,Up(.,x)] = x^n = Up[n,B(.,x)] under umbral substitution, e.g., B(.,x)^n = B(n,x).
The e.g.f. for the Bernoulli polynomials is [t/(e^t - 1)] e^(x*t), and for Up(n,x) it's exp[Up(.,x)t] = [(e^t - 1)/t] e^(x*t).
Another g.f. is G(t,x) = log[(1-x*t)/(1-(1+x)*t)] = log[1 + t /(1 + -(1+x)t)] = t/(1-t*Up(.,x)) = Up(0,x)*t + Up(1,x)*t^2 + Up(2,x)*t^3 + ... = t + (1+2x)/2 t^2 + (1+3x+3x^2)/3 t^3 + (1+4x+6x^2+4x^3)/4 t^4 + ... = -log(1-t*P(.,x)), expressed umbrally.
The inverse, Ginv(t,x), in t of the g.f. may be found in A008292 from Copeland's list of formulas (Sep 2014) with a=(1+x) and b=x. This relates these two sets of polynomials to algebraic geometry, e.g., elliptic curves, trigonometric expansions, Chebyshev polynomials, and the combinatorics of permutahedra and their duals.
Ginv(t,x) = [e^((1+x)t) - e^(xt)] / [(1+x) * e^((1+x)t) - x * e^(xt)] = [e^(t/2) - e^(-t/2)] / [(1+x)e^(t/2) - x*e^(-t/2)] = (e^t - 1) / [1 + (1+x) (e^t - 1)] = t - (1 + 2 x) t^2/2! + (1 + 6 x + 6 x^2) t^3/3! - (1 + 14 x + 36 x^2 + 24 x^3) t^4/4! + ... = -exp[-Perm(.,x)t], where Perm(n,x) are the reverse face polynomials, or reverse f-vectors, for the permutahedra, i.e., the face polynomials for the duals of the permutahedra. Cf. A090582, A019538, A049019, A133314, A135278.
With L(t,x) = t/(1+t*x) with inverse L(t,-x) in t, and Cinv(t) = e^t - 1 with inverse C(t) = log(1 + t). Then Ginv(t,x) = L[Cinv(t),(1+x)] and G(t,x) = C[L[t,-(1+x)]]. Note L is the special linear fractional (Mobius) transformation.
Connections among the combinatorics of the permutahedra, simplices (cf. A135278), and the associahedra can be made through the Lagrange inversion formula (LIF) of A133437 applied to G(t,x) (cf. A111785 and the Schroeder paths A126216 also), and similarly for the LIF A134685 applied to Ginv(t,x) involving the simplicial Whitehouse complex, phylogenetic trees, and other structures. (See also the LIFs A145271 and A133932). (End)
R = x - exp[-[B(n+1)/(n+1)]D] = x - exp[zeta(-n)D] is the raising operator for this normalized sequence UP(n,x) = P(n,x) / (n+1), that is, R UP(n,x) = UP(n+1,x), where D = d/dx, zeta(-n) is the value of the Riemann zeta function evaluated at -n, and B(n) is the n-th Bernoulli number, or constant B(n,0) of the Bernoulli polynomials. The raising operator for the Bernoulli polynomials is then x + exp[-[B(n+1)/(n+1)]D]. [Note added Nov 25 2014: exp[zeta(-n)D] is abbreviation of exp(a.D) with (a.)^n = a_n = zeta(-n)]. - Tom Copeland, Nov 17 2014
The diagonals T(n, n-m), for n >= m, give the m-th iterated partial sum of the positive integers; that is A000027(n+1), A000217(n), A000292(n-1), A000332(n+1), A000389(n+1), A000579(n+1), A000580(n+1), A000581(n+1), A000582(n+1), ... . - Wolfdieter Lang, May 21 2015
The transpose gives the numerical coefficients of the Maurer-Cartan form matrix for the general linear group GL(n,1) (cf. Olver, but note that the formula at the bottom of p. 6 has an error--the 12 should be a 15). - Tom Copeland, Nov 05 2015
The left invariant Maurer-Cartan form polynomial on p. 7 of the Olver paper for the group GL^n(1) is essentially a binomial convolution of the row polynomials of this entry with those of A133314, or equivalently the row polynomials generated by the product of the e.g.f. of this entry with that of A133314, with some reindexing. - Tom Copeland, Jul 03 2018
From Tom Copeland, Jul 10 2018: (Start)
The first column of the inverse matrix is the sequence of Bernoulli numbers, which follows from the umbral definition of the Bernoulli polynomials (B.(0) + x)^n = B_n(x) evaluated at x = 1 and the relation B_n(0) = B_n(1) for n > 1 and -B_1(0) = 1/2 = B_1(1), so the Bernoulli numbers can be calculated using Cramer's rule acting on this entry's matrix and, therefore, from the ratios of volumes of parallelepipeds determined by the columns of this entry's square submatrices. - Tom Copeland, Jul 10 2018
Umbrally composing the row polynomials with B_n(x), the Bernoulli polynomials, gives (B.(x)+1)^(n+1) - (B.(x))^(n+1) = d[x^(n+1)]/dx = (n+1)*x^n, so multiplying this entry as a lower triangular matrix (LTM) by the LTM of the coefficients of the Bernoulli polynomials gives the diagonal matrix of the natural numbers. Then the inverse matrix of this entry has the elements B_(n,k)/(k+1), where B_(n,k) is the coefficient of x^k for B_n(x), and the e.g.f. (1/x) (e^(xt)-1)/(e^t-1). (End)

Examples

			T(4,2) = 0+0+1+3+6 = 10 = binomial(5, 2).
Triangle T(n,k) begins:
n\k 0  1  2   3   4   5   6   7   8   9 10 11
0:  1
1:  1  2
2:  1  3  3
3:  1  4  6   4
4:  1  5 10  10   5
5:  1  6 15  20  15   6
6:  1  7 21  35  35  21   7
7:  1  8 28  56  70  56  28   8
8:  1  9 36  84 126 126  84  36  9
9:  1 10 45 120 210 252 210 120 45   10
10: 1 11 55 165 330 462 462 330 165  55 11
11: 1 12 66 220 495 792 924 792 495 220 66 12
... Reformatted. - _Wolfdieter Lang_, Nov 04 2014
.
Can be seen as the square array A(n, k) = binomial(n + k + 1, n) read by descending antidiagonals. A(n, k) is the number of monotone nondecreasing functions f: {1,2,..,k} -> {1,2,..,n}. - _Peter Luschny_, Aug 25 2019
[0]  1,  1,   1,   1,    1,    1,     1,     1,     1, ... A000012
[1]  2,  3,   4,   5,    6,    7,     8,     9,    10, ... A000027
[2]  3,  6,  10,  15,   21,   28,    36,    45,    55, ... A000217
[3]  4, 10,  20,  35,   56,   84,   120,   165,   220, ... A000292
[4]  5, 15,  35,  70,  126,  210,   330,   495,   715, ... A000332
[5]  6, 21,  56, 126,  252,  462,   792,  1287,  2002, ... A000389
[6]  7, 28,  84, 210,  462,  924,  1716,  3003,  5005, ... A000579
[7]  8, 36, 120, 330,  792, 1716,  3432,  6435, 11440, ... A000580
[8]  9, 45, 165, 495, 1287, 3003,  6435, 12870, 24310, ... A000581
[9] 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48620, ... A000582
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10],n->List([0..n],k->Binomial(n+1,k)))); # Muniru A Asiru, Jul 10 2018
    
  • Haskell
    a074909 n k = a074909_tabl !! n !! k
    a074909_row n = a074909_tabl !! n
    a074909_tabl = iterate
       (\row -> zipWith (+) ([0] ++ row) (row ++ [1])) [1]
    -- Reinhard Zumkeller, Feb 25 2012
    
  • Magma
    /* As triangle */ [[Binomial(n+1,k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 22 2018
    
  • Maple
    A074909 := proc(n,k)
        if k > n or k < 0 then
            0;
        else
            binomial(n+1,k) ;
        end if;
    end proc: # Zerinvary Lajos, Nov 09 2006
  • Mathematica
    Flatten[Join[{1}, Table[Sum[Binomial[k, m], {k, 0, n}], {n, 0, 12}, {m, 0, n}] ]] (* or *) Flatten[Join[{1}, Table[Binomial[n, m], {n, 12}, {m, n}]]]
  • PARI
    print1(1);for(n=1,10,for(k=1,n,print1(", "binomial(n,k)))) \\ Charles R Greathouse IV, Mar 26 2013
    
  • Python
    from math import comb, isqrt
    def A074909(n): return comb(r:=(m:=isqrt(k:=n+1<<1))+(k>m*(m+1)),n-comb(r,2)) # Chai Wah Wu, Nov 12 2024

Formula

T(n, k) = Sum_{i=0..n} C(i, n-k) = C(n+1, k).
Row n has g.f. (1+x)^(n+1)-x^(n+1).
E.g.f.: ((1+x)*e^t - x) e^(x*t). The row polynomials p_n(x) satisfy dp_n(x)/dx = (n+1)*p_(n-1)(x). - Tom Copeland, Jul 10 2018
T(n, k) = T(n-1, k-1) + T(n-1, k) for k: 0Reinhard Zumkeller, Apr 18 2005
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2), T(0,0)=1, T(1,0)=1, T(1,1)=2, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Dec 27 2013
G.f. for column k (with leading zeros): x^(k-1)*(1/(1-x)^(k+1)-1), k >= 0. - Wolfdieter Lang, Nov 04 2014
Up(n, x+y) = (Up(.,x)+ y)^n = Sum_{k=0..n} binomial(n,k) Up(k,x)*y^(n-k), where Up(n,x) = ((x+1)^(n+1)-x^(n+1)) / (n+1) = P(n,x)/(n+1) with P(n,x) the n-th row polynomial of this entry. dUp(n,x)/dx = n * Up(n-1,x) and dP(n,x)/dx = (n+1)*P(n-1,x). - Tom Copeland, Nov 14 2014
The o.g.f. GF(x,t) = x / ((1-t*x)*(1-(1+t)x)) = x + (1+2t)*x^2 + (1+3t+3t^2)*x^3 + ... has the inverse GFinv(x,t) = (1+(1+2t)x-sqrt(1+(1+2t)*2x+x^2))/(2t(1+t)x) in x about 0, which generates the row polynomials (mod row signs) of A033282. The reciprocal of the o.g.f., i.e., x/GF(x,t), gives the free cumulants (1, -(1+2t) , t(1+t) , 0, 0, ...) associated with the moments defined by GFinv, and, in fact, these free cumulants generate these moments through the noncrossing partitions of A134264. The associated e.g.f. and relations to Grassmannians are described in A248727, whose polynomials are the basis for an Appell sequence of polynomials that are umbral compositional inverses of the Appell sequence formed from this entry's polynomials (distinct from the one described in the comments above, without the normalizing reciprocal). - Tom Copeland, Jan 07 2015
T(n, k) = (1/k!) * Sum_{i=0..k} Stirling1(k,i)*(n+1)^i, for 0<=k<=n. - Ridouane Oudra, Oct 23 2022

Extensions

I added an initial 1 at the suggestion of Paul Barry, which makes the triangle a little nicer but may mean that some of the formulas will now need adjusting. - N. J. A. Sloane, Feb 11 2003
Formula section edited, checked and corrected by Wolfdieter Lang, Nov 04 2014

A130595 Triangle read by rows: lower triangular matrix which is inverse to Pascal's triangle (A007318) regarded as a lower triangular matrix.

Original entry on oeis.org

1, -1, 1, 1, -2, 1, -1, 3, -3, 1, 1, -4, 6, -4, 1, -1, 5, -10, 10, -5, 1, 1, -6, 15, -20, 15, -6, 1, -1, 7, -21, 35, -35, 21, -7, 1, 1, -8, 28, -56, 70, -56, 28, -8, 1, -1, 9, -36, 84, -126, 126, -84, 36, -9, 1, 1, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -1, 11, -55, 165, -330, 462, -462, 330, -165, 55, -11, 1
Offset: 0

Author

Philippe Deléham, Jun 17 2007

Keywords

Comments

Triangle T(n,k), read by rows, given by [-1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.
Coefficients of the polynomials generated by the e.g.f. exp(x*t)*exp(-t). - Peter Luschny, Jul 13 2009
Riordan array (1/(1+x), x/(1+x)). - Philippe Deléham, Nov 29 2009
Multiplication of a sequence (written as column vector) by this matrix (to the left) yields the inverse Binomial transform of the sequence. - M. F. Hasler, Nov 01 2014
From Tom Copeland, Nov 16 2016: (Start)
This signed Pascal matrix IP and the Pascal matrix P contain the coefficients of a prototypical pair of Appell polynomial sequences that are inverse under umbral composition with e.g.f.s e^((x-1)*t) = e^(-t) e^(xt) = f(t) e^(xt) and e^((x+1)t) = e^t e^(xt) = g(t) e^(xt) and row polynomials q_n(x) = (x-1)^n and p_n(x) = (x+1)^n, respectively. The inverse property for an Appell pair is reflected in IP*P = identity matrix, f(t) = 1/g(t), the umbral relation p_n(q.(x)) = x^n = q_n(p.(x)), and their respective raising operators R_(Ip) = x - h(D) and R_P = x + h(D) differing only in the sign of the differential term (h(D) = 1, in this case). The lowering operator for an Appell sequence is L = D = d/dx with L p_n(x) = n*p_(n-1)(x), and the raising operator is defined by R p_n(x) = p_(n+1)(x).
The related signed Pascal matrix M with M(n,k) = (-1)^n IP(n,k) = (-1)^k P(n,k) has the e.g.f. e^((1-x)t) = e^t e^(-xt), and w_n(x) = (1-x)^n is not an Appell sequence, but it is a Sheffer sequence with lowering and raising operators L = -D and R = 1 - x, and M = M^(-1) since w_n(w.(x)) = (1-w.(x))^n = sum_{k = 0,..,n} binomial(n,k) (-1)^k w_k(x) = (1-(1-x))^n = x^n.
Umbral composition of a pair of Sheffer polynomial sequences, of which Appell sequences are a special class, is equivalent to the multiplication of their respective coefficient matrices.
(End)

Examples

			Triangle begins with T(0,0):
   1;
  -1,    1;
   1,   -2,    1;
  -1,    3,   -3,    1;
   1,   -4,    6,   -4,    1;
  -1,    5,  -10,   10,   -5,    1;
   1,   -6,   15,  -20,   15,   -6,    1;
  -1,    7,  -21,   35,  -35,   21,   -7,    1;
   1,   -8,   28,  -56,   70,  -56,   28,   -8,    1;
  -1,    9,  -36,   84, -126,  126,  -84,   36,   -9,    1;
  ...
As polynomials:
  + 1;
  - 1 + 1 x;
  + 1 - 2 x + 1 x^2;
  - 1 + 3 x - 3 x^2 + 1 x^3;
  + 1 - 4 x + 6 x^2 - 4 x^3 + 1 x^4;
		

Crossrefs

Sums include: A000007 (row sums), A019590, A039834 (diagonal sums), A049347 (alternating sign diagonal sums), A063524, A085750, A122803 (alternating sign sums).

Programs

  • Haskell
    a130595 n = a130595_list !! n
    a130595_list = concat $ iterate ([-1,1] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Haskell
    a130595 n k = a130595_tabl !! n !! k
    a130595_row n = a130595_tabl !! n
    a130595_tabl = iterate (\row -> zipWith (-) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Apr 13 2013
    
  • Magma
    [(-1)^(n+k)*Binomial(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jun 22 2024
    
  • Maple
    A130595 := proc(n,k)
            (-1)^(n+k)*binomial(n,k) ;
    end proc: # R. J. Mathar, Feb 13 2013
  • Mathematica
    nmax = 11; t[n_, k_] := (-1)^(n-k)*Binomial[n, k]; Flatten[ Table[ t[n, k], {n, 0, nmax}, {k, 0, n}] ] (* Jean-François Alcover, Dec 01 2011 *)
    Table[Binomial[-1-k, n-k],{n,0,11},{k,0,n}]//Flatten (* Robert A. Russell, Jan 16 2020 *)
  • PARI
    A130595(n,k)=(-1)^(n+k)*binomial(n,k) \\ M. F. Hasler, Nov 01 2014
    
  • SageMath
    flatten([[(-1)^(n+k)*binomial(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Jun 22 2024

Formula

T(n,k) = (-1)^(n-k)*binomial(n,k) = (-1)^(n-k)*A007318(n,k).
T(n,k) = T(n-1,k-1) - T(n-1,k). - Philippe Deléham, Oct 10 2011
G.f.: 1/(1+x-x*y). - R. J. Mathar, Aug 11 2015 [corrected by Anders Claesson, Nov 28 2015]
Conjecture from Dale Gerdemann, Nov 28 2015:
T(n,k) = (n-k+1)*T(n-1,k-1) + (k-1)*T(n-1,k).
Proof from Anders Claesson, Nov 29 2015:
It follows from T(n,k) = T(n-1,k-1) - T(n-1,k) and n*T(n-1,k-1) = k*T(n,k) that: (n-k+1)*T(n-1,k-1) + (k-1)*T(n-1,k) = n*T(n-1,k-1) - (k-1)*T(n-1,k-1) + (k-1)*T(n-1,k) = n*T(n-1,k-1) - (k-1)*(T(n-1,k-1) - T(n-1,k)) = n*T(n-1,k-1) - (k-1)*T(n,k) = n*T(n-1,k-1) - k*T(n,k) + T(n,k) = T(n,k). QED
(-1)^(n+1) Sum_{k=1..n} T(n,k)/k = Sum_{k=1..n} 1/k = H(n) where H(n) is the n-th harmonic number. For a proof see link "Relation between binomial coefficients and harmonic numbers". - Wolfgang Hintze, Oct 22 2016
T(n,k) = binomial(-1-k,n-k). - Robert A. Russell, Jan 16 2020
From G. C. Greubel, Jun 22 2024: (Start)
T(n, n-k) = (-1)^n*T(n, k).
Sum_{k=0..n} T(n, k) = A000007(n).
Sum_{k=0..n} (-1)^k*T(n, k) = A122803(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A039834(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A049347(n).
Sum_{k=0..n} k*T(n, k) = A063524(n).
Sum_{k=0..n} (-1)^k*k*T(n, k) = A085750(n+1).
Sum_{k=0..n} (k+1)*T(n, k) = A019590(n). (End)

Extensions

Edited by N. J. A. Sloane, Nov 27 2011

A101950 Product of A049310 and A007318 as lower triangular matrices.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, -1, 1, 3, 1, -1, -2, 3, 4, 1, 0, -4, -2, 6, 5, 1, 1, -2, -9, 0, 10, 6, 1, 1, 3, -9, -15, 5, 15, 7, 1, 0, 6, 3, -24, -20, 14, 21, 8, 1, -1, 3, 18, -6, -49, -21, 28, 28, 9, 1, -1, -4, 18, 36, -35, -84, -14, 48, 36, 10, 1, 0, -8, -4, 60, 50, -98, -126, 6, 75, 45, 11, 1, 1, -4, -30, 20, 145, 36, -210
Offset: 0

Author

Paul Barry, Dec 22 2004

Keywords

Comments

A Chebyshev and Pascal product.
Row sums are n+1, diagonal sums the constant sequence 1 resp. A023434(n+1). Riordan array (1/(1-x+x^2),x/(1-x+x^2)).
Apart from signs, identical with A104562.
Subtriangle of the triangle given by [0,1,-1,1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 27 2010
The Fi1 and Fi2 sums lead to A004525 and the Gi1 sums lead to A077889, see A180662 for the definitions of these triangle sums. - Johannes W. Meijer, Aug 06 2011
Also the convolution triangle of the inverse of 6th cyclotomic polynomial A010892. - Peter Luschny, Oct 08 2022

Examples

			Triangle begins:
   1,
   1, 1,
   0, 2, 1,
  -1, 1, 3, 1,
  -1,-2, 3, 4, 1,
  ...
Triangle [0,1,-1,1,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] begins : 1 ; 0,1 ; 0,1,1 ; 0,0,2,1 ; 0,-1,1,3,1 ; 0,-1,-2,3,4,1 ; ... - _Philippe Deléham_, Jan 27 2010
		

Crossrefs

Programs

  • Maple
    A101950 := proc(n,k) local j,k1: add((-1)^((n-j)/2)*binomial((n+j)/2,j)*(1+(-1)^(n+j))* binomial(j,k)/2, j=0..n) end: seq(seq(A101950(n,k),k=0..n), n=0..11); # Johannes W. Meijer, Aug 06 2011
    # Uses function PMatrix from A357368. Adds a row on top and a column to the left.
    PMatrix(10, n -> [0, 1, 1, 0, -1,-1][irem(n, 6) + 1]); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] /; k>n || k<0 = 0; T[n_, k_] := T[n, k] = T[n-1, k-1]+T[n-1, k]-T[n-2, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)

Formula

T(n, k) = Sum_{j=0..n} (-1)^((n-j)/2)*C((n+j)/2,j)*(1+(-1)^(n+j))*C(j,k)/2.
T(0,0) = 1, T(n,k) = 0,if k>n or if k<0, T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k). - Philippe Deléham, Jan 26 2010
p(n,x) = (x+1)*p(n-1,x)-p(n-2,x) with p(0,x) = 1 and p(1,x) = x+1 [Dias].
G.f.: 1/(1-x-x^2-y*x). - Philippe Deléham, Feb 10 2012
T(n,0) = A010892(n), T(n+1,1) = A099254(n), T(n+2,2) = A128504(n). - Philippe Deléham, Mar 07 2014
T(n,k) = C(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], 4) for n>=1. - Peter Luschny, Apr 25 2016

Extensions

Typo in formula corrected and information added by Johannes W. Meijer, Aug 06 2011

A135278 Triangle read by rows, giving the numbers T(n,m) = binomial(n+1, m+1); or, Pascal's triangle A007318 with its left-hand edge removed.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 10, 5, 1, 6, 15, 20, 15, 6, 1, 7, 21, 35, 35, 21, 7, 1, 8, 28, 56, 70, 56, 28, 8, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1, 12, 66, 220, 495, 792, 924, 792
Offset: 0

Author

Zerinvary Lajos, Dec 02 2007

Keywords

Comments

T(n,m) is the number of m-faces of a regular n-simplex.
An n-simplex is the n-dimensional analog of a triangle. Specifically, a simplex is the convex hull of a set of (n + 1) affinely independent points in some Euclidean space of dimension n or higher, i.e., a set of points such that no m-plane contains more than (m + 1) of them. Such points are said to be in general position.
Reversing the rows gives A074909, which as a linear sequence is essentially the same as this.
From Tom Copeland, Dec 07 2007: (Start)
T(n,k) * (k+1)! = A068424. The comment on permuted words in A068424 shows that T is related to combinations of letters defined by connectivity of regular polytope simplexes.
If T is the diagonally-shifted Pascal matrix, binomial(n+m, k+m), for m=1, then T is a fundamental type of matrix that is discussed in A133314 and the following hold.
The infinitesimal matrix generator is given by A132681, so T = LM(1) of A132681 with inverse LM(-1).
With a(k) = (-x)^k / k!, T * a = [ Laguerre(n,x,1) ], a vector array with index n for the Laguerre polynomials of order 1. Other formulas for the action of T are given in A132681.
T(n,k) = (1/n!) (D_x)^n (D_t)^k Gf(x,t) evaluated at x=t=0 with Gf(x,t) = exp[ t * x/(1-x) ] / (1-x)^2.
[O.g.f. for T ] = 1 / { [ 1 - t * x/(1-x) ] * (1-x)^2 }. [ O.g.f. for row sums ] = 1 / { (1-x) * (1-2x) }, giving A000225 (without a leading zero) for the row sums. Alternating sign row sums are all 1. [Sign correction noted by Vincent J. Matsko, Jul 19 2015]
O.g.f. for row polynomials = [ (1+q)**(n+1) - 1 ] / [ (1+q) -1 ] = A(1,n+1,q) on page 15 of reference on Grassmann cells in A008292. (End)
Given matrices A and B with A(n,k) = T(n,k)*a(n-k) and B(n,k) = T(n,k)*b(n-k), then A*B = C where C(n,k) = T(n,k)*[a(.)+b(.)]^(n-k), umbrally. The e.g.f. for the row polynomials of A is {(a+t) exp[(a+t)x] - a exp(a x)}/t, umbrally. - Tom Copeland, Aug 21 2008
A007318*A097806 as infinite lower triangular matrices. - Philippe Deléham, Feb 08 2009
Riordan array (1/(1-x)^2, x/(1-x)). - Philippe Deléham, Feb 22 2012
The elements of the matrix inverse are T^(-1)(n,k)=(-1)^(n+k)*T(n,k). - R. J. Mathar, Mar 12 2013
Relation to K-theory: T acting on the column vector (-0,d,-d^2,d^3,...) generates the Euler classes for a hypersurface of degree d in CP^n. Cf. Dugger p. 168 and also A104712, A111492, and A238363. - Tom Copeland, Apr 11 2014
Number of walks of length p>0 between any two distinct vertices of the complete graph K_(n+2) is W(n+2,p)=(-1)^(p-1)*Sum_{k=0..p-1} T(p-1,k)*(-n-2)^k = ((n+1)^p - (-1)^p)/(n+2) = (-1)^(p-1)*Sum_{k=0..p-1} (-n-1)^k. This is equal to (-1)^(p-1)*Phi(p,-n-1), where Phi is the cyclotomic polynomial when p is an odd prime. For K_3, see A001045; for K_4, A015518; for K_5, A015521; for K_6, A015531; for K_7, A015540. - Tom Copeland, Apr 14 2014
Consider the transformation 1 + x + x^2 + x^3 + ... + x^n = A_0*(x-1)^0 + A_1*(x-1)^1 + A_2*(x-1)^2 + ... + A_n*(x-1)^n. This sequence gives A_0, ..., A_n as the entries in the n-th row of this triangle, starting at n = 0. - Derek Orr, Oct 14 2014
See A074909 for associations among this array, the Bernoulli polynomials and their umbral compositional inverses, and the face polynomials of permutahedra and their duals (cf. A019538). - Tom Copeland, Nov 14 2014
From Wolfdieter Lang, Dec 10 2015: (Start)
A(r, n) = T(n+r-2, r-1) = risefac(n,r)/r! = binomial(n+r-1, r), for n >= 1 and r >= 1, gives the array with the number of independent components of a symmetric tensors of rank r (number of indices) and dimension n (indices run from 1 to n). Here risefac(n, k) is the rising factorial.
As(r, n) = T(n+1, r+1) = fallfac(n, r)/r! = binomial(n, r), r >= 1 and n >= 1 (with the triangle entries T(n, k) = 0 for n < k) gives the array with the number of independent components of an antisymmetric tensor of rank r and dimension n. Here fallfac is the falling factorial. (End)
The h-vectors associated to these f-vectors are given by A000012 regarded as a lower triangular matrix. Read as bivariate polynomials, the h-polynomials are the complete homogeneous symmetric polynomials in two variables, found in the compositional inverse of an e.g.f. for A008292, the h-vectors of the permutahedra. - Tom Copeland, Jan 10 2017
For a correlation between the states of a quantum system and the combinatorics of the n-simplex, see Boya and Dixit. - Tom Copeland, Jul 24 2017

Examples

			The triangle T(n, k) begins:
   n\k  0  1   2   3   4   5   6   7   8  9 10 11 ...
   0:   1
   1:   2  1
   2:   3  3   1
   3:   4  6   4   1
   4:   5 10  10   5   1
   5:   6 15  20  15   6   1
   6:   7 21  35  35  21   7   1
   7:   8 28  56  70  56  28   8   1
   8:   9 36  84 126 126  84  36   9   1
   9:  10 45 120 210 252 210 120  45  10  1
  10:  11 55 165 330 462 462 330 165  55 11  1
  11:  12 66 220 495 792 924 792 495 220 66 12  1
  ... reformatted by _Wolfdieter Lang_, Mar 23 2015
Production matrix begins
   2   1
  -1   1   1
   1   0   1   1
  -1   0   0   1   1
   1   0   0   0   1   1
  -1   0   0   0   0   1   1
   1   0   0   0   0   0   1   1
  -1   0   0   0   0   0   0   1   1
   1   0   0   0   0   0   0   0   1   1
- _Philippe Deléham_, Jan 29 2014
From _Wolfdieter Lang_, Nov 08 2018: (Start)
Recurrence [_Philippe Deléham_]: T(7, 3) = 2*35 + 35 - 15 - 20 = 70.
Recurrence from Riordan A- and Z-sequences: [1,1,repeat(0)] and [2, repeat(-1, +1)]: From Z: T(5, 0) = 2*5 - 10 + 10 - 5 + 1 = 6. From A: T(7, 3) = 35 + 35 = 70.
Boas-Buck column k=3 recurrence: T(7, 3) = (5/4)*(1 + 5 + 15 + 35) = 70. (End)
		

Programs

  • Maple
    for i from 0 to 12 do seq(binomial(i, j)*1^(i-j), j = 1 .. i) od;
  • Mathematica
    Flatten[Table[CoefficientList[D[1/x ((x + 1) Exp[(x + 1) z] - Exp[z]), {z, k}] /. z -> 0, x], {k, 0, 11}]]
    CoefficientList[CoefficientList[Series[1/((1 - x)*(1 - x - x*y)), {x, 0, 10}, {y, 0, 10}], x], y] // Flatten (* G. C. Greubel, Nov 22 2017 *)
  • PARI
    for(n=0, 20, for(k=0, n, print1(1/k!*sum(i=0, n, (prod(j=0, k-1, i-j))), ", "))) \\ Derek Orr, Oct 14 2014
    
  • Sage
    Trow = lambda n: sum((x+1)^j for j in (0..n)).list()
    for n in (0..10): print(Trow(n)) # Peter Luschny, Jul 09 2019

Formula

T(n, k) = Sum_{j=k..n} binomial(j,k) = binomial(n+1, k+1), n >= k >= 0, else 0. (Partial sum of column k of A007318 (Pascal), or summation on the upper binomial index (Graham et al. (GKP), eq. (5.10). For the GKP reference see A007318.) - Wolfdieter Lang, Aug 22 2012
E.g.f.: 1/x*((1 + x)*exp(t*(1 + x)) - exp(t)) = 1 + (2 + x)*t + (3 + 3*x + x^2)*t^2/2! + .... The infinitesimal generator for this triangle has the sequence [2,3,4,...] on the main subdiagonal and 0's elsewhere. - Peter Bala, Jul 16 2013
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k) - T(n-2,k-1), T(0,0)=1, T(1,0)=2, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Dec 27 2013
T(n,k) = A193862(n,k)/2^k. - Philippe Deléham, Jan 29 2014
G.f.: 1/((1-x)*(1-x-x*y)). - Philippe Deléham, Mar 13 2014
From Tom Copeland, Mar 26 2014: (Start)
[From Copeland's 2007 and 2008 comments]
A) O.g.f.: 1 / { [ 1 - t * x/(1-x) ] * (1-x)^2 } (same as Deleham's).
B) The infinitesimal generator for T is given in A132681 with m=1 (same as Bala's), which makes connections to the ubiquitous associated Laguerre polynomials of integer orders, for this case the Laguerre polynomials of order one L(n,-t,1).
C) O.g.f. of row e.g.f.s: Sum_{n>=0} L(n,-t,1) x^n = exp[t*x/(1-x)]/(1-x)^2 = 1 + (2+t)x + (3+3*t+t^2/2!)x^2 + (4+6*t+4*t^2/2!+t^3/3!)x^3+ ... .
D) E.g.f. of row o.g.f.s: ((1+t)*exp((1+t)*x)-exp(x))/t (same as Bala's).
E) E.g.f. for T(n,k)*a(n-k): {(a+t) exp[(a+t)x] - a exp(a x)}/t, umbrally. For example, for a(k)=2^k, the e.g.f. for the row o.g.f.s is {(2+t) exp[(2+t)x] - 2 exp(2x)}/t.
(End)
From Tom Copeland, Apr 28 2014: (Start)
With different indexing
A) O.g.f. by row: [(1+t)^n-1]/t.
B) O.g.f. of row o.g.f.s: {1/[1-(1+t)*x] - 1/(1-x)}/t.
C) E.g.f. of row o.g.f.s: {exp[(1+t)*x]-exp(x)}/t.
These generating functions are related to row e.g.f.s of A111492. (End)
From Tom Copeland, Sep 17 2014: (Start)
A) U(x,s,t)= x^2/[(1-t*x)(1-(s+t)x)] = Sum_{n >= 0} F(n,s,t)x^(n+2) is a generating function for bivariate row polynomials of T, e.g., F(2,s,t)= s^2 + 3s*t + 3t^2 (Buchstaber, 2008).
B) dU/dt=x^2 dU/dx with U(x,s,0)= x^2/(1-s*x) (Buchstaber, 2008).
C) U(x,s,t) = exp(t*x^2*d/dx)U(x,s,0) = U(x/(1-t*x),s,0).
D) U(x,s,t) = Sum[n >= 0, (t*x)^n L(n,-:xD:,-1)] U(x,s,0), where (:xD:)^k=x^k*(d/dx)^k and L(n,x,-1) are the Laguerre polynomials of order -1, related to normalized Lah numbers. (End)
E.g.f. satisfies the differential equation d/dt(e.g.f.(x,t)) = (x+1)*e.g.f.(x,t) + exp(t). - Vincent J. Matsko, Jul 18 2015
The e.g.f. of the Norlund generalized Bernoulli (Appell) polynomials of order m, NB(n,x;m), is given by exponentiation of the e.g.f. of the Bernoulli numbers, i.e., multiple binomial self-convolutions of the Bernoulli numbers, through the e.g.f. exp[NB(.,x;m)t] = (t/(e^t - 1))^(m+1) * e^(xt). Norlund gave the relation to the factorials (x-1)!/(x-1-n)! = (x-1) ... (x-n) = NB(n,x;n), so T(n,m) = NB(m+1,n+2;m+1)/(m+1)!. - Tom Copeland, Oct 01 2015
From Wolfdieter Lang, Nov 08 2018: (Start)
Recurrences from the A- and Z- sequences for the Riordan triangle (see the W. Lang link under A006232 with references), which are A(n) = A019590(n+1), [1, 1, repeat (0)] and Z(n) = (-1)^(n+1)*A054977(n), [2, repeat(-1, 1)]:
T(0, 0) = 1, T(n, k) = 0 for n < k, and T(n, 0) = Sum_{j=0..n-1} Z(j)*T(n-1, j), for n >= 1, and T(n, k) = T(n-1, k-1) + T(n-1, k), for n >= m >= 1.
Boas-Buck recurrence for columns (see the Aug 10 2017 remark in A036521 also for references):
T(n, k) = ((2 + k)/(n - k))*Sum_{j=k..n-1} T(j, k), for n >= 1, k = 0, 1, ..., n-1, and input T(n, n) = 1, for n >= 0, (the BB-sequences are alpha(n) = 2 and beta(n) = 1). (End)
T(n, k) = [x^k] Sum_{j=0..n} (x+1)^j. - Peter Luschny, Jul 09 2019

Extensions

Edited by Tom Copeland and N. J. A. Sloane, Dec 11 2007

A048996 Irregular triangle read by rows. Preferred multisets: numbers refining A007318 using format described in A036038.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 2, 2, 1, 3, 6, 1, 4, 6, 5, 1, 1, 2, 2, 2, 3, 6, 3, 3, 4, 12, 4, 5, 10, 6, 1, 1, 2, 2, 2, 1, 3, 6, 6, 3, 3, 4, 12, 6, 12, 1, 5, 20, 10, 6, 15, 7, 1, 1, 2, 2, 2, 2, 3, 6, 6, 3, 3, 6, 1, 4, 12, 12, 12, 12, 4, 5, 20, 10, 30, 5, 6, 30, 20, 7, 21, 8, 1
Offset: 0

Author

Keywords

Comments

This array gives in row n>=1 the multinomial numbers (call them M_0 numbers) m!/product((a_j)!,j=1..n) with the exponents of the partitions of n with number of parts m:=sum(a_j,j=1..n), given in the Abramowitz-Stegun order. See p. 831 of the given reference. See also the arrays for the M_1, M_2 and M_3 multinomial numbers A036038, A036039 and A036040 (or A080575).
For a signed version see A111786.
These M_0 multinomial numbers give the number of compositions of n >= 1 with parts corresponding to the partitions of n (in A-St order). See an n = 5 example below. The triangle with the summed entries of like number of parts m is A007318(n-1, m-1) (Pascal). - Wolfdieter Lang, Jan 29 2021

Examples

			Table starts:
[1]
[1]
[1, 1]
[1, 2, 1]
[1, 2, 1, 3, 1]
[1, 2, 2, 3, 3, 4, 1]
[1, 2, 2, 1, 3, 6, 1, 4, 6,  5, 1]
[1, 2, 2, 2, 3, 6, 3, 3, 4, 12, 4, 5, 10, 6, 1]
.
T(5,6) = 4 because there are four multisets using the first four digits {0,1,2,3}: 32100, 32110, 32210 and 33210
T(5,6) = 4 because there are 4 compositions of 5 that can be formed from the partition 2+1+1+1. - _Geoffrey Critzer_, May 19 2013
These 4 compositions 2+1+1+1, 1+2+1+1, 1+1+2+1 and 1+1+1+2 of 5 correspond to the 4 set partitions of [5] :={1,2,3,4,5}, with 4 blocks of consecutive numbers, namely {1,2},{3},{4},{5} and {1},{2,3},{4},{5} and {1},{2},{3,4},{5} and {1},{2},{3},{4,5}. - _Wolfdieter Lang_, May 30 2018
		

Crossrefs

Cf. A000670, A007318, A036035, A036038, A019538, A115621, A309004, A000079 (row sums), A000041 (row lengths).

Programs

  • Maple
    nmax:=9: with(combinat): for n from 1 to nmax do P(n):=sort(partition(n)): for r from 1 to numbpart(n) do B(r):=P(n)[r] od: for m from 1 to numbpart(n) do s:=0: j:=0: while sA036040(n, m) := (add(q(t), t=1..n))!/(mul(q(t)!, t=1..n)); od: od: seq(seq(A036040(n, m), m=1..numbpart(n)), n=1..nmax); # Johannes W. Meijer, Jul 14 2016
  • PARI
    C(sig)={my(S=Set(sig)); (#sig)!/prod(k=1, #S, (#select(t->t==S[k], sig))!)}
    Row(n)={apply(C, [Vecrev(p) | p<-partitions(n)])}
    { for(n=0, 7, print(Row(n))) } \\ Andrew Howroyd, Oct 18 2020
  • SageMath
    from collections import Counter
    def ASPartitions(n, k):
        Q = [p.to_list() for p in Partitions(n, length=k)]
        for q in Q: q.reverse()
        return sorted(Q)
    def A048996_row(n):
        h = lambda p: product(map(factorial, Counter(p).values()))
        return [factorial(len(p))//h(p) for k in (0..n) for p in ASPartitions(n, k)]
    for n in (1..10): print(A048996_row(n)) # Peter Luschny, Nov 02 2019 [corrected on notice from Sean A. Irvine, Apr 30 2022]
    

Formula

T(n,k) = A036040(n,k) * Factorial(A036043(n,k)) / A036038(n,k) = A049019(n,k) / A036038(n,k).
If the n-th partition is P, a(n) is the multinomial coefficient of the signature of P. - Franklin T. Adams-Watters, May 30 2006
T(n,k) = A309004(A036035(n,k)). - Andrew Howroyd, Oct 19 2020

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 17 2001
a(0)=1 prepended by Andrew Howroyd, Oct 19 2020

A083093 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 3.

Original entry on oeis.org

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

Author

Benoit Cloitre, Apr 22 2003

Keywords

Comments

Start with [1], repeatedly apply the map 0 -> [000/000/000], 1 -> [111/120/100], 2 -> [222/210/200]. - Philippe Deléham, Apr 16 2009
{T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(3))/log(3) = log(6)/log(3) = 1.63092... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - Richard L. Ollerton, Dec 14 2021

Examples

			.            Rows 0 .. 3^3:
.    0:                             1
.    1:                            1 1
.    2:                           1 2 1
.    3:                          1 0 0 1
.    4:                         1 1 0 1 1
.    5:                        1 2 1 1 2 1
.    6:                       1 0 0 2 0 0 1
.    7:                      1 1 0 2 2 0 1 1
.    8:                     1 2 1 2 1 2 1 2 1
.    9:                    1 0 0 0 0 0 0 0 0 1
.   10:                   1 1 0 0 0 0 0 0 0 1 1
.   11:                  1 2 1 0 0 0 0 0 0 1 2 1
.   12:                 1 0 0 1 0 0 0 0 0 1 0 0 1
.   13:                1 1 0 1 1 0 0 0 0 1 1 0 1 1
.   14:               1 2 1 1 2 1 0 0 0 1 2 1 1 2 1
.   15:              1 0 0 2 0 0 1 0 0 1 0 0 2 0 0 1
.   16:             1 1 0 2 2 0 1 1 0 1 1 0 2 2 0 1 1
.   17:            1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1
.   18:           1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1
.   19:          1 1 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 1 1
.   20:         1 2 1 0 0 0 0 0 0 2 1 2 0 0 0 0 0 0 1 2 1
.   21:        1 0 0 1 0 0 0 0 0 2 0 0 2 0 0 0 0 0 1 0 0 1
.   22:       1 1 0 1 1 0 0 0 0 2 2 0 2 2 0 0 0 0 1 1 0 1 1
.   23:      1 2 1 1 2 1 0 0 0 2 1 2 2 1 2 0 0 0 1 2 1 1 2 1
.   24:     1 0 0 2 0 0 1 0 0 2 0 0 1 0 0 2 0 0 1 0 0 2 0 0 1
.   25:    1 1 0 2 2 0 1 1 0 2 2 0 1 1 0 2 2 0 1 1 0 2 2 0 1 1
.   26:   1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
.   27:  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 .
- _Reinhard Zumkeller_, Jul 11 2013
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A006996 (central terms), A173019, A206424, A227428.
Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), (this sequence) (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).

Programs

  • Haskell
    a083093 n k = a083093_tabl !! n !! k
    a083093_row n = a083093_tabl !! n
    a083093_tabl = iterate
       (\ws -> zipWith (\u v -> mod (u + v) 3) ([0] ++ ws) (ws ++ [0])) [1]
    -- Reinhard Zumkeller, Jul 11 2013
    
  • Magma
    /* As triangle: */ [[Binomial(n,k) mod 3: k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Feb 15 2016
    
  • Maple
    A083093 := proc(n,k)
        modp(binomial(n,k),3) ;
    end proc:
    seq(seq(A083093(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Jul 26 2017
  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 3] (* Robert G. Wilson v, Jan 19 2004 *)
  • Python
    from sympy import binomial
    def T(n, k):
        return binomial(n, k) % 3
    for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Jul 26 2017
    
  • Python
    from math import comb, isqrt
    def A083093(n):
        def f(m,k):
            if m<3 and k<3: return comb(m,k)%3
            c,a = divmod(m,3)
            d,b = divmod(k,3)
            return f(c,d)*f(a,b)%3
        return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Apr 30 2025

Formula

T(i, j) = binomial(i, j) mod 3.
T(n+1,k) = (T(n,k) + T(n,k-1)) mod 3. - Reinhard Zumkeller, Jul 11 2013
T(n,k) = Product_{i>=0} binomial(n_i,k_i) mod 3, where n = Sum_{i>=0} n_i*3^i and k = Sum_{i>=0} k_i*3^i, 0<=n_i, k_i <=2 [Allouche et al.]. - R. J. Mathar, Jul 26 2017

A055248 Triangle of partial row sums of triangle A007318(n,m) (Pascal's triangle). Triangle A008949 read backwards. Riordan (1/(1-2x), x/(1-x)).

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 11, 5, 1, 32, 31, 26, 16, 6, 1, 64, 63, 57, 42, 22, 7, 1, 128, 127, 120, 99, 64, 29, 8, 1, 256, 255, 247, 219, 163, 93, 37, 9, 1, 512, 511, 502, 466, 382, 256, 130, 46, 10, 1, 1024, 1023, 1013, 968, 848, 638, 386, 176, 56, 11, 1
Offset: 0

Author

Wolfdieter Lang, May 26 2000

Keywords

Comments

In the language of the Shapiro et al. reference (also given in A053121) such a lower triangular (ordinary) convolution array, considered as matrix, belongs to the Riordan-group. The g.f. for the row polynomials p(n,x) (increasing powers of x) is 1/((1-2*z)*(1-x*z/(1-z))).
Binomial transform of the all 1's triangle: as a Riordan array, it factors to give (1/(1-x),x/(1-x))(1/(1-x),x). Viewed as a number square read by antidiagonals, it has T(n,k) = Sum_{j=0..n} binomial(n+k,n-j) and is then the binomial transform of the Whitney square A004070. - Paul Barry, Feb 03 2005
Riordan array (1/(1-2x), x/(1-x)). Antidiagonal sums are A027934(n+1), n >= 0. - Paul Barry, Jan 30 2005; edited by Wolfdieter Lang, Jan 09 2015
Eigensequence of the triangle = A005493: (1, 3, 10, 37, 151, 674, ...); row sums of triangles A011971 and A159573. - Gary W. Adamson, Apr 16 2009
Read as a square array, this is the generalized Riordan array ( 1/(1 - 2*x), 1/(1 - x) ) as defined in the Bala link (p. 5), which factorizes as ( 1/(1 - x), x/(1 - x) )*( 1/(1 - x), x )*( 1, 1 + x ) = P*U*transpose(P), where P denotes Pascal's triangle, A007318, and U is the lower unit triangular array with 1's on or below the main diagonal. - Peter Bala, Jan 13 2016

Examples

			The triangle a(n,m) begins:
n\m    0    1    2   3   4   5   6   7  8  9 10 ...
0:     1
1:     2    1
2:     4    3    1
3:     8    7    4   1
4:    16   15   11   5   1
5:    32   31   26  16   6   1
6:    64   63   57  42  22   7   1
7:   128  127  120  99  64  29   8   1
8:   256  255  247 219 163  93  37   9  1
9:   512  511  502 466 382 256 130  46 10  1
10: 1024 1023 1013 968 848 638 386 176 56 11  1
... Reformatted. - _Wolfdieter Lang_, Jan 09 2015
Fourth row polynomial (n=3): p(3,x)= 8 + 7*x + 4*x^2 + x^3.
The matrix inverse starts
   1;
  -2,   1;
   2,  -3,   1;
  -2,   5,  -4,    1;
   2,  -7,   9,   -5,    1;
  -2,   9, -16,   14,   -6,    1;
   2, -11,  25,-  30,   20,   -7,    1;
  -2,  13, -36,   55,  -50,   27,   -8,    1;
   2, -15,  49,  -91,  105,  -77,   35,   -9,  1;
  -2,  17, -64,  140, -196,  182, -112,   44, -10,   1;
   2, -19,  81, -204,  336, -378,  294, -156,  54, -11, 1;
   ...
which may be related to A029653. - _R. J. Mathar_, Mar 29 2013
From _Peter Bala_, Dec 23 2014: (Start)
With the array M(k) as defined in the Formula section, the infinite product M(0)*M(1)*M(2)*... begins
/1      \ /1        \ /1       \       /1       \
|2 1     ||0 1       ||0 1      |      |2  1     |
|4 3 1   ||0 2 1     ||0 0 1    |... = |4  5 1   |
|8 7 4 1 ||0 4 3 1   ||0 0 2 1  |      |8 19 9 1 |
|...     ||0 8 7 4 1 ||0 0 4 3 1|      |...      |
|...     ||...       ||...      |      |         |
= A143494. (End)
Matrix factorization of square array as P*U*transpose(P):
/1      \ /1        \ /1 1 1 1 ...\    /1  1  1  1 ...\
|1 1     ||1 1       ||0 1 2 3 ... |   |2  3  4  5 ... |
|1 2 1   ||1 1 1     ||0 0 1 3 ... | = |4  7 11 16 ... |
|1 3 3 1 ||1 1 1 1   ||0 0 0 1 ... |   |8 15 26 42 ... |
|...     ||...       ||...         |   |...            |
- _Peter Bala_, Jan 13 2016
		

Crossrefs

Column sequences: A000079 (powers of 2, m=0), A000225 (m=1), A000295 (m=2), A002662 (m=3), A002663 (m=4), A002664 (m=5), A035038 (m=6), A035039 (m=7), A035040 (m=8), A035041 (m=9), A035042 (m=10).
Row sums: A001792(n) = A055249(n, 0).
Alternating row sums: A011782.
Cf. A011971, A159573. - Gary W. Adamson, Apr 16 2009

Programs

  • Haskell
    a055248 n k = a055248_tabl !! n !! k
    a055248_row n = a055248_tabl !! n
    a055248_tabl = map reverse a008949_tabl
    -- Reinhard Zumkeller, Jun 20 2015
  • Maple
    T := (n,k) -> 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n + 1], [n-k + 2], 1/2).
    seq(seq(simplify(T(n,k)), k=0..n),n=0..10); # Peter Luschny, Oct 10 2019
  • Mathematica
    a[n_, m_] := Sum[ Binomial[n, m + j], {j, 0, n}]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jul 05 2013, after Paul Barry *)
    T[n_, k_] := Binomial[n, k] * Hypergeometric2F1[1, k - n, k + 1, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* Peter Luschny, Oct 06 2023 *)

Formula

a(n, m) = A008949(n, n-m), if n > m >= 0.
a(n, m) = Sum_{k=m..n} A007318(n, k) (partial row sums in columns m).
Column m recursion: a(n, m) = Sum_{j=m..n-1} a(j, m) + A007318(n, m) if n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: (1/(1-2*x))*(x/(1-x))^m, m >= 0.
a(n, m) = Sum_{j=0..n} binomial(n, m+j). - Paul Barry, Feb 03 2005
Inverse binomial transform (by columns) of A112626. - Ross La Haye, Dec 31 2006
T(2n,n) = A032443(n). - Philippe Deléham, Sep 16 2009
From Peter Bala, Dec 23 2014: (Start)
Exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(8 + 7*x + 4*x^2/2! + x^3/3!) = 8 + 15*x + 26*x^2/2! + 42*x^3/3! + 64*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ).
Let M denote the present triangle. For k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite product M(0)*M(1)*M(2)*..., which is clearly well-defined, is equal to A143494 (but with a different offset). See the Example section. Cf. A106516. (End)
a(n,m) = Sum_{p=m..n} 2^(n-p)*binomial(p-1,m-1), n >= m >= 0, else 0. - Wolfdieter Lang, Jan 09 2015
T(n, k) = 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n+1], [n-k+2], 1/2). - Peter Luschny, Oct 10 2019
T(n, k) = binomial(n, k)*hypergeom([1, k - n], [k + 1], -1). - Peter Luschny, Oct 06 2023
n-th row polynomial R(n, x) = (2^n - x*(1 + x)^n)/(1 - x). These polynomials can be used to find series acceleration formulas for the constants log(2) and Pi. - Peter Bala, Mar 03 2025

A013580 Triangle formed in same way as Pascal's triangle (A007318) except 1 is added to central element in even-numbered rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 5, 9, 5, 1, 1, 6, 14, 14, 6, 1, 1, 7, 20, 29, 20, 7, 1, 1, 8, 27, 49, 49, 27, 8, 1, 1, 9, 35, 76, 99, 76, 35, 9, 1, 1, 10, 44, 111, 175, 175, 111, 44, 10, 1, 1, 11, 54, 155, 286, 351, 286, 155, 54, 11, 1, 1, 12, 65, 209, 441, 637, 637, 441, 209, 65
Offset: 0

Author

Martin Hecko (bigusm(AT)interramp.com)

Keywords

Comments

From Gus Wiseman, Apr 19 2023: (Start)
Appears to be the number of nonempty subsets of {1,...,n} with median k, where the median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). For example, row n = 5 counts the following subsets:
{1} {2} {3} {4} {5}
{1,3} {1,5} {3,5}
{1,2,3} {2,4} {1,4,5}
{1,2,4} {1,3,4} {2,4,5}
{1,2,5} {1,3,5} {3,4,5}
{2,3,4}
{2,3,5}
{1,2,4,5}
{1,2,3,4,5}
Including half-steps gives A231147.
For mean instead of median we have A327481.
(End)

Examples

			Triangle begins:
   1
   1   1
   1   3   1
   1   4   4   1
   1   5   9   5   1
   1   6  14  14   6   1
   1   7  20  29  20   7   1
   1   8  27  49  49  27   8   1
   1   9  35  76  99  76  35   9   1
   1  10  44 111 175 175 111  44  10   1
   1  11  54 155 286 351 286 155  54  11   1
   1  12  65 209 441 637 637 441 209  65  12   1
		

Crossrefs

Row sums give A000975, A054106.
Central diagonal T(2n+1,n+1) appears to be A006134.
Central diagonal T(2n,n) appears to be A079309.
For partitions instead of subsets we have A359901, row sums A325347.
A000975 counts subsets with integer median.
A007318 counts subsets by length, A359893 by twice median.

Programs

  • Mathematica
    CoefficientList[CoefficientList[Series[1/(1 - (1 + y)*x)/(1 - y*x^2), {x, 0, 10}, {y, 0, 10}], x], y] // Flatten (* G. C. Greubel, Oct 10 2017 *)

Formula

G.f.: 1/(1-(1+y)*x)/(1-y*x^2). - Vladeta Jovovic, Oct 12 2003

Extensions

More terms from James Sellers
Showing 1-10 of 2116 results. Next