OFFSET
0,7
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
FORMULA
a(n) = A243148(n^2,n).
EXAMPLE
a(0) = 1: the empty partition.
a(1) = 1: 1.
a(2) = 0: there is no partition of 4 into exactly 2 nonzero squares.
a(3) = 1: 441.
a(4) = 1: 4444.
a(5) = 1: 94444.
a(6) = 4: (25)44111, (16)(16)1111, (16)44444, 999441.
a(7) = 4: (25)(16)41111, (25)444444, (16)(16)44441, (16)999411.
a(8) = 9: (49)9111111, (36)(16)441111, (36)4444444, (25)(25)911111, (25)(16)944411, (25)9999111, (16)(16)(16)94111, (16)9999444, 99999991.
MAPLE
h:= proc(n) option remember; `if`(n<1, 0,
`if`(issqr(n), n, h(n-1)))
end:
b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1 or
t<1, 0, b(n, h(i-1), t)+b(n-i, h(min(n-i, i)), t-1)))
end:
a:= n-> (s-> b(s$2, n)-`if`(n=0, 0, b(s$2, n-1)))(n^2):
seq(a(n), n=0..40);
MATHEMATICA
h[n_] := h[n] = If[n < 1, 0, If[Sqrt[n] // IntegerQ, n, h[n - 1]]];
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1 || t < 1, 0, b[n, h[i - 1], t] + b[n - i, h[Min[n - i, i]], t - 1]]];
a[n_] := Function[s, b[s, s, n] - If[n == 0, 0, b[s, s, n - 1]]][n^2];
a /@ Range[0, 40] (* Jean-François Alcover, Nov 06 2020, after Alois P. Heinz *)
PROG
(SageMath) # uses[GeneralizedEulerTransform(n, a) from A338585], slow.
def A319435List(n): return GeneralizedEulerTransform(n, lambda n: n^2)
print(A319435List(10)) # Peter Luschny, Nov 12 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 18 2018
STATUS
approved