login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078471 Sum of all odd divisors of all positive integers <= n. 17
1, 2, 6, 7, 13, 17, 25, 26, 39, 45, 57, 61, 75, 83, 107, 108, 126, 139, 159, 165, 197, 209, 233, 237, 268, 282, 322, 330, 360, 384, 416, 417, 465, 483, 531, 544, 582, 602, 658, 664, 706, 738, 782, 794, 872, 896, 944, 948, 1005, 1036, 1108, 1122, 1176, 1216 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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]
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
LINKS
M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, arXiv:math/9904028 [math.MG], 1999.
M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, Canad. J. Math. 51 (1999), 1258-1276.
FORMULA
a(n) = Sum_{k=1..n} A000593(k).
a(n) is asymptotic to c*n^2 where c = Pi^2/24.
a(n) = A024916(n) - A271342(n). - Omar E. Pol, Apr 08 2016
G.f.: (1/(1 - x))*Sum_{k>=1} k*x^k/(1 + x^k). - Ilya Gutkovskiy, Dec 23 2016
From Ridouane Oudra, Aug 28 2019: (Start)
a(n) = Sum_{k=1..n} (sigma(2k) - 2*sigma(k)), where sigma = A000203.
a(n) = A326124(n) - 2*A024916(n). (End)
MAPLE
with(numtheory):
b:= n-> add(d, d=select(x-> x::odd, divisors(n))):
a:= proc(n) option remember; b(n)+`if`(n=1, 0, a(n-1)) end:
seq(a(n), n=1..60); # Alois P. Heinz, Sep 25 2015
MATHEMATICA
a[n_] := Sum[DivisorSum[k, (-1)^(# + 1) k/# &], {k, 1, n}]; Array[a, 60] (* Jean-François Alcover, Dec 07 2015 *)
PROG
(PARI) a(n)=sum(v=1, n, sumdiv(v, d, (-1)^(d+1)*v/d))
(PARI) a(n) = sum(k=1, n, sumdiv(k, d, (d%2)*d)); \\ Michel Marcus, Apr 09 2016
(Magma) [&+[&+[d:d in Divisors(k)|IsOdd(d)]:k in [1..n]]:n in [1..60]]; // Marius A. Burtea, Aug 28 2019
(Python)
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
(Python)
from math import isqrt
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
CROSSREFS
Partial sums of A000593.
Sequence in context: A124319 A325262 A334906 * A127406 A092310 A306924
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Dec 31 2002
EXTENSIONS
Better definition from Omar E. Pol, Apr 09 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)