%I #34 Oct 24 2023 00:56:23
%S 0,0,0,1,1,2,3,4,4,6,7,8,9,10,11,14,14,15,17,18,19,22,23,24,25,27,28,
%T 31,32,33,36,37,37,40,41,44,46,47,48,51,52,53,56,57,58,63,64,65,66,68,
%U 70,73,74,75,78,81,82,85,86,87,90,91,92,97,97,100,103,104,105,108,111
%N Number of odd divisors > 1 in the numbers 1 through n, counted with multiplicity.
%C Number of partitions of n into 3 parts such that the smallest part divides the "middle" part. - _Wesley Ivan Hurt_, Oct 21 2021
%H Charles R Greathouse IV, <a href="/A248517/b248517.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = Sum_{j=1..n} A069283(j).
%F a(n) = A060831(n) - n.
%F a(n) = A006218(n) - A006218(floor(n/2)) - n. - _Charles R Greathouse IV_, Jun 18 2015
%F a(n) = Sum_{i=1..n-1} floor(floor(i/2)/(n-i)). - _Wesley Ivan Hurt_, Jan 30 2016
%p A248517 := proc(n)
%p add(A069283(j),j=1..n) ;
%p end proc:
%t Table[Sum[Floor[Floor[i/2]/(n - i)], {i, n - 1}], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jan 30 2016 *)
%t Join[{0},Accumulate[Table[Count[Divisors[n],_?OddQ]-1,{n,80}]]] (* _Harvey P. Dale_, Jan 06 2019 *)
%t Join[{0}, Accumulate[Table[DivisorSigma[0, n/2^IntegerExponent[n, 2]] - 1, {n, 1, 100}]]] (* _Amiram Eldar_, Jul 10 2022 *)
%o (PARI) a(n)=my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2-n \\ _Charles R Greathouse IV_, Jun 18 2015
%o (Python)
%o from math import isqrt
%o def A248517(n): return ((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)+(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1)-n # _Chai Wah Wu_, Oct 23 2023
%Y Cf. A002541, A006218, A069283.
%K nonn,easy
%O 0,6
%A _R. J. Mathar_, Jun 18 2015