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

A049777 Triangular array read by rows: T(m,n) = n + n+1 + ... + m = (m+n)(m-n+1)/2.

Original entry on oeis.org

1, 3, 2, 6, 5, 3, 10, 9, 7, 4, 15, 14, 12, 9, 5, 21, 20, 18, 15, 11, 6, 28, 27, 25, 22, 18, 13, 7, 36, 35, 33, 30, 26, 21, 15, 8, 45, 44, 42, 39, 35, 30, 24, 17, 9, 55, 54, 52, 49, 45, 40, 34, 27, 19, 10, 66, 65, 63, 60, 56, 51, 45, 38, 30, 21, 11, 78, 77, 75, 72, 68, 63, 57, 50
Offset: 1

Views

Author

Keywords

Comments

Triangle read by rows, T(n,k) = A000217(n) - A000217(k), 0 <= k < n. - Philippe Deléham, Mar 07 2013
Subtriangle of triangle in A049780. - Philippe Deléham, Mar 07 2013
No primes and all composite numbers (except 2^x) are generated after the first two columns of the square array for this sequence. In other words, no primes and all composites except 2^x are generated when m-n >= 2. - Bob Selcoe, Jun 18 2013
Diagonal sums in the square array equal partial sums of squares (A000330). - Bob Selcoe, Feb 14 2014
From Bob Selcoe, Oct 27 2014: (Start)
The following apply to the triangle as a square array read by rows unless otherwise specified (see Table link);
Conjecture: There is at least one prime in interval [T(n,k), T(n,k+1)]. Since T(n,k+1)/T(n,k) decreases to (k+1)/k as n increases, this is true for k=1 ("Bertrand's Postulate", first proved by P. Chebyshev), k=2 (proved by El Bachraoui) and k=3 (proved by Loo).
Starting with T(1,1), The falling diagonal of the first 2 numbers in each column (read by column) are the generalized pentagonal numbers (A001318). That is, the coefficients of T(1,1), T(2,1), T(2,2), T(3,2), T(3,3), T(4,3), T(4,4) etc. are the generalized pentagonal numbers. These are A000326 and A005449 (Pentagonal and Second pentagonal numbers: n*(3*n+1)/2, respectively), interweaved.
Let D(n,k) denote falling diagonals starting with T(n,k):
Treating n as constant: pentagonal numbers of the form n*k + 3*k*(k-1)/2 are D(n,1); sequences A000326, 005449, A045943, A115067, A140090, A140091, A059845, A140672, A140673, A140674, A140675, A151542 are formed by n = 1 through 12, respectively.
Treating k as constant: D(1,k) are (3*n^2 + (4k-5)*n + (k-1)*(k-2))/2. When k = 2(mod3), D(1,k), is same as D(k+1,1) omitting the first (k-2)/3 numbers in the sequences. So D(1,2) is same as D(3,1); D(1,5) is same as D(6,1) omitting the 6; D(1,8) is same as D(9,1) omitting the 9 and 21; etc.
D(1,3) and D(1,4) are sequences A095794 and A140229, respectively.
(End)

Examples

			Rows: {1}; {3,2}; {6,5,3}; ...
Triangle begins:
   1;
   3,  2;
   6,  5,  3;
  10,  9,  7,  4;
  15, 14, 12,  9,  5;
  21, 20, 18, 15, 11,  6;
  28, 27, 25, 22, 18, 13,  7;
  36, 35, 33, 30, 26, 21, 15,  8;
  45, 44, 42, 39, 35, 30, 24, 17,  9;
  55, 54, 52, 49, 45, 40, 34, 27, 19, 10; ...
		

Crossrefs

Row sums = A000330.
Cf. A001318 (generalized pentagonal numbers).
Cf. A000326, 005449, A045943, A115067, A140090, A140091, A059845, A140672, A140673, A140674, A140675, A151542 (pentagonal numbers of form n*k + 3*k*(k-1)/2).

Programs

  • Magma
    /* As triangle */ [[(m+n)*(m-n+1) div 2: n in [1..m]]: m in [1.. 15]]; // Vincenzo Librandi, Oct 27 2014
  • Mathematica
    Flatten[Table[(n+k) (n-k+1)/2,{n,15},{k,n}]] (* Harvey P. Dale, Feb 27 2012 *)
  • PARI
    {T(n,k) = if( k<1 || nMichael Somos, Oct 06 2007 */
    

Formula

Partial sums of A002260 row terms, starting from the right; e.g., row 3 of A002260 = (1, 2, 3), giving (6, 5, 3). - Gary W. Adamson, Oct 23 2007
Sum_{k=0..n-1} (-1)^k*(2*k+1)*A000203(T(n,k)) = (-1)^(n-1)*A000330(n). - Philippe Deléham, Mar 07 2013
Read as a square array: T(n,k) = k*(k+2n-1)/2. - Bob Selcoe, Oct 27 2014

A289832 Triangle read by rows: T(n,k) = number of rectangles all of whose vertices lie on an (n+1) X (k+1) rectangular grid.

Original entry on oeis.org

1, 3, 10, 6, 20, 44, 10, 33, 74, 130, 15, 49, 110, 198, 313, 21, 68, 152, 276, 443, 640, 28, 90, 200, 364, 592, 866, 1192, 36, 115, 254, 462, 756, 1113, 1550, 2044, 45, 143, 314, 570, 935, 1385, 1944, 2586, 3305, 55, 174, 380, 688, 1129, 1680, 2370, 3172, 4081, 5078
Offset: 1

Views

Author

Hector J. Partridge, Jul 13 2017

Keywords

Comments

T(n,k) is the number of rectangles (including squares) that can be drawn on an (n+1) X (k+1) grid.
The diagonal of T(n,k) is the number of rectangles in a square lattice (A085582), i.e., T(n,n) = A085582(n+1).
Column k=1 equals A000217.
Column k=2 equals A140229 for n >= 3 as the only oblique rectangles are squares of side length sqrt(2), leading to the same formula.

Examples

			Triangle T(n,k) begins:
n/k  1    2    3    4     5     6     7     8     9    10
1    1
2    3   10
3    6   20   44
4   10   33   74  130
5   15   49  110  198   313
6   21   68  152  276   443   640
7   28   90  200  364   592   866  1192
8   36  115  254  462   756  1113  1550  2044
9   45  143  314  570   935  1385  1944  2586  3305
10  55  174  380  688  1129  1680  2370  3172  4081  5078
e.g., there are T(3,3) =  44 rectangles in a 4 X 4 lattice:
There are A096948(3,3) = 36 rectangles whose sides are parallel to the axes;
There are 4 squares with side length sqrt(2);
There are 2 squares with side length sqrt(5);
There are 2 rectangles with side lengths sqrt(2) X 2 sqrt(2).
		

Crossrefs

Programs

  • Python
    from math import gcd
    def countObliques(a,b,c,d,n,k):
        if(gcd(a, b) == 1): #avoid double counting
            boundingBox={'width':(b * c) + (a * d),'height':(a * c) + (b * d)}
            if(boundingBox['width']A096948
        ret=(n*(n-1)*k*(k-1))/4
        #oblique rectangles
        ret+=sum(countObliques(a,b,c,d,n,k) for a in range(1,n) \
                                            for b in range(1,n) \
                                            for c in range(1,k) \
                                            for d in range(1,k))
        return ret
    Tnk=[[totalRectangles(n+1,k+1) for k in range(1, n+1)] for n in range(1, 20)]
    print(Tnk)
Showing 1-2 of 2 results.