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.

A185914 Array: T(n,k)=k-n+1 for k>=n; T(n,k)=0 for k

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 2, 0, 0, 5, 3, 1, 0, 0, 6, 4, 2, 0, 0, 0, 7, 5, 3, 1, 0, 0, 0, 8, 6, 4, 2, 0, 0, 0, 0, 9, 7, 5, 3, 1, 0, 0, 0, 0, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 11, 9, 7, 5, 3, 1, 0, 0, 0, 0, 0, 12, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0, 13, 11, 9, 7, 5, 3, 1, 0, 0, 0, 0, 0, 0, 14, 12, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Clark Kimberling, Feb 06 2011

Keywords

Comments

A member of the accumulation chain
...< A185916 < A185914 < A185915 < ...
(See A144112 for definitions of weight array and accumulation array.)

Examples

			Northwest corner:
1...2...3...4...5...6...7...8...9
0...1...2...3...4...5...6...7...8
0...0...1...2...3...4...5...6...7
0...0...0...1...2...3...4...5...6
0...0...0...0...1...2...3...4...5
		

Crossrefs

Programs

  • Mathematica
    (* This program generates the array A185914, its accumulation array A185915, and its weight array A185916. *)
    f[n_,0]:=0;f[0,k_]:=0; (* needed for the weight array *)
    f[n_,k_]:=k-n+1; f[n_,k_]:=0/;kA185914 *)
    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}];
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]]  (* A184915 *)
    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}]] (* A184916 *)
    Table[w[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten

Formula

T(n,k) = k-n+1 for k>=n; T(n,k)=0 for k=1, n>=1.