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.

A073254 Array read by antidiagonals, A(n,k) = n^2 + n*k + k^2.

Original entry on oeis.org

0, 1, 1, 4, 3, 4, 9, 7, 7, 9, 16, 13, 12, 13, 16, 25, 21, 19, 19, 21, 25, 36, 31, 28, 27, 28, 31, 36, 49, 43, 39, 37, 37, 39, 43, 49, 64, 57, 52, 49, 48, 49, 52, 57, 64, 81, 73, 67, 63, 61, 61, 63, 67, 73, 81, 100, 91, 84, 79, 76, 75, 76, 79, 84, 91, 100, 121, 111, 103, 97
Offset: 0

Views

Author

Michael Somos, Jul 23 2002

Keywords

Comments

Norm of elements in planar hexagonal lattice A_2.
Only numbers which appear in A003136 (Loeschian numbers) can appear in this array. - Peter Luschny, Nov 10 2021

Examples

			Triangle T(n, k) starts:
[0]               0
[1]              1, 1
[2]            4, 3, 4
[3]           9, 7, 7, 9
[4]       16, 13, 12, 13, 16
[5]     25, 21, 19, 19, 21, 25
[6]   36, 31, 28, 27, 28, 31, 36
[7] 49, 43, 39, 37, 37, 39, 43, 49
		

Crossrefs

A033994 gives antidiagonal sums.
Cf. A198063 (m=3), A198064 (m=4), A198065 (m=5).

Programs

  • Maple
    # Using the triangle formula:
    A073254 := (n,k) -> k^2 - k*n + n^2: # Peter Luschny, Oct 26 2011
  • Mathematica
    (* Using the array formula: *)
    A[n_, k_] := n^2 + n k + k^2;
    Table[A[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 22 2018 *)
  • PARI
    {A(n, k) = n^2 + n*k + k^2}

Formula

From Peter Luschny, Oct 26 2011: (Start)
Let m = 2, for the cases m = 3, 4, and 5 see the cross-references.
T(n,k) = k^2 - k*n + n^2 = A(n-k,k).
T(n,k) = Sum_{j=0..m} Sum_{i=0..m} (-1)^(j+i)*C(i,j)*n^j*k^(m-j) for m = 2.
T(n,0) = T(n,n) = n^m = n^2 = A000290(n).
T(2n,n) = (m+1)*n^m = 3*n^2 = A033428(n).
T(2n+1,n+1) = (n+1)^(m+1) - n^(m+1) = (n+1)^3 - n^3 = A003215(n).
Sum_{k=0..n} T(n,k) = (5*n^3 + 6*n^2 + n)/6 = A033994(n).
T(n+1, k+1)*binomial(n, k)^3/(k+1)^2 = A194595(n,k). (End)

Extensions

Edited by Peter Luschny, Nov 10 2021