[go: up one dir, main page]

login
A240127
Number of partitions of n such that the sum of squares of the parts is a square.
4
1, 1, 1, 1, 2, 2, 1, 3, 3, 3, 5, 5, 6, 10, 9, 10, 17, 20, 18, 31, 34, 38, 52, 62, 65, 98, 108, 113, 160, 190, 204, 271, 322, 352, 448, 533, 572, 757, 863, 956, 1208, 1401, 1555, 1931, 2242, 2499, 3034, 3527, 3938, 4772, 5529, 6108, 7368, 8524, 9478, 11301
OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..495 (terms n = 1..100 from Charles R Greathouse IV)
EXAMPLE
a(12) counts these 6 partitions: [12], [5,2,2,1,1,1], [4,4,1,1,1,1], [4,3,3,1,1], [3,3,3,3], [2,2,1,1,1,1,1,1,1,1].
MATHEMATICA
f[x_] := x^(1/2); z = 26; ColumnForm[t = Map[Select[IntegerPartitions[#], IntegerQ[f[Total[#^2]]] &] &, Range[z]] ](* shows the partitions *)
t2 = Map[Length[Select[IntegerPartitions[#], IntegerQ[f[Total[#^2]]] &]] &, Range[40]] (* A240127 *) (* Peter J. C. Moses, Apr 01 2014 *)
PROG
(PARI) a(n)=my(s); forpart(v=n, s+=issquare(sum(i=1, #v, v[i]^2))); s \\ Charles R Greathouse IV, Mar 06 2017
CROSSREFS
Cf. A240128.
Sequence in context: A308684 A112182 A112209 * A109524 A191521 A245370
KEYWORD
nonn,changed
AUTHOR
Clark Kimberling, Apr 02 2014
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Oct 03 2024
STATUS
approved