# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a319435 Showing 1-1 of 1 %I A319435 #19 Nov 12 2020 23:21:39 %S A319435 1,1,0,1,1,1,4,4,9,16,24,52,83,152,305,515,959,1773,3105,5724,10255, %T A319435 18056,32584,58082,101719,179306,317610,552730,962134,1683435,2899064, %U A319435 4995588,8638919,14746755,25196684,43082429,72959433,123554195,209017908,351164162 %N A319435 Number of partitions of n^2 into exactly n nonzero squares. %H A319435 Alois P. Heinz, Table of n, a(n) for n = 0..200 %F A319435 a(n) = A243148(n^2,n). %e A319435 a(0) = 1: the empty partition. %e A319435 a(1) = 1: 1. %e A319435 a(2) = 0: there is no partition of 4 into exactly 2 nonzero squares. %e A319435 a(3) = 1: 441. %e A319435 a(4) = 1: 4444. %e A319435 a(5) = 1: 94444. %e A319435 a(6) = 4: (25)44111, (16)(16)1111, (16)44444, 999441. %e A319435 a(7) = 4: (25)(16)41111, (25)444444, (16)(16)44441, (16)999411. %e A319435 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. %p A319435 h:= proc(n) option remember; `if`(n<1, 0, %p A319435 `if`(issqr(n), n, h(n-1))) %p A319435 end: %p A319435 b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1 or %p A319435 t<1, 0, b(n, h(i-1), t)+b(n-i, h(min(n-i, i)), t-1))) %p A319435 end: %p A319435 a:= n-> (s-> b(s$2, n)-`if`(n=0, 0, b(s$2, n-1)))(n^2): %p A319435 seq(a(n), n=0..40); %t A319435 h[n_] := h[n] = If[n < 1, 0, If[Sqrt[n] // IntegerQ, n, h[n - 1]]]; %t A319435 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]]]; %t A319435 a[n_] := Function[s, b[s, s, n] - If[n == 0, 0, b[s, s, n - 1]]][n^2]; %t A319435 a /@ Range[0, 40] (* _Jean-François Alcover_, Nov 06 2020, after _Alois P. Heinz_ *) %o A319435 (SageMath) # uses[GeneralizedEulerTransform(n, a) from A338585], slow. %o A319435 def A319435List(n): return GeneralizedEulerTransform(n, lambda n: n^2) %o A319435 print(A319435List(10)) # _Peter Luschny_, Nov 12 2020 %Y A319435 Cf. A243148, A259254, A319503. %K A319435 nonn %O A319435 0,7 %A A319435 _Alois P. Heinz_, Sep 18 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE