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”).

A347173
Sum of squares of odd divisors of n that are <= sqrt(n).
3
1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 26, 1, 10, 1, 1, 35, 1, 1, 10, 1, 26, 10, 1, 1, 10, 26, 1, 10, 1, 1, 35, 1, 1, 10, 50, 26, 10, 1, 1, 10, 26, 50, 10, 1, 1, 35, 1, 1, 59, 1, 26, 10, 1, 1, 10, 75, 1, 10, 1, 1, 35, 1, 50, 10, 1, 26
OFFSET
1,9
LINKS
FORMULA
G.f.: Sum_{k>=1} (2*k - 1)^2 * x^((2*k - 1)^2) / (1 - x^(2*k - 1)).
EXAMPLE
a(18) = 10 as the odd divisors of 18 are the divisors of 9 which are 1, 3 and 9. Of those, 1 and 3 are <= sqrt(18) so we find the squares of 1 and 3 then add them i.e., a(18) = 1^2 + 3^2 = 10. - David A. Corneth, Feb 24 2024
MATHEMATICA
Table[DivisorSum[n, #^2 &, # <= Sqrt[n] && OddQ[#] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[(2 k - 1)^2 x^((2 k - 1)^2)/(1 - x^(2 k - 1)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sum(k=0, sqrtint(n), if ((k%2) && !(n%k), k^2)); \\ Michel Marcus, Aug 22 2021
(PARI)
a(n) = {
my(s = sqrtint(n), res);
n>>=valuation(n, 2);
d = divisors(n);
for(i = 1, #d,
if(d[i] <= s,
res += d[i]^2
,
return(res)
)
); res
} \\ David A. Corneth, Feb 24 2024
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Aug 21 2021
STATUS
approved