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.

A114929 Array read by antidiagonals: consider a semi-infinite chessboard with squares labeled (i,j), i >= 0, j >= 0; T(i,j) = number of king-paths of length max{i,j} from (0,0) to (i,j).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 4, 2, 2, 4, 9, 5, 1, 5, 9, 21, 12, 3, 3, 12, 21, 51, 30, 9, 1, 9, 30, 51, 127, 76, 25, 4, 4, 25, 76, 127, 323, 196, 69, 14, 1, 14, 69, 196, 323, 835, 512, 189, 44, 5, 5, 44, 189, 512, 835, 2188, 1353, 518, 133, 20, 1, 20, 133, 518, 1353, 2188, 5798, 3610, 1422
Offset: 0

Views

Author

N. J. A. Sloane, based on May 27 2005 email from Harrie Grondijs, Feb 27 2006

Keywords

Examples

			Array begins:
1 1 2 4 9 21 51 ...
1 1 2 5 12 30 ...
2 2 1 3 9 25 ...
4 5 3 1 4 14 ...
...
		

References

  • Harrie Grondijs, Neverending Quest of Type C, Volume B - the endgame study-as-struggle.

Crossrefs

Formula

Equals Motzkin triangle (A026300) next to same triangle reflected in mirror. See A026300 for the obvious recurrence.

Extensions

More terms from Joshua Zucker, May 20 2006
T(0,0) corrected by Johannes W. Meijer, Oct 07 2010

A217536 Square array read by antidiagonals, where the top row is the nonnegative integers and the other numbers are the sum of the neighbors in the preceding row.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 6, 10, 14, 4, 9, 18, 32, 46, 5, 12, 27, 55, 101, 147, 6, 15, 36, 81, 168, 315, 462, 7, 18, 45, 108, 244, 513, 975, 1437, 8, 21, 54, 135, 324, 736, 1564, 3001, 4438, 9, 24, 63, 162, 405, 973, 2222, 4761, 9199, 13637, 10, 27, 72, 189, 486, 1215, 2924, 6710, 14472, 28109, 41746
Offset: 0

Views

Author

WG Zeist, Oct 06 2012

Keywords

Comments

