login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of partitions of prime(n) into squares.
2

%I #12 Dec 26 2024 14:03:52

%S 1,1,2,2,4,6,9,10,14,26,28,46,60,66,84,124,169,192,256,311,347,455,

%T 545,713,993,1167,1255,1466,1590,1846,3042,3491,4279,4564,6312,6712,

%U 8094,9697,10923,13027,15460,16368,21585,22795,25392,26778,36651,49641,54801,57560

%N Number of partitions of prime(n) into squares.

%H Michael De Vlieger, <a href="/A379551/b379551.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A001156(prime(n)).

%e 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.

%t 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 *)

%Y Cf. A000040, A001156.

%K nonn

%O 1,3

%A _David James Sycamore_, Dec 25 2024

%E More terms from _Michael De Vlieger_, Dec 26 2024.