A025423 Number of partitions of n into 8 squares.
1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 3, 5, 5, 5, 5, 6, 6, 7, 6, 6, 8, 8, 7, 8, 10, 9, 9, 10, 9, 11, 10, 11, 13, 14, 11, 13, 14, 13, 14, 14, 16, 17, 15, 14, 18, 18, 16, 19, 21, 23, 20, 21, 20, 23, 22, 19, 26, 26, 23, 25, 26, 26, 27, 27, 28, 34, 29, 28, 31, 33, 30, 32, 36, 35, 36, 34, 36
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1 or t<1, 0, b(n, i-1, t)+ `if`(i^2>n, 0, b(n-i^2, i, t-1)))) end: a:= n-> b(n, isqrt(n), 8): seq(a(n), n=0..120); # Alois P. Heinz, May 30 2014
-
Mathematica
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i<1 || t<1, 0, b[n, i-1, t] + If[i^2 > n, 0, b[n-i^2, i, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 8]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Jun 11 2015, after Alois P. Heinz *) a[n_]:=Length[PowersRepresentations[n,8,2]]; Array[a,82,0] (* Stefano Spezia, May 18 2025 *)