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.

Previous Showing 11-15 of 15 results.

A086754 Pascal's square pyramid read by slices, each slice being read by rows. Each entry in slice n is the sum of the 4 entries above it in slice n-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 3, 3, 1, 3, 9, 9, 3, 3, 9, 9, 3, 1, 3, 3, 1, 1, 4, 6, 4, 1, 4, 16, 24, 16, 4, 6, 24, 36, 24, 6, 4, 16, 24, 16, 4, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 5, 25, 50, 50, 25, 5, 10, 50, 100, 100, 50, 10, 10, 50, 100, 100, 50, 10, 5, 25, 50, 50, 25, 5, 1, 5, 10
Offset: 1

Views

Author

Jon Perry, Jul 31 2003

Keywords

Comments

Element (i,j) of slice n is the coefficient of x^i * y^j in the expansion of ((1+x)*(1+y))^n. - Eitan Y. Levine, Sep 03 2023

Examples

			The first 4 slices are
  1..1 1..1 2 1..1 3 3 1
  ...1 1..2 4 2..3 9 9 3
  ........1 2 1..3 9 9 3
  ...............1 3 3 1
		

Crossrefs

Consider the sequence s[i, j](n) obtained by considering the (i, j)-th entry of the n-th slice. Then if [i, j]= [3, 2] we get A006002, if [3, 3] we get A000537, if [4, 2] we get A004320, if [4, 3] we get A004282.
Cf. A046816.

Programs

  • Haskell
    a086754 n = a086754_list !! (n-1)
    a086754_list = concat $ concat $ iterate ([[1,1],[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
  • Maple
    p:=n->seq(seq(binomial(n,i)*binomial(n,j),j=0..n),i=0..n): seq(p(n),n=0..5); # Emeric Deutsch, Nov 18 2004
  • Mathematica
    A[m_]:=Module[{pt=Table[ConstantArray[1,{i,i}],{i,m}]},For[i=3,i<=m,i++,For[j=2,j<=i-1,j++,pt[[i,j,1]]=pt[[i-1,j-1,1]]+pt[[i-1,j,1]];pt[[i,1,j]]=pt[[i,j,1]];pt[[i,i,j]]=pt[[i,j,1]];pt[[i,j,i]]=pt[[i,j,1]];];For[j=2,j<=i-1,j++,For[k=2,k<=i-1,k++,pt[[i,j,k]]=pt[[i-1,j,k]]+pt[[i-1,j,k-1]]+pt[[i-1,j-1,k]]+pt[[i-1,j-1,k-1]];];];];pt//Flatten]; A[6] (* Robert P. P. McKone, Sep 14 2023, made from the PARI code *)
  • PARI
    { pt=vector(10,i,matrix(i,i,j,k,1)); for (i=3,10, for (j=2,i-1, pt[i][j,1]=pt[i-1][j-1,1]+pt[i-1][j,1]; pt[i][1,j]=pt[i][j,1]; pt[i][i,j]=pt[i][j,1]; pt[i][j,i]=pt[i][j,1]; ); for(j=2,i-1, for (k=2,i-1, pt[i][j,k]=pt[i-1][j,k]+pt[i-1][j,k-1]+pt[i-1][j-1,k]+pt[i-1][j-1,k-1]))); pt }
    

Formula

From Eitan Y. Levine, Sep 03 2023: (Start)
C(n,i)*C(n,j) gives the (i,j) element in slice n, where C(n,k) are the binomial coefficients A007318.
G.f.: 1/(1-z(1+x)(1+y)) = Sum_{n>=0,i=0..n,j=0..n} T(n,i,j) * z^n * x^i * y^j
G.f. for slice n: ((1+x)*(1+y))^n = Sum_{i=0..n,j=0..n} T(n,i,j) * x^i * y^j (End)

Extensions

More terms from Emeric Deutsch, Nov 18 2004

A361099 a(n) = n + 2*binomial(n,2) + 3*binomial(n,3) + 4*binomial(n,4).

Original entry on oeis.org

0, 1, 4, 12, 32, 75, 156, 294, 512, 837, 1300, 1936, 2784, 3887, 5292, 7050, 9216, 11849, 15012, 18772, 23200, 28371, 34364, 41262, 49152, 58125, 68276, 79704, 92512, 106807, 122700, 140306, 159744, 181137, 204612, 230300, 258336, 288859, 322012, 357942, 396800, 438741
Offset: 0

Views

Author

Enrique Navarrete, Mar 01 2023

Keywords

Comments

a(n) is the number of ordered set partitions of an n-set into 2 sets such that the first set has either 3, 2, 1 or no elements, the second set has no restrictions, and an element is selected from the second set.

Examples

			The 294 set partitions for n=7 are the following (where the element selected from the second set is in parentheses):
{ }, {(1),2,3,4,5,6,7}  (7 of these);
{1}, {(2),3,4,5,6,7}   (42 of these);
{1,2}, {(3),4,5,6,7}   (105 of these);
{1,2,3}, {(4),5,6,7}   (140 of these).
		

Crossrefs

Programs

  • Mathematica
    Table[n^2*(n*(n - 3) + 8)/6, {n, 0, 50}] (* Paolo Xausa, Jun 10 2024 *)
  • Python
    def A361099(n): return n**2*(n*(n - 3) + 8)//6 # Chai Wah Wu, Mar 24 2023

Formula

E.g.f.: (1 + x + x^2/2 + x^3/6)*x*exp(x).
From Stefano Spezia, Mar 04 2023: (Start)
O.g.f.: x*(1 - x + 2*x^2 + 2*x^3)/(1 - x)^5.
a(n) = A000290(n) + A004320(n-2). (End)

A338996 Numbers of squares and rectangles of all sizes in 3*n*(n+1)/2-ominoes in form of three-quarters of Aztec diamonds.

Original entry on oeis.org

0, 5, 27, 85, 205, 420, 770, 1302, 2070, 3135, 4565, 6435, 8827, 11830, 15540, 20060, 25500, 31977, 39615, 48545, 58905, 70840, 84502, 100050, 117650, 137475, 159705, 184527, 212135, 242730, 276520
Offset: 0

Views

Author

Luce ETIENNE, Nov 18 2020

Keywords

Examples

			a(1) = 2*3-1 = 5, a(2) = 2*16-5 = 27, a(3) = 2*50-15 = 85, a(4) = 2*120-35 = 205, a(5) = 2*245-70 = 420, a(6) = 2*448-126 = 770.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x (2 x + 5)/(1 - x)^5, {x, 0, 30}], x] (* Michael De Vlieger, Dec 12 2020 *)

Formula

G.f.: x*(2*x + 5)/(1 - x)^5.
E.g.f.: exp(x)*x*(120 + 204*x + 76*x^2 + 7*x^3)/24. - Stefano Spezia, Nov 18 2020
a(n) = 5*(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = n*(n + 1)*(n + 2)*(7*n + 13)/24.
a(n) = 2*A004320(n) - A000332(n+3).
a(n) = 2*A000332(n+2) + 5*A000332(n+3).

A347056 Triangle read by rows: T(n,k) = (n+1)*(n+2)*(k+3)*binomial(n,k)/6, 0 <= k <= n.

Original entry on oeis.org

1, 3, 4, 6, 16, 10, 10, 40, 50, 20, 15, 80, 150, 120, 35, 21, 140, 350, 420, 245, 56, 28, 224, 700, 1120, 980, 448, 84, 36, 336, 1260, 2520, 2940, 2016, 756, 120, 45, 480, 2100, 5040, 7350, 6720, 3780, 1200, 165, 55, 660, 3300, 9240, 16170, 18480, 13860, 6600, 1815, 220
Offset: 0

Views

Author

Luc Rousseau, Aug 14 2021

Keywords

Comments

This triangle is T[3] in the sequence (T[p]) of triangles defined by: T[p](n,k) = (k+p)*(n+p-1)!/(k!*(n-k)!*p!) and T[0](0,0)=1.
Riordan triangle (1/(1-x)^3, x/(1-x)) with column k scaled with A000292(k+1) = binomial(k+3, 3), for k >= 0. - Wolfdieter Lang, Sep 30 2021

Examples

			T(6,2) = (6+1)*(6+2)*(2+3)*binomial(6,2)/6 = 7*8*5*15/6 = 700.
The triangle T begins:
n \ k  0   1    2     3     4     5     6     7     8    9  10 ...
0:     1
1:     3   4
2:     6  16   10
3:    10  40   50    20
4:    15  80  150   120    35
5:    21 140  350   420   245    56
6:    28 224  700  1120   980   448    84
7:    36 336 1260  2520  2940  2016   756   120
8:    45 480 2100  5040  7350  6720  3780  1200   165
9:    55 660 3300  9240 16170 18480 13860  6600  1815  220
10:   66 880 4950 15840 32340 44352 41580 26400 10890 2640 286
... - _Wolfdieter Lang_, Sep 30 2021
		

Crossrefs

Cf. A097805 (p=0), A103406 (p=1), A124932 (essentially p=2).
From Wolfdieter Lang, Sep 30 2021: (Start)
Columns (with leading zeros): A000217(n+1), 4*A000294, 10*A000332(n+2), 20*A000389(n+2), 35*A000579(n+2), 56*A000580(n+2), 84*A000581(n+2), 120*A000582(n+2), ...
Diagonals: A000292(k+1), A004320(k+1), 2*A006411(k+1), 10*A040977, ... (End)

Programs

  • PARI
    T(p,n,k)=if(n==0&&p==0,1,((k+p)*(n+p-1)!)/(k!*(n-k)!*p!))
    for(n=0,9,for(k=0,n,print1(T(3,n,k),", ")))

Formula

T(n,k) = (n+1)*(n+2)*(k+3)*binomial(n,k)/6.
G.f. column k: x^k*binomial(k+3, 3)/(1 - x)^(k+3), for k >= 0. - Wolfdieter Lang, Sep 30 2021

A182309 Triangle T(n,k) with 2 <= k <= floor(2(n+1)/3) gives the number of length-n binary sequences with exactly k zeros and with length two for the longest run of zeros.

Original entry on oeis.org

1, 2, 3, 2, 4, 6, 1, 5, 12, 6, 6, 20, 18, 3, 7, 30, 40, 16, 1, 8, 42, 75, 50, 10, 9, 56, 126, 120, 45, 4, 10, 72, 196, 245, 140, 30, 1, 11, 90, 288, 448, 350, 126, 15, 12, 110, 405, 756, 756, 392, 90, 5, 13, 132, 550, 1200, 1470, 1008, 357, 50, 1, 14, 156, 726
Offset: 2

Views

Author

Dennis P. Walsh, Apr 23 2012

Keywords

Comments

Triangle T(n,k) captures several well known sequences. In particular, T(n,2)=(n-1), the natural numbers; T(n,3)=(n-2)(n-3)=A002378(n-3), the "oblong" numbers; T(n,4)=(n-3)(n-4)^2/2=A002411(n-4), "pentagonal pyramidal" numbers; and also T(n,5)=(n-4)C(n-4,3)=A004320(n-6). Furthermore, row sums=A000100(n+1).

Examples

			For n=6 and k=3, T(6,3)=12 since there are 12 binary sequences of length 6 that contain 3 zeros and that have a maximum run of zeros of length 2, namely, 011100, 101100, 110100, 011001, 101001, 110010, 010011, 100110, 100101, 001110, 001101, and 001011.
Triangle T(n,k) begins
   1,
   2,
   3,   2,
   4,   6,   1,
   5,  12,   6,
   6,  20,  18,    3,
   7,  30,  40,   16,    1,
   8,  42,  75,   50,   10,
   9,  56, 126,  120,   45,    4,
  10,  72, 196,  245,  140,   30,    1,
  11,  90, 288,  448,  350,  126,   15,
  12, 110, 405,  756,  756,  392,   90,    5,
  13, 132, 550, 1200, 1470, 1008,  357,   50,   1,
  14, 156, 726, 1815, 2640, 2268, 1106,  266,  21,
  15, 182, 936, 2640, 4455, 4620, 2898, 1016, 161, 6,
		

Crossrefs

Row sums of triangle T(n,k)=A000100(n+1);
T(n,3)=A002378(n-3); T(n,4)=A002411(n-4);
T(n,5)=A004320(n-6).

Programs

  • Maple
    seq(seq(sum(binomial(n-k+1,j)*binomial(n-k+1-j,k-2*j),j=1..floor(k/2)),k=2..floor(2*(n+1)/3)),n=2..20);
  • Mathematica
    t[n_, k_] := Sum[ Binomial[n-k+1, j]*Binomial[n-k-j+1, k-2*j], {j, 1, k/2}]; Table[t[n, k], {n, 2, 15}, {k, 2, 2*(n+1)/3}] // Flatten (* Jean-François Alcover, Jun 06 2013 *)

Formula

T(n,k) = Sum_{j=1..k/2} binomial(n-k+1,j)*binomial(n-k-j+1,k-2j) for 2 <= k <= 2(n+1)/3.
Previous Showing 11-15 of 15 results.