Each number in the top row of the array is determined by the pre-defined sequence (in this case, the nonnegative integers). Each number in lower rows is the sum of the numbers vertically or diagonally above it (so, the number at the left end of each row is the sum of two numbers, and all other numbers the sum of three).
Replacing the top row with A000012 (the all 1's sequence) and constructing the rest of the array the same way produces A062105. Similarly, replacing the top row with A000007 (a(n) = 0^n) produces A020474. - WG Zeist, Aug 24 2024
For any array constructed with this method, regardless of the sequence chosen for the top row, the sequence in the first column of the array can be computed from the sequence in the top row as follows: let a(0), a(1), a(2), ... be the terms in the top row, and b(0), b(1), b(2), ... the terms in the first column. Then b(n) = Sum_{k=0..n} A064189(n,k) * a(k). The inverse operation, to compute the top row from the first column, is given by a(n) = Sum_{k=0..n} A104562(n,k) * b(k). - WG Zeist, Aug 26 2024

Examples

			The array starts:
  0  1  2  3
  1  3  6  9
  4  10 18 27
  14 32 55 81
		

Crossrefs

Main diagonal gives A036290. First column gives A330796.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(k<0, 0,
         `if`(n=0, k, add(A(n-1, k+i), i=-1..1)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 24 2024

Formula

T(m+1,n) = sum(T(m,k), |k-n| <= 1) (and T(0,n)=n), m, n >= 0. - M. F. Hasler, Oct 09 2012

Extensions

Offset 0 from Alois P. Heinz, Aug 24 2024

A238763 A Motzkin triangle read by rows, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 2, 0, 4, 1, 0, 5, 0, 9, 0, 3, 0, 12, 0, 21, 1, 0, 9, 0, 30, 0, 51, 0, 4, 0, 25, 0, 76, 0, 127, 1, 0, 14, 0, 69, 0, 196, 0, 323, 0, 5, 0, 44, 0, 189, 0, 512, 0, 835, 1, 0, 20, 0, 133, 0, 518, 0, 1353, 0, 2188, 0, 6, 0, 70, 0, 392, 0, 1422, 0
Offset: 0

Views

Author

Peter Luschny, Mar 05 2014

Keywords

Comments

Similar to A020474 but with a different enumeration.
Compare with the definition of the generalized ballot numbers A238762.

Examples

			[n\k 0  1  2   3  4   5   6   7]
[0]  1,
[1]  0, 1,
[2]  1, 0, 2,
[3]  0, 2, 0, 4,
[4]  1, 0, 5, 0, 9,
[5]  0, 3, 0, 12, 0, 21,
[6]  1, 0, 9, 0, 30, 0, 51,
[7]  0, 4, 0, 25, 0, 76, 0, 127.
		

Crossrefs

Programs

  • Sage
    @CachedFunction
    def T(p, q):
        if p == 0 and q == 0: return 1
        if p < 0 or  p > q: return 0
        return T(p-2, q) + T(p-1, q-1) + T(p, q-2)
    [[T(p, q) for p in (0..q)] for q in (0..9)]

Formula

Definition: T(0, 0) = 1; T(p, q) = 0 if p < 0 or p > q; T(p, q) = T(p-2, q) + T(p-1, q-1) + T(p, q-2). (The notation is in the style of Knuth, TAOCP 4a (7.2.1.6)).
T(n, n) = A001006(n).
Sum_{0<=k<=n} T(n, k) = A005043(n+2).

A106489 Triangle read by rows: T(n,k) is the number of short bushes with n edges and having the leftmost leaf at height k (a short bush is an ordered tree with no nodes of outdegree 1).

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 9, 5, 1, 21, 12, 3, 51, 30, 9, 1, 127, 76, 25, 4, 323, 196, 69, 14, 1, 835, 512, 189, 44, 5, 2188, 1353, 518, 133, 20, 1, 5798, 3610, 1422, 392, 70, 6, 15511, 9713, 3915, 1140, 230, 27, 1, 41835, 26324, 10813, 3288, 726, 104, 7, 113634, 71799, 29964
Offset: 2

Views

Author

Emeric Deutsch, May 29 2005

Keywords

Comments

Basically, the mirror image of A020474. Row n has floor(n/2) terms (first row is row 2). Row sums yield the Riordan numbers (A005043). Column 1 yields the Motzkin numbers (A001006); column 2 yields A002026; column 3 yields A005322; column 4 yields A005323; column 4 yields A005324; column 5 yields A005325; column 6 yields A005326.
T(n,k) is the number of Riordan paths (Motzkin paths with no flatsteps on the x-axis) with k returns to the x-axis. For example, T(6,2) = 5 counts UDUFFD, UDUUDD, UFDUFD, UFFDUD, UUDDUD where U = (1,1) is an upstep, F = (1,0) is a flatstep, and D = (1,-1) is a downstep. - David Callan, Dec 12 2021

Examples

			Column 1 yields the Motzkin numbers: indeed, if from each short bush, having leftmost leaf at height 1, we drop the leftmost edge, then we obtain the so-called bushes, known to be counted by the Motzkin numbers.
Triangle begins:
   1;
   1;
   2,  1;
   4,  2;
   9,  5,  1;
  21, 12,  3;
  51, 30,  9,  1.
		

Crossrefs

Programs

  • Maple
    S:=1/2/(z+z^2)*(1+z-sqrt(1-2*z-3*z^2)): G:=simplify(t*z^2*S/(1-z*S-t*z^2*S)): Gserz:=simplify(series(G,z=0,19)): for n from 2 to 17 do P[n]:=sort(coeff(Gserz,z^n)) od: for n from 2 to 17 do seq(coeff(P[n],t^k),k=1..floor(n/2)) od; # yields sequence in triangular form
  • Mathematica
    (* To generate the sequence *)
    CoefficientList[CoefficientList[Series[(1-t-2xt^2-Sqrt[1-2t-3t^2])/(2t^2(1-x+xt+x^2t^2)), {t,0,10}], t], x] // Flatten
    (* To generate the triangle *)
    CoefficientList[Series[(1-t-2xt^2-Sqrt[1-2t-3t^2])/(2t^2(1-x+xt+x^2t^2)), {t, 0, 10}], {t, x}] // MatrixForm
    Table[If[n < 2 k, 0, GegenbauerC[n-2k,-n+k-1,-1/2](k+1)/(n-k+1)], {n,0,10}, {k,0,5}] // MatrixForm
    (* Emanuele Munarini, Feb 10 2018 *)

Formula

G.f.: tz^2*S/(1 - zS - tz^2*S), where S = S(z) = (1 + z - sqrt(1 - 2z - 3z^2))/(2z(1+z)) is the g.f. of the short bushes (the Riordan numbers; A005043).
a(n,k) = T(n-k+1, n-2*k)*(k+1)/(n-k+1), for n >= 2k, where T(n,k) = A027907(n,k) are the trinomial coefficients. - Emanuele Munarini, Feb 10 2018
The rows are the antidiagonals of the Motzkin triangle A064189. - Peter Luschny, Feb 01 2025

A375723 Square array read by antidiagonals, where the top row is the powers of 2 (A000079) and the other numbers are the sum of the neighbors in the preceding row.

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 8, 14, 24, 34, 16, 28, 49, 83, 117, 32, 56, 98, 171, 288, 405, 64, 112, 196, 343, 597, 1002, 1407, 128, 224, 392, 686, 1200, 2085, 3492, 4899, 256, 448, 784, 1372, 2401, 4198, 7285, 12184, 17083, 512, 896, 1568, 2744, 4802, 8403, 14686, 25463, 42546, 59629
Offset: 0

Views

Author

WG Zeist, Aug 25 2024

Keywords

Comments

Each number in the top row of the array is determined by the pre-defined sequence (in this case, the powers of 2, A000079). Each number in lower rows is the sum of the numbers vertically or diagonally above it (so, the number at the left end of each row is the sum of two numbers, and all other numbers the sum of three). This is the same method as for constructing A217536, which has the top row be the nonnegative integers instead; other similar arrays are described in the comments of that sequence.
The main diagonal is the powers of 7 (A000420), and all numbers above or to the right of the main diagonal are multiples of powers of 2 and powers of 7. Specifically, the number in row m and column n, for n >= m, is 2^(n-m) * 7^m. Above the main diagonal, all numbers in the same column have the same final digit in base 10, and all numbers are 7/2 times the number immediately above.
More broadly, for any similarly constructed array with the powers of x as the top row, then the main diagonal will be the powers of (x^2 + x + 1) and the numbers above the main diagonal will be x^(n-m) * (x^2 + x + 1)^m (see also A062105, which can be interpreted as a similar array with the powers of 1 in the top row, and A020474 with the powers of 0).

Examples

			The array starts:
  1  2  4   8
  3  7  14  28
  10 24 49  98
  34 83 171 343
		

Crossrefs

The main diagonal gives A000420 (powers of 7). The first column gives A059738.

Formula

T(m+1,n) = sum(T(m,k), |k-n| <= 1) (and T(0,n)=2^n), m, n >= 0.
Previous Showing 11-15 of 15 results.