OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{k=1..floor(n/2)} tau(k^2+(n-k)^2), where tau(n) is the number of divisors of n (A000005).
a(n) = (tau(2*floor(n/2)^2)*mod(n+1,2)-tau(n^2)+Sum_{k=1..n} tau(k^2+(n-k)^2))/2, n>1. - Wesley Ivan Hurt, Jun 20 2026
EXAMPLE
a(6) = 16; 6 has 3 partitions into two parts, (5,1), (4,2) and (3,3). The sums of the squared parts from each partition are 5^2 + 1^2 = 26, 4^2 + 2^2 = 20 and 3^2 + 3^2 = 18. Then d(26) + d(20) + d(18) = 4 + 4 + 8 = 16.
MAPLE
f:= proc(n) local i;
add(NumberTheory:-tau(i^2+(n-i)^2), i=1..floor(n/2))
end proc:
map(f, [$1..100]); # Robert Israel, Jun 07 2026
MATHEMATICA
Table[Sum[DivisorSigma[0, i^2 + (n - i)^2], {i, Floor[n/2]}], {n, 100}]
PROG
(PARI) a(n) = sum(i=1, n\2, numdiv(i^2+(n-i)^2)); \\ Michel Marcus, Nov 02 2022
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Wesley Ivan Hurt, Oct 01 2020
STATUS
approved
