login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339186
Total number of nonzero squares in the partitions of n into 2 parts.
2
0, 0, 2, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 5, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
OFFSET
0,3
FORMULA
a(n) = A339184(n) + A339183(n).
EXAMPLE
a(8) = 3; The partitions of 8 into two parts are (7,1), (6,2), (5,3) and (4,4). There are 3 total nonzero squares among the parts (namely 1, 4 and 4 ), so a(8) = 3.
a(9) = 2; The partitions of 9 into two parts are (8,1), (7,2), (6,3) and (5,4). Since 1 and 4 are the only nonzero squares among all parts, a(9) = 2.
MATHEMATICA
Table[Sum[Floor[Sqrt[i]] - Floor[Sqrt[i - 1]] + Floor[Sqrt[n - i]] - Floor[Sqrt[n - i - 1]], {i, Floor[n/2]}], {n, 0, 100}]
CROSSREFS
Cf. A339183 (number of smaller parts), A339184 (number of larger parts).
Sequence in context: A341771 A092335 A278912 * A302479 A029355 A029307
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Nov 26 2020
STATUS
approved