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.

A083487 Triangle read by rows: T(n,k) = 2*n*k + n + k (1 <= k <= n).

Original entry on oeis.org

4, 7, 12, 10, 17, 24, 13, 22, 31, 40, 16, 27, 38, 49, 60, 19, 32, 45, 58, 71, 84, 22, 37, 52, 67, 82, 97, 112, 25, 42, 59, 76, 93, 110, 127, 144, 28, 47, 66, 85, 104, 123, 142, 161, 180, 31, 52, 73, 94, 115, 136, 157, 178, 199, 220, 34, 57, 80, 103, 126, 149, 172, 195, 218, 241, 264
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Jun 09 2003

Keywords

Comments

T(n,k) gives number of edges (of unit length) in a k X n grid.
The values 2*T(n,k)+1 = (2*n+1)*(2*k+1) are nonprime and therefore in A047845.

Examples

			Triangle begins:
   4;
   7, 12;
  10, 17, 24;
  13, 22, 31, 40;
  16, 27, 38, 49,  60;
  19, 32, 45, 58,  71,  84;
  22, 37, 52, 67,  82,  97, 112;
  25, 42, 59, 76,  93, 110, 127, 144;
  28, 47, 66, 85, 104, 123, 142, 161, 180;
		

Crossrefs

Programs

  • Magma
    [(2*n*k + n + k): k in [1..n], n in [1..11]]; // Vincenzo Librandi, Jun 01 2014
    
  • Mathematica
    T[n_,k_]:= 2 n k + n + k; Table[T[n, k], {n, 10}, {k, n}]//Flatten (* Vincenzo Librandi, Jun 01 2014 *)
  • Python
    def T(r, c): return 2*r*c + r + c
    a = [T(r, c) for r in range(12) for c in range(1, r+1)]
    print(a) # Michael S. Branicky, Sep 07 2022
    
  • SageMath
    flatten([[2*n*k +n +k for k in range(1,n+1)] for n in range(1,14)]) # G. C. Greubel, Oct 17 2023

Formula

From G. C. Greubel, Oct 17 2023: (Start)
T(n, 1) = A016777(n).
T(n, 2) = A016873(n).
T(n, 3) = A017017(n).
T(n, 4) = A017209(n).
T(n, 5) = A017449(n).
T(n, 6) = A186113(n).
T(n, n-1) = A056220(n).
T(n, n-2) = A090288(n-2).
T(n, n-3) = A271625(n-2).
T(n, n) = 4*A000217(n).
T(2*n, n) = A033954(n).
Sum_{k=1..n} T(n, k) = A162254(n).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A182868((n+1)/2) if n is odd otherwise A182868(n/2) + 1. (End)

Extensions

Edited by N. J. A. Sloane, Jul 23 2009
Name edited by Michael S. Branicky, Sep 07 2022

A082652 Triangle read by rows: T(n,k) is the number of squares that can be found in a k X n rectangular grid of little squares, for 1 <= k <= n.

Original entry on oeis.org

1, 2, 5, 3, 8, 14, 4, 11, 20, 30, 5, 14, 26, 40, 55, 6, 17, 32, 50, 70, 91, 7, 20, 38, 60, 85, 112, 140, 8, 23, 44, 70, 100, 133, 168, 204, 9, 26, 50, 80, 115, 154, 196, 240, 285, 10, 29, 56, 90, 130, 175, 224, 276, 330, 385, 11, 32, 62, 100, 145, 196, 252, 312, 375, 440, 506
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), May 16 2003

Keywords

Comments

Here the squares being counted have sides parallel to the gridlines; for all squares, see A130684.
T(n,k) also is the total number of balls in a pyramid of balls on an n X k rectangular base. - N. J. A. Sloane, Nov 17 2007. For example, if the base is 4 X 2, the total number of balls is 4*2 + 3*1 = 11 = T(4,2).
Row sums give A001296. - Vincenzo Librandi Mar 26 2019

Examples

			Let X represent a small square. Then T(3,2) = 8 because here
  XXX
  XXX
we can see 8 squares, 6 of side 1, 2 of side 2.
Triangle begins:
  1
  2   5
  3   8  14
  4  11  20  30
  5  14  26  40  55
  6  17  32  50  70  91
  7  20  38  60  85 112 140
  ...
		

Crossrefs

Cf. A083003, A083487. Right side of triangle gives A000330.
Main diagonal is A000330, row sums are A001296. - Paul D. Hanna and other correspondents, May 28 2003

Programs

  • Magma
    /* As triangle */ [[(k+3*k*n+3*k^2*n-k^3)/6: k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Mar 26 2019
  • Maple
    f:=proc(m,n) add((m-i)*(n-i),i=0..min(m,n)); end;
  • Mathematica
    T[n_, k_] := Sum[(n-i)(k-i), {i, 0, Min[n, k]}];
    Table[T[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 25 2019 *)

Formula

T(n, k) = ( k + 3*k*n + 3*k^2*n - k^3 ) / 6.
T(n, k) = Sum_{i=0..min(n,k)} (n-i)*(k-i). - N. J. A. Sloane, Nov 17 2007
G.f.: (1+x*y-2*x^2*y)*x*y/((1-x*y)^4*(1-x)^2). - Robert Israel, Dec 20 2017

Extensions

Edited by Robert Israel, Dec 20 2017

A083504 Triangle read by rows: for 1 <= k <= n, T(n, k) is the total perimeter of all squares contained in a square grid with n rows and k columns.

Original entry on oeis.org

4, 8, 24, 12, 40, 80, 16, 56, 120, 200, 20, 72, 160, 280, 420, 24, 88, 200, 360, 560, 784, 28, 104, 240, 440, 700, 1008, 1344, 32, 120, 280, 520, 840, 1232, 1680, 2160, 36, 136, 320, 600, 980, 1456, 2016, 2640, 3300, 40, 152, 360, 680, 1120, 1680, 2352, 3120
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Jun 09 2003

Keywords

Comments

T(n, n) = 4*A002415(n+1). Row sums are 4*A051836.

Examples

			T(3, 2) = 40 because the six 1 X 1 squares each have perimeter 4 and the two 2 X 2 squares each have perimeter 8.
		

Crossrefs

Formula

T(n, k) = (2k^3*n+6k^2*n+k^2+4k*n+2k-k^4-2k^3)/3.

Extensions

Edited by David Wasserman, Nov 18 2004
Showing 1-3 of 3 results.