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.

A155724 Triangle read by rows: T(n, k) = 2*n*k + n + k - 4.

Original entry on oeis.org

0, 3, 8, 6, 13, 20, 9, 18, 27, 36, 12, 23, 34, 45, 56, 15, 28, 41, 54, 67, 80, 18, 33, 48, 63, 78, 93, 108, 21, 38, 55, 72, 89, 106, 123, 140, 24, 43, 62, 81, 100, 119, 138, 157, 176, 27, 48, 69, 90, 111, 132, 153, 174, 195, 216, 30, 53, 76, 99, 122, 145, 168, 191, 214, 237, 260
Offset: 1

Views

Author

Vincenzo Librandi, Jan 25 2009

Keywords

Examples

			Triangle begins:
   0;
   3,  8;
   6, 13, 20;
   9, 18, 27, 36;
  12, 23, 34, 45,  56;
  15, 28, 41, 54,  67,  80;
  18, 33, 48, 63,  78,  93, 108;
  21, 38, 55, 72,  89, 106, 123, 140;
  24, 43, 62, 81, 100, 119, 138, 157, 176;
  27, 48, 69, 90, 111, 132, 153, 174, 195, 216;
		

Crossrefs

All terms are in A155723.
Cf. A162261 (row sums).
Columns k: A008585 (k=1), A016885 (k=2), A017053 (k=3), 9*A020705 (k=4).
Diagonals include: A139570, A181510, A271625.

Programs

  • Magma
    /* Triangle: */ [[2*m*n+m+n-4: m in [1..n]]: n in [1..10]]; // Bruno Berselli, Aug 31 2012
    
  • Mathematica
    Flatten[Table[2 n m + m + n - 4, {n, 10}, {m, n}]] (* Vincenzo Librandi, Mar 01 2012 *)
  • Python
    def A155724(n,k): return 2*n*k+n+k-4
    print(flatten([[A155724(n,k) for k in range(1,n+1)] for n in range(1,16)])) # G. C. Greubel, Jan 21 2025

Formula

T(n, k) = A154685(n, k) - 8. - L. Edson Jeffery, Oct 12 2012
2*T(n, k) + 9 = (2*k+1)*(2*n+1). - Vincenzo Librandi, Nov 18 2012
From G. C. Greubel, Jan 21 2025: (Start)
T(2*n-1, n) = 4*n^2 + n - 5 (main diagonal).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (1/4)*( 4*(-1)^(n+1)*n^2 + 2*(2-3*(-1)^n)*n - 7*(1-(-1)^n)).
G.f.: x*y*(3*x + 3*y - 4*x*y)/((1-x)*(1-y))^2. (End)

Extensions

Edited by N. J. A. Sloane, Jun 23 2010