|
|
A061980
|
|
Square array A(n,k) = A(n-1,k) + A(n-1, floor(k/2)) + A(n-1, floor(k/3)), with A(0,0) = 1, read by antidiagonals.
|
|
7
|
|
|
1, 0, 3, 0, 2, 9, 0, 1, 8, 27, 0, 0, 6, 26, 81, 0, 0, 4, 23, 80, 243, 0, 0, 3, 20, 76, 242, 729, 0, 0, 3, 17, 72, 237, 728, 2187, 0, 0, 1, 17, 66, 232, 722, 2186, 6561, 0, 0, 1, 11, 66, 222, 716, 2179, 6560, 19683, 0, 0, 1, 11, 54, 222, 701, 2172, 6552, 19682, 59049
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
A(n,k) = A(n-1,k) + A(n-1, floor(k/2)) + A(n-1, floor(k/3)), with A(0,0) = 1.
T(n, k) = A(k, n-k).
|
|
EXAMPLE
|
Array begins as:
1, 0, 0, 0, 0, 0, 0, ...;
3, 2, 1, 0, 0, 0, 0, ...;
9, 8, 6, 4, 3, 3, 1, ...;
27, 26, 23, 20, 17, 17, 11, ...;
81, 80, 76, 72, 66, 66, 54, ...;
243, 242, 237, 232, 222, 222, 202, ...;
729, 728, 722, 716, 701, 701, 671, ...;
Antidiagonal rows begin as:
1;
0, 3;
0, 2, 9;
0, 1, 8, 27;
0, 0, 6, 26, 81;
0, 0, 4, 23, 80, 243;
0, 0, 3, 20, 76, 242, 729;
0, 0, 3, 17, 72, 237, 728, 2187;
0, 0, 1, 17, 66, 232, 722, 2186, 6561;
|
|
MATHEMATICA
|
A[n_, k_]:= A[n, k]= If[n==0, Boole[k==0], A[n-1, k] +A[n-1, Floor[k/2]] +A[n-1, Floor[k/3]]];
T[n_, k_]:= A[k, n-k];
Table[A[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jun 18 2022 *)
|
|
PROG
|
(SageMath)
@CachedFunction
def A(n, k):
if (n==0): return 0^k
else: return A(n-1, k) + A(n-1, (k//2)) + A(n-1, (k//3))
def T(n, k): return A(k, n-k)
flatten([[T(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 18 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|