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.

A185877 Array T given by T(n,k) = k^2 +(2*n-3)*k -2*n +3, by antidiagonals.

Original entry on oeis.org

1, 3, 1, 7, 5, 1, 13, 11, 7, 1, 21, 19, 15, 9, 1, 31, 29, 25, 19, 11, 1, 43, 41, 37, 31, 23, 13, 1, 57, 55, 51, 45, 37, 27, 15, 1, 73, 71, 67, 61, 53, 43, 31, 17, 1, 91, 89, 85, 79, 71, 61, 49, 35, 19, 1, 111, 109, 105, 99, 91, 81, 69, 55, 39, 21, 1, 133, 131, 127, 121, 113, 103, 91, 77, 61, 43, 23, 1, 157, 155, 151, 145, 137, 127, 115, 101, 85, 67, 47, 25, 1, 183, 181, 177, 171, 163, 153, 141, 127, 111, 93, 73, 51, 27, 1
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

A member of the accumulation chain ... < A185879 < A185877 < A185878 < A185880 < ... (See A144112 for the definition of accumulation array).

Examples

			Northwest corner:
  1, 3,  7, 13, 21
  1, 5, 11, 19, 29
  1, 7, 15, 25, 45
  1, 9, 19, 31, 45
		

Crossrefs

Row 1 to 3: A002061, A028387, A082111.
diag (1,5,...): A056108;
diag (3,11,...): A056106;
diag (7,19,...): A003215;
diag (13,29,...): A144391;
diag (1,7,...): A003215;
diag (1,9,...): A144390.

Programs

  • Mathematica
    (* This program generates A185877, its accumulation array A185878, and its weight array A185879. *)
    f[n_,0]:=0;f[0,k_]:=0;
    f[n_,k_]:=k^2+(2n-3)k-2n+3;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]] (* A185877 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}]; (* accumulation array of {f(n,k)} *)
    FullSimplify[s[n,k]]  (* formula for A185878 *)
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]]
    Table[s[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
    w[m_,n_]:=f[m,n]+f[m-1,n-1]-f[m,n-1]-f[m-1,n]/;Or[m>0,n>0];
    TableForm[Table[w[n,k],{n,1,10},{k,1,15}]] (* A185879 *)
    Table[w[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten

Formula

T(n,k) = k^2 + (2*n-3)*k - 2*n + 3, k>=1, n>=1.