login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A306727
Square array A(n,k), n >= 0, k >= 0, read by antidiagonals: A(n,k) is the number of partitions of 3*n into powers of 3 less than or equal to 3^k.
1
1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 3, 4, 1, 1, 2, 3, 5, 5, 1, 1, 2, 3, 5, 7, 6, 1, 1, 2, 3, 5, 7, 9, 7, 1, 1, 2, 3, 5, 7, 9, 12, 8, 1, 1, 2, 3, 5, 7, 9, 12, 15, 9, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 10, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 11, 1, 1, 2, 3, 5, 7, 9, 12, 15, 18, 23, 26, 12, 1
OFFSET
0,5
COMMENTS
Column sequences converge to A005704.
LINKS
FORMULA
G.f. of column k: 1/(1-x) * 1/Product_{j=0..k-1} (1 - x^(3^j)).
EXAMPLE
A(3,3) = 5, because there are 5 partitions of 3*3=9 into powers of 3 less than or equal to 3^3=9: [9], [3,3,3], [3,3,1,1,1], [3,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, ...
1, 3, 3, 3, 3, 3, ...
1, 4, 5, 5, 5, 5, ...
1, 5, 7, 7, 7, 7, ...
1, 6, 9, 9, 9, 9, ...
MATHEMATICA
nmax = 12;
f[k_] := f[k] = 1/(1-x) 1/Product[1-x^(3^j), {j, 0, k-1}] + O[x]^(nmax+1) // CoefficientList[#, x]&;
A[n_, k_] := f[k][[n+1]];
Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Nov 20 2019 *)
PROG
(Python)
def aseq(p, x, k):
# generic algorithm for any p - power base, p=3 for this sequence
if x < 0:
return 0
if x < p:
return 1
# coefficients
arr = [0]*(x+1)
arr[0] = 1
m = p**k
while m > 0:
for i in range(m, x+1, m):
arr[i] += arr[i-m]
m //= p
return arr[x]
def A(n, k):
p = 3
return aseq(p, p*n, k)
# A(n, k), 5 = A(3, 3) = aseq(3, 3*3, 3)
# Serguei Zolotov, Mar 13 2019
CROSSREFS
Main diagonal gives A005704.
A181322 gives array for base p=2.
Sequence in context: A176484 A144328 A128227 * A324209 A228107 A140207
KEYWORD
nonn,tabl
AUTHOR
Serguei Zolotov, Mar 06 2019
STATUS
approved