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-3 of 3 results.

A095660 Pascal (1,3) triangle.

Original entry on oeis.org

3, 1, 3, 1, 4, 3, 1, 5, 7, 3, 1, 6, 12, 10, 3, 1, 7, 18, 22, 13, 3, 1, 8, 25, 40, 35, 16, 3, 1, 9, 33, 65, 75, 51, 19, 3, 1, 10, 42, 98, 140, 126, 70, 22, 3, 1, 11, 52, 140, 238, 266, 196, 92, 25, 3, 1, 12, 63, 192, 378, 504, 462, 288, 117, 28, 3, 1, 13, 75, 255, 570, 882, 966, 750, 405, 145, 31, 3
Offset: 0

Views

Author

Wolfdieter Lang, May 21 2004

Keywords

Comments

This is the third member, q=3, in the family of (1,q) Pascal triangles: A007318 (Pascal (q=1)), A029635 (q=2) (but with T(0,0)=2, not 1).
This is an example of a Riordan triangle (see A053121 for a comment and the 1991 Shapiro et al. reference on the Riordan group) with o.g.f. of column no. m of the type g(x)*(x*f(x))^m with f(0)=1. Therefore the o.g.f. for the row polynomials p(n,x) = Sum_{m=0..n} T(n,m)*x^m is G(z,x) = g(z)/(1-x*z*f(z)). Here: g(x) = (3-2*x)/(1-x), f(x) = 1/(1-x), hence G(z,x) = (3-2*z)/(1-(1+x)*z).
The SW-NE diagonals give Sum_{k=0..ceiling((n-1)/2)} T(n-1-k,k) = A000285(n-2), n>=2, with n=1 value 3. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs.
Central terms: T(2*n,n) = A028329(n) = A100320(n) for n > 0, A028329 are the central terms of triangle A028326. - Reinhard Zumkeller, Apr 08 2012
Let P be Pascal's triangle, A007318 and R the Riordan array, A097805. Then Pascal triangle (1,q) = ((q-1) * R) + P. Example: Pascal triangle (1,3) = (2 * R) + P. - Gary W. Adamson, Sep 12 2015

Examples

			Triangle starts:
  3;
  1,  3;
  1,  4,  3;
  1,  5,  7,   3;
  1,  6, 12,  10,   3;
  1,  7, 18,  22,  13,   3;
  1,  8, 25,  40,  35,  16,   3;
  1,  9, 33,  65,  75,  51,  19,   3;
  1, 10, 42,  98, 140, 126,  70,  22,   3;
  1, 11, 52, 140, 238, 266, 196,  92,  25,   3;
  1, 12, 63, 192, 378, 504, 462, 288, 117,  28,  3;
  1, 13, 75, 255, 570, 882, 966, 750, 405, 145, 31, 3;
		

Crossrefs

