# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a078471 Showing 1-1 of 1 %I A078471 #58 Sep 15 2024 15:59:19 %S A078471 1,2,6,7,13,17,25,26,39,45,57,61,75,83,107,108,126,139,159,165,197, %T A078471 209,233,237,268,282,322,330,360,384,416,417,465,483,531,544,582,602, %U A078471 658,664,706,738,782,794,872,896,944,948,1005,1036,1108,1122,1176,1216 %N A078471 Sum of all odd divisors of all positive integers <= n. %C A078471 The subsequence of primes begins: 2, 7, 13, 17, 61, 83, 107, 139, 197, 233, then no more through a(54). [_Jonathan Vos Post_, Feb 14 2010] %C A078471 a(n) is also the total number of parts in all partitions of all positive integers <= n into an odd number of equal parts. - _Omar E. Pol_, Jun 04 2017 %H A078471 Alois P. Heinz, Table of n, a(n) for n = 1..10000 %H A078471 M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, arXiv:math/9904028 [math.MG], 1999. %H A078471 M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, Canad. J. Math. 51 (1999), 1258-1276. %F A078471 a(n) = Sum_{k=1..n} A000593(k). %F A078471 a(n) is asymptotic to c*n^2 where c = Pi^2/24. %F A078471 a(n) = A024916(n) - A271342(n). - _Omar E. Pol_, Apr 08 2016 %F A078471 G.f.: (1/(1 - x))*Sum_{k>=1} k*x^k/(1 + x^k). - _Ilya Gutkovskiy_, Dec 23 2016 %F A078471 From _Ridouane Oudra_, Aug 28 2019: (Start) %F A078471 a(n) = Sum_{k=1..n} (sigma(2k) - 2*sigma(k)), where sigma = A000203. %F A078471 a(n) = A326124(n) - 2*A024916(n). (End) %p A078471 with(numtheory): %p A078471 b:= n-> add(d, d=select(x-> x::odd, divisors(n))): %p A078471 a:= proc(n) option remember; b(n)+`if`(n=1, 0, a(n-1)) end: %p A078471 seq(a(n), n=1..60); # _Alois P. Heinz_, Sep 25 2015 %t A078471 a[n_] := Sum[DivisorSum[k, (-1)^(# + 1) k/# &], {k, 1, n}]; Array[a, 60] (* _Jean-François Alcover_, Dec 07 2015 *) %t A078471 Accumulate[Table[Total[Select[Divisors[n],OddQ]],{n,60}]] (* _Harvey P. Dale_, Sep 15 2024 *) %o A078471 (PARI) a(n)=sum(v=1,n,sumdiv(v,d,(-1)^(d+1)*v/d)) %o A078471 (PARI) a(n) = sum(k=1, n, sumdiv(k, d, (d%2)*d)); \\ _Michel Marcus_, Apr 09 2016 %o A078471 (Magma) [&+[&+[d:d in Divisors(k)|IsOdd(d)]:k in [1..n]]:n in [1..60]]; // _Marius A. Burtea_, Aug 28 2019 %o A078471 (Python) %o A078471 def A078471(n): return sum(k*(n//k) for k in range((n>>1)+1, n+1)) + sum(k*(n//k-((n>>1)//k<<1)) for k in range(1, (n>>1)+1)) # _Chai Wah Wu_, Apr 26 2023 %o A078471 (Python) %o A078471 from math import isqrt %o A078471 def A078471(n): return (t:=isqrt(m:=n>>1))**2*(t+1) - sum((q:=m//k)*((k<<1)+q+1) for k in range(1,t+1))-((s:=isqrt(n))**2*(s+1) - sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # _Chai Wah Wu_, Oct 21 2023 %Y A078471 Partial sums of A000593. %Y A078471 Cf. A024916, A271342, A000203, A326124. %K A078471 nonn %O A078471 1,2 %A A078471 _Benoit Cloitre_, Dec 31 2002 %E A078471 Better definition from _Omar E. Pol_, Apr 09 2016 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE