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 51-59 of 59 results.

A131085 Triangle T(n,k) (n>=0, 0<=k<=n-1) read by rows, A007318 * A129686.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, -2, 2, 3, 1, -5, 0, 5, 4, 1, -9, -5, 5, 9, 5, 1, -14, -14, 0, 14, 14, 6, 1, -20, -28, -14, 14, 28, 20, 7, 1, -27, -48, -42, 0, 42, 48, 27, 8, 1, -35, -75, -90, -42, 42, 90, 75, 35, 9, 1, -44, -110, -165, -132, 0, 132, 165, 110, 44, 10, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 14 2007

Keywords

Comments

Row sums = n.
A131085 * A000012 = A074909 starting (1, 2, 1, 3, 3, ...) instead of (1, 1, 2, 1, 3, 3, ...).

Examples

			First few rows of the triangle are:
   1;
   1,  1;
   0,  2, 1;
  -2,  2, 3, 1;
  -5,  0, 5, 4, 1;
  -9, -5, 5, 9, 5, 1;
-14, -14, 0, 14, 14, 6, 1;
-20, -28, -14, 14, 28, 20, 7, 1;
-27, -48, -42, 0, 42, 48, 27, 8, 1;
-35, -75, -90, -42, 42, 90, 75, 35, 9, 1;
   ...
		

Crossrefs

Programs

  • PARI
    tabl(nn) = {t007318 = matrix(nn, nn, n, k, binomial(n-1, k-1)); t129686 = matrix(nn, nn, n, k, (k<=n)*((-1)^((n-k)\2)*((k==n) || (-1)*(k==(n-2))))); t131085 = t007318*t129686; for (n = 1, nn, for (k = 1, n, print1(t131085[n, k], ", ");););} \\ Michel Marcus, Feb 12 2014

Formula

Binomial transform of A129686 signed with (1, 1, 1, ...) in the main diagonal and (-1, -1, -1, ...) in the subsubdiagonal.
T(n,m) = T(n-1,m-1) + T(n-1,m). - Yuchun Ji, Dec 17 2018
T(2*k,k-1) = 0 for k > 0. - Yuchun Ji, Dec 20 2018
Comparing this triangle with the Catalan triangle A009766 one can see many similarities. For example, T(k+j,k) = A009766(k+1,j) for j < k+2. - Yuchun Ji, Dec 23 2018 [Edited by N. J. A. Sloane, Feb 11 2019]

Extensions

Missing comma corrected by Naruto Canada, Aug 26 2007
More terms from Michel Marcus, Feb 12 2014
Offset changed by N. J. A. Sloane, Feb 11 2019

A193465 Row sums of triangle A061312.

Original entry on oeis.org

0, 2, 9, 52, 335, 2466, 20447, 189064, 1930959, 21603430, 262869959, 3457226268, 48880169351, 739429561066, 11918051268255, 203914545928336, 3691384616598047, 70491995143458894, 1416242276574905879, 29862732908481855460, 659413025994777460119
Offset: 0

Views

Author

Johannes W. Meijer, Jul 27 2011

Keywords

Comments

a(n) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = A001563(k) for k = 0, 1, ..., n. - Michael Somos, Jun 06 2012

Examples

			2*x + 9*x^2 + 52*x^3 + 335*x^4 + 2466*x^5 + 20447*x^6 + 189064*x^7 + ...
		

Crossrefs

Programs

  • Maple
    A193465 := proc(n): add(A061312(n,k), k=0..n) end: A061312:=proc(n,k): add(((-1)^j)*binomial(k+1,j)*(n+1-j)!, j=0..k+1) end: seq(A193465(n), n=0..20);
  • Mathematica
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ (1 + x - (1 + x^2) / Exp[ x ]) / (1 - x)^3, {x, 0, n}]] (* Michael Somos, Jun 06 2012 *)
  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( (1 + x - (1 + x^2) / exp(x + x * O(x^n))) / (1 - x)^3, n))} /* Michael Somos, Jun 06 2012 */

Formula

a(n) = Sum_{k=0..n} A061312(n,k).
a(n) = (n+1)*A180191(n+1).
a(n) = A002467(n+2) - (n+1)! (the game of mousetrap with n cards).
a(n) = (n+1)*(n+1)! - A000166(n+2) (rencontres numbers).
a(n) = ((n-n^3)*a(n-3) + (2*n+n^2-n^3)*a(n-2) - (1-n-2*n^2)*a(n-1))/n with a(0) = 0, a(1) = 2 and a(2) = 9.
E.g.f: (1 + x - (1 + x^2) / exp(x)) / (1 - x)^3. - Michael Somos, Jun 06 2012
a(n) = Sum_{k=0..n} C(n+1,k)*A000166(k+1) = Sum_{k=0..n} A074909(n,k)*A000166(k+1). - Anton Zakharov, Sep 26 2016
a(n) = Sum_{k=1..n+1} A047920(n+1,k). - Alois P. Heinz, Sep 01 2021

A071761 Dealing cards in a game of solitaire.

Original entry on oeis.org

0, 1, 2, 21, 31, 32, 321, 421, 431, 432, 4321, 5321, 5421, 5431, 5432, 54321, 64321, 65321, 65421, 65431, 65432, 654321, 754321, 764321, 765321, 765421, 765431, 765432, 7654321, 8654321, 8754321, 8764321, 8765321, 8765421, 8765431, 8765432
Offset: 0

Views

Author

Allan C. Wechsler, Jun 07 2002

Keywords

Comments

An infinite square array,
a11 a12 a13 ...
a21 a22 a23 ...
a31 a32 a33 ...
a41 a42 a43 ...
...............
is built up by antidiagonals: a11 a21 a12 a31 a22 a13 ... The terms of the sequence record the number of entries in each column at each step, e.g. when dealing cards in a game of solitaire.

Crossrefs

The parity of this sequence gives A023532.

Extensions

Entry revised by Jeremy Gardiner, Dec 08 2004

A168557 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial (-1)^n*((x + 1)^n - x^n + 1), 0 <= k <= max(0, n - 1).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Nov 29 2009

Keywords

Comments

A variant of Pascal's triangle, the first column replaced by 2 (if n > 0), the last column dropped, and then odd rows multiplied by (-1)^n.
Absolute value row sums are A000079.

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[(-1)^n*(x + 1)^n - (-1)^n*(x^n - 1), x], {n, 0, 12}]
  • Maxima
    create_list((-1)^n*binomial(n, k) + (-1)^n*kron_delta(0, k) - kron_delta(0, n), n, 0, 12, k, 0, max(0, n - 1)); /* Franck Maminirina Ramaharo, Nov 21 2018 */

Formula

From Franck Maminirina Ramaharo, Nov 22 2018: (Start)
T(n,k) = (-1)^n*binomial(n, k) + (-1)^n*delta(0, k) - delta(0, n), where delta is Kronecker's delta-symbol.
G.f.: (1 + 2*x*y - (1 - x - x^2)*y^2)/((1 + y)*(1 + x*y)*(1 + y + x*y)).
E.g.f.: (1 - exp(y) + exp(x*y))*exp(-(1 + x)*y). (End)

A199011 Triangle T(n,k), read by rows, given by (1,1,-1,1,0,0,0,0,0,0,0,...) DELTA (0,1,0,0,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Nov 01 2011

Keywords

Comments

Mirror image of triangle in A198321.
Variant of A074909, A135278.

Examples

			Triangle begins :
1
1, 0
2, 1, 0
3, 3, 1, 0
4, 6, 4, 1, 0
5, 10, 10, 5, 1, 0
6, 15, 20, 15, 6, 1, 0
		

Crossrefs

Formula

T(n,k)=binomial(n,k+1).
Sum_{0<=k<=n} T(n,k)*x^k = ((x+1)^n-1)/x for n>0.
G.f.: (1-(1+y)*x+(1+y)*x^2)/(1-(2+y)*x+(1+y)*x^2).
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) = T(1,0) = T(2,1) = 1, T(1,1) = T(2,2) = 0, T(2,0) = 2, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Feb 12 2014

A209518 Triangle by rows, reversal of A104712.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Mar 09 2012

Keywords

Comments

The offset is chosen as "0" to match the generalized or compositional Bernoulli numbers.
Following [Blandin and Diaz], we can generalize a subset of Bernoulli numbers to comply with the origin of the triangle (the Pascal matrix A007318 beheaded once: (A074909), twice: (this triangle), and so on...); and a corresponding Bernoulli sequence that equals the inverse of the triangle, extracting the left border. This procedure done with A074909 results in The Bernoulli numbers (A027641/A026642) starting (1, -1/2, 1/6,...). Done with this triangle we obtain A006568/A006569: (1, -1/3, 1/18, 1/90,...).
A generalized algebraic property of the subset of such triangles and compositional Bernoulli numbers is that the triangle M * [corresponding Bernoulli sequence considered as a vector, V] = [1, 0, 0, 0,...].
The infinite set of generalized Bernoulli number sequences thus generated from variants of Pascal's triangle begins: [(1, -1/2, 1/6,...); (1, -1/3, 1/18,...); (1, -1/4, 1/40,...); (1, -1/5, 1/75,...); where the third term denominators = A002411 (1, 6, 18, 40, 75,...) after the "1".
Row sums of the triangle = A000295 starting (1, 4, 11, 26, 57,...).

Examples

			First few rows of the triangle =
1;
1, 3;
1, 4, 6;
1, 5, 10, 10;
1, 6, 15, 20, 15;
1, 7, 21, 35, 35, 21;
1, 8, 28, 56, 70, 56, 28;
1, 9, 36, 84, 126, 126, 84, 36;
1, 10, 45, 120, 210, 252, 210, 120, 45;
1, 11, 55, 165, 330, 462, 462, 30, 165, 55;
...
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[n+2, k+2], {n, 0, 9}, {k, n , 0, -1}] // Flatten (* Jean-François Alcover, Aug 08 2018 *)

Formula

Doubly beheaded variant of Pascal's triangle in which two rightmost diagonals are deleted.
T(n,k)=T(n-1,k)+3*T(n-1,k-1)-2*T(n-2,k-1)-3*T(n-2,k-2)+T(n-3,k-2)+T(n-3,k-3), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 11 2014

A383870 Number of compositions of n such that none of the smallest parts are adjacent.

Original entry on oeis.org

1, 1, 1, 3, 4, 9, 15, 29, 53, 98, 180, 336, 618, 1142, 2110, 3899, 7197, 13283, 24509, 45218, 83396, 153769, 283463, 522449, 962732, 1773742, 3267417, 6018030, 11082693, 20407174, 37572633, 69169726, 127326924, 234362474, 431343281, 793831500, 1460854117
Offset: 0

Views

Author

John Tyler Rascoe, May 13 2025

Keywords

Examples

			a(5) = 9 counts: (1,2,2), (1,3,1), (1,4), (2,1,2), (2,2,1), (2,3), (3,2), (4,1), (5).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i<1, 0,
         `if`(irem(n, i, 'r')=0, p!*binomial(p+1, r), 0)+
          add(b(n-i*j, min(n-i*j, i-1), p+j)/j!, j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(n$2, 0)):
    seq(a(n), n=0..36);  # Alois P. Heinz, May 13 2025
  • PARI
    A_x(N) ={Vec(1+sum(j=0,N, sum(i=j+1,N-j, (binomial(i,i-j-1) * x^(j+1) * (x^2/(1-x))^(i-1) )/(1-x^(i+j))))+O('x^N))}
    A_x(50)

Formula

G.f.: 1 + Sum_{j>=0} Sum_{i>j} (binomial(i,i-j-1) * x^(j+1) * (x^2/(1 - x))^(i-1))/(1 - x^(i+j)).

A227985 Numerators of the fractional triangle T(n,k) = binomial(n-1,k)*B_k for 0 <= k < n.

Original entry on oeis.org

1, 0, -1, 0, -1, 1, 0, -1, 1, -1, 0, -1, 1, -1, 0, 0, -1, 1, -5, 0, 1, 0, -1, 1, -1, 0, 1, 0, 0, -1, 1, -7, 0, 7, 0, -1, 0, -1, 1, -2, 0, 7, 0, -2, 0, 0, -1, 1, -3, 0, 7, 0, -1, 0, 3, 0, -1, 1, -5, 0, 1, 0, -1, 0, 1, 0, 0, -1, 1, -11, 0, 11, 0, -11, 0, 11, 0, -5, 0, -1, 1, -1, 0, 11, 0, -22, 0, 33, 0, -5, 0
Offset: 0

Views

Author

Paul Curtz, Aug 02 2013

Keywords

Comments

The n-th row's sum equals the n-th Bernoulli number (with B_1 = -1/2).
Starting from B_0 = 1, the successive B n comes from the equations written with the triangle A074909
1*B_0 +2*B_1 = 0 --> B_1 = 0 -1/2
1*B_0 +3*B_1 +3*B_2 = 0 --> B_2 = 0 -1/3 +1/2
1*B_0 +4*B_1 +6*B_2 +4*B_3 = 0 --> B_3 = 0 -1/4 +1/2 -1/4,
from the terms at the left-hand side. See A159688.
Main diagonal: 1, -1/2, 1/2, -1/4, 0, 1/12, 0, -1/12, 0, 3/20, 0, -5/12, 0, 691/420,... . After the initial 1, the numerators are given by -A050925.

Examples

			Triangle begins:
1,
0, -1,
0, -1, 1,
0, -1, 1, -1,
0, -1, 1, -1, 0,
0, -1, 1, -5, 0, 1,
0  -1, 1, -1, 0, 1,  0,
0, -1, 1, -7, 0, 7,  0, -1,
0, -1, 1, -2, 0, 7,  0, -2, 0, etc.
		

Crossrefs

Programs

  • Magma
    [1] cat [Numerator(-Binomial(n,k)*Bernoulli(k)/n): k in [-1..n-2], n in [2..15]]; // Bruno Berselli, Sep 09 2013
  • Mathematica
    b[0] = 1; b[1] = -1/2; row[0] = {1}; row[1] = {0, -1/2}; row[n_] := Join[{0}, List @@ (-Sum[Binomial[n+1, k]*B[k], {k, 0, n-1}]/(n+1) // Expand) /. B -> b]; b[n_] := Total[row[n]]; Table[row[n] // Numerator, {n, 0, 12}] // Flatten (* Jean-François Alcover, Aug 12 2013 *)
  • PARI
    t(n, k) = if (n==1, 1, if (k== -1, 0, -bernfrac(k)*binomial(n, k)/n));
    tabl(nn) = {for (n = 1, nn, for (k = -1, n-2, print1(t(n, k), ", ");); print(););} \\ Michel Marcus, Sep 07 2013
    

Extensions

More terms from Jean-François Alcover, Aug 12 2013

A254630 Ascending antidiagonal numerators of the table of repeated differences of A164558(n)/A027642(n).

Original entry on oeis.org

1, 1, 3, 1, 2, 13, 0, 1, 5, 3, -1, -1, 2, 29, 119, 0, -1, -1, 1, 31, 5, 1, 1, -1, -8, -1, 43, 253, 0, 1, 1, 4, -4, -1, 41, 7, -1, -1, -1, 4, 8, 4, -1, 29, 239, 0, -1, -1, -8, -4, 4, 8, 1, 31, 9, 5, 5, 7, -4, -116, -32, -116, -4, 7, 71, 665, 0
Offset: 0

Views

Author

Paul Curtz, Feb 03 2015

Keywords

Comments

The difference table of Bernoulli(n,2) or B(n,2) = A164558(n)/A027642(n) is defined by placing the fractions in the upper row and calculating further rows as the differences of their preceding row:
1, 3/2, 13/6, 3, 119/30, ...
1/2, 2/3, 5/6, 29/30, ...
1/6, 1/6, 2/15, ...
0, -1/30, ...
-1/30, ...
etc.
The first column is A164555(n)/A027642(n).
In particular, the sums of the antidiagonals
1 = 1
1/2 + 3/2 = 2
1/6 + 2/3 + 13/6 = 3
0 + 1/6 + 5/6 + 3 = 4
etc. are the positive natural numbers. (This is rewritten for Bernoulli(n,3) in A157809).
We also have for Bernoulli(.,2)
B(0,2) = 1
B(0,2) + 2*B(1,2) = 4
B(0,2) + 3*B(1,2) + 3*B(2,2) = 12
B(0,2) + 4*B(1,2) + 6*B(2,2) + 4*B(3,2) = 32
etc. with right hand sides provided by A001787.
More generally sum_{s=0..t-1} binomial(t,s)*Bernoulli(s,q) gives A027471(t) for q=3, A002697 for q=4 etc, by reading A104002 downwards the q-th column.

Crossrefs

Cf. A027641, A027642, A074909, A085737, A085738, A104002, A157809, A157920, A157930, A157945, A157946, A157965, A164555, A164558, A190339, A158302, A181131 (numerators and denominators of the main diagonal).

Programs

  • Mathematica
    nmax = 11; A164558 = Table[BernoulliB[n,2], {n, 0, nmax}]; D164558 = Table[ Differences[A164558, n], {n, 0, nmax}]; Table[ D164558[[n-k+1, k+1]] // Numerator, {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 04 2015 *)
Previous Showing 51-59 of 59 results.