Row sums: A000079(n+1), n>=1, 3 if n=0. Alternating row sums are [3, -2, followed by 0's].
Column sequences (without leading zeros) give for m=1..9 with n>=0: A000027(n+3), A055998(n+1), A006503(n+1), A095661, A000574, A095662, A095663, A095664, A095665.
Cf. A097805.

Programs

  • Haskell
    a095660 n k = a095660_tabl !! n !! k
    a095660_row n = a095660_tabl !! n
    a095660_tabl = [3] : iterate
       (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1,3]
    -- Reinhard Zumkeller, Apr 08 2012
    
  • Magma
    A095660:= func< n,k | n eq 0 select 3 else (1+2*k/n)*Binomial(n,k) >;
    [A095660(n,k): k in [0..n], n in [1..12]]; // G. C. Greubel, May 02 2021
    
  • Maple
    T(n,k):=piecewise(n=0,3,0Mircea Merca, Apr 08 2012
  • Mathematica
    {3}~Join~Table[(1 + 2 k/n) Binomial[n, k], {n, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 14 2015 *)
  • Sage
    def A095660(n,k): return 3 if n==0 else (1+2*k/n)*binomial(n,k)
    flatten([[A095660(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 02 2021

Formula

Recursion: T(n, m)=0 if m>n, T(0, 0)= 3; T(n, 0)=1 if n>=1; T(n, m) = T(n-1, m) + T(n-1, m-1).
G.f. column m (without leading zeros): (3-2*x)/(1-x)^(m+1), m>=0.
T(n,k) = (1+2*k/n) * binomial(n,k), for n>0. - Mircea Merca, Apr 08 2012
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013

A095663 Eighth column (m=7) of (1,3)-Pascal triangle A095660.

Original entry on oeis.org

3, 22, 92, 288, 750, 1716, 3564, 6864, 12441, 21450, 35464, 56576, 87516, 131784, 193800, 279072, 394383, 547998, 749892, 1012000, 1348490, 1776060, 2314260, 2985840, 3817125, 4838418, 6084432, 7594752, 9414328, 11594000, 14191056
Offset: 0

Views

Author

Wolfdieter Lang, Jun 11 2004

Keywords

Comments

If Y is a 3-subset of an n-set X then, for n>=9, a(n-9) is the number of 7-subsets of X having at most one element in common with Y. - Milan Janjic, Nov 23 2007

Crossrefs

Seventh column: A095662. Ninth column: A095664.

Formula

G.f.: (3-2*x)/(1-x)^8.
a(n)= binomial(n+6, 6)*(n+21)/7 = 3*b(n)-2*b(n-1), with b(n):=binomial(n+7, 7); cf. A000580.

A225624 Triangle read by rows: T(n,k) is the number of descent sequences of length n with exactly k-1 descents, n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 5, 0, 0, 5, 15, 3, 0, 0, 6, 35, 25, 1, 0, 0, 7, 70, 117, 28, 0, 0, 0, 8, 126, 405, 271, 22, 0, 0, 0, 9, 210, 1155, 1631, 483, 13, 0, 0, 0, 10, 330, 2871, 7359, 5126, 711, 5, 0, 0, 0, 11, 495, 6435, 27223, 36526, 13482, 889, 1, 0, 0, 0, 12, 715, 13299, 86919, 199924, 151276, 30906, 962, 0, 0, 0, 0
Offset: 1

Views

Author

Joerg Arndt, May 11 2013

Keywords

Comments

A descent sequence is a sequence [d(1), d(2), ..., d(n)] where d(1)=0, d(k)>=0, and d(k) <= 1 + desc([d(1), d(2), ..., d(k-1)]) where desc(.) gives the number of descents of its argument, see example.
Row sums are A225588 (number of descent sequences).
First column is C(n,1)=n, second column is C(n+1,4) = A000332(n+1), third column appears to be A095664(n-5) for n>=5.

Examples

			Triangle begins:
01:  1,
02:  2, 0,
03:  3, 1, 0,
04:  4, 5, 0, 0,
05:  5, 15, 3, 0, 0,
06:  6, 35, 25, 1, 0, 0,
07:  7, 70, 117, 28, 0, 0, 0,
08:  8, 126, 405, 271, 22, 0, 0, 0,
09:  9, 210, 1155, 1631, 483, 13, 0, 0, 0,
10:  10, 330, 2871, 7359, 5126, 711, 5, 0, 0, 0,
11:  11, 495, 6435, 27223, 36526, 13482, 889, 1, 0, 0, 0,
12:  12, 715, 13299, 86919, 199924, 151276, 30906, 962, 0, 0, 0, 0,
13:  13, 1001, 25740, 247508, 903511, 1216203, 546001, 63462, 903, 0, 0, 0, 0,
...
The number of descents for the A225588(5)=23 descent sequences of length 5 are (dots for zeros):
.#:  descent seq.   no. of descents
01:  [ . . . . . ]    0
02:  [ . . . . 1 ]    0
03:  [ . . . 1 . ]    1
04:  [ . . . 1 1 ]    0
05:  [ . . 1 . . ]    1
06:  [ . . 1 . 1 ]    1
07:  [ . . 1 . 2 ]    1
08:  [ . . 1 1 . ]    1
09:  [ . . 1 1 1 ]    0
10:  [ . 1 . . . ]    1
11:  [ . 1 . . 1 ]    1
12:  [ . 1 . . 2 ]    1
13:  [ . 1 . 1 . ]    2
14:  [ . 1 . 1 1 ]    1
15:  [ . 1 . 1 2 ]    1
16:  [ . 1 . 2 . ]    2
17:  [ . 1 . 2 1 ]    2
18:  [ . 1 . 2 2 ]    1
19:  [ . 1 1 . . ]    1
20:  [ . 1 1 . 1 ]    1
21:  [ . 1 1 . 2 ]    1
22:  [ . 1 1 1 . ]    1
23:  [ . 1 1 1 1 ]    0
There are 5 sequences with 0 descents, 15 with 1 descents, 3 with 2 descents, and 0 for 3 or 5 descents. Therefore row 5 is [5, 15, 3, 0, 0].
		

Programs

  • Maple
    b:= proc(n, i, t) option remember; local j; if n<1 then [0$t, 1]
          else []; for j from 0 to t+1 do zip((x, y)->x+y, %,
          b(n-1, j, t+`if`(jAlois P. Heinz, May 18 2013
  • Mathematica
    b[n_, i_, t_] :=  b[n, i, t] =  Module[{j, pc}, If[n<1, Append[Array[0 &, t], 1], pc = {}; For[j = 0, j <= t+1, j++, pc = Plus @@ PadRight[ {pc, b[n-1, j, t+If[jJean-François Alcover, Feb 27 2014, after Alois P. Heinz *)
  • Sage
    # After Alois P. Heinz.
    @CachedFunction
    def b(n, i, t, N):
        B = [0 for x in range(N)]
        if n < 1: B[t] = 1; return B
        for j in (0..t+1):
            B = map(operator.add, B, b(n-1, j, t+int(jPeter Luschny, May 20 2013; updated May 21 2013
Showing 1-3 of 3 results.