OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n * Sum_{d|n, d<n, d odd} 1 / d.
a(2n+1) = A000593(2n+1) - 1. - Chai Wah Wu, Mar 01 2022
G.f.: Sum_{k>=2} k * x^k / (1 - x^(2*k)). - Ilya Gutkovskiy, May 14 2023
exp( 2*Sum_{n>=1} a(n)*x^n/n ) is the g.f. of A300415. - Paul D. Hanna, May 15 2023
From Amiram Eldar, Oct 13 2023: (Start)
Sum_{k=1..n} a(k) = c * n^2 / 2, where c = Pi^2/8 = 1.23370055... (A111003). (End)
EXAMPLE
a(10) = 12; a(10) = 10 * Sum_{d|10, d<10, d odd} 1 / d = 10 * (1/1 + 1/5) = 12.
MAPLE
A352047 := proc(n)
local a, d ;
a := 0 ;
for d in numtheory[divisors](n) do
if type(d, 'odd') and d < n then
a := a+n/d ;
end if;
end do:
a ;
end proc:
seq(A352047(n), n=1..30) ; # R. J. Mathar, Mar 09 2022
MATHEMATICA
Table[n DivisorSum[n, 1/# &, # < n && OddQ[#] &], {n, 72}] (* Michael De Vlieger, Mar 02 2022 *)
a[n_] := DivisorSigma[-1, n / 2^IntegerExponent[n, 2]] * n - Mod[n, 2]; Array[a, 100] (* Amiram Eldar, Oct 13 2023 *)
PROG
(PARI) a(n) = n*sumdiv(n, d, if ((d%2) && (d<n), 1/d)); \\ Michel Marcus, Mar 02 2022
(PARI) a(n) = n * sigma(n >> valuation(n, 2), -1) - n % 2; \\ Amiram Eldar, Oct 13 2023
(Python)
from math import prod
from sympy import factorint
def A352047(n): return prod(p**e if p == 2 else (p**(e+1)-1)//(p-1) for p, e in factorint(n).items()) - n % 2 # Chai Wah Wu, Mar 02 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Mar 01 2022
STATUS
approved