A379551 Number of partitions of prime(n) into squares.
1, 1, 2, 2, 4, 6, 9, 10, 14, 26, 28, 46, 60, 66, 84, 124, 169, 192, 256, 311, 347, 455, 545, 713, 993, 1167, 1255, 1466, 1590, 1846, 3042, 3491, 4279, 4564, 6312, 6712, 8094, 9697, 10923, 13027, 15460, 16368, 21585, 22795, 25392, 26778, 36651, 49641, 54801, 57560
Offset: 1
Keywords
Examples
prime(5) = 11 = 11*1^2 = 3^2+2*1^2 = 2*2^2+3*1^2 = 2^2+7*1^2, so a(5) = 4.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[n_, i_] := f[n, i] = If[n == 0, 1, If[i < 1, 0, f[n, i - 1] + If[i^2 > n, 0, f[n - i^2, i] ] ] ]; Table[f[#, Floor@ Sqrt[#]] &[Prime[n]], {n, 120}] (* Michael De Vlieger, Dec 26 2024, after Jean-François Alcover at A001156 *)
Formula
a(n) = A001156(prime(n)).
Extensions
More terms from Michael De Vlieger, Dec 26 2024.