Let nsp( n) be the number of such partitions of n, and nspl( n, k) be the number of such partitions with the least number in it being k
Then
nsp( n) = Sum{ k*k <= n | nspl( n, k) }
nspl( n, k) = 1, if n==k*k
nspl( n-k*k, k+1), otherwise
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…