OFFSET
1,2
COMMENTS
For the definition of accumulation array, see A144112.
EXAMPLE
MATHEMATICA
(* This program creates the Wythoff array W={f(n, k)}=A035513, then the accumulation array A185736 of W, then the weight array A185736 of W *)
f[n_, 0]:=0; f[0, k_]:=0; (* Needed for the weight array *)
f[n_, k_]:=Fibonacci[k+1]Floor[n*GoldenRatio]+(n-1)Fibonacci[k];
TableForm[Table[f[n, k], {n, 1, 10}, {k, 1, 15}]] (* Wythoff array *)
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}]] (* A185736 *)
Table[s[n-k+1, k], {n, 14}, {k, n, 1, -1}]//Flatten
(* In general, the weight array W of an arbitrary rectangular array S={s(i, j):i<=1, j<=1} is defined in two steps:(1) define s(i, j)=0 if i=0 or j=0; (2) then w(m, n)=s(m, n)+s(m-1, n-1)-s(m, n-1)-s(m-1, n) for m<1, n<1. *)
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}]] (* A185736 *)
Table[w[n-k+1, k], {n, 20}, {k, n, 1, -1}]//Flatten
PROG
(PARI) W(n, k) = (n+sqrtint(5*n^2))\2*fibonacci(k+1) + (n-1)*fibonacci(k); \\ A035513
T(n, k) = sum(i=1, n, sum(j=1, k, W(i, j))); \\ Michel Marcus, Feb 25 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Feb 02 2011
STATUS
approved