# Upper bound for the difference between number-of-divisors and sum-of-divisors functions

The number-of-divisors function $d$, and the sum-of-divisors function $\sigma$, are defined by $$d(n) = \sum_{d \mid n} 1,$$ $$\sigma(n) = \sum_{d \mid n} d,$$ respectively. Now let $N$ be a square-free positive integer and consider the difference $$d(N) - \dfrac{\sigma(N)}{N}.$$ Is there any kind of smooth function giving an upper bound for this?

for primorial $$N = \prod_{p \leq x} p,$$ we find $$d(N) = 2^{\pi(x)} \approx 2^{x/\log x}$$ which is quite large, while $$\sigma(N)/N = \prod_{p \leq x} 1 + \frac{1}{p} \approx \frac{6 e^\gamma \log x}{ \pi^2},$$ much smaller. If the difference is not always an upper bound it will do until the real thing comes along.

Try it on computer. Note that i have written in terms of $x$ rather than writing some $p_n;$ that tends to create or erase logs.

Below is the result of the first 100 primes, the second column is the prime, the third column is the cumulative product of $1 + (1/p).$

    1      2   1.5
2      3   2
3      5   2.4
4      7   2.742857142857143
5     11   2.992207792207792
6     13   3.222377622377623
7     17   3.411929247223365
8     19   3.591504470761437
9     23   3.747656839055412
10     29   3.876886385229737
11     31   4.00194723636618
12     37   4.110107972484185
13     41   4.210354508398433
14     43   4.308269729523978
15     47   4.399935042918106
16     53   4.482952685237315
17     59   4.558934934139642
18     61   4.633671572404226
19     67   4.702830849604289
20     71   4.769067903824068
21     73   4.834397601136726
22     79   4.895592507480229
23     83   4.954575549739027
24     89   5.010244937938342
25     97   5.06189694760781
26    101   5.112014739168283
27    103   5.16164595022817
28    107   5.209885632006003
29    109   5.257682747895966
30    113   5.30421091380655
31    127   5.345976354072743
32    131   5.386785333874825
33    137   5.426104934852014
34    139   5.465141661002028
35    149   5.501820464096002
36    151   5.53825636120922
37    157   5.573531879433482
38    163   5.607725326546571
39    167   5.641304520118706
40    173   5.673913216766791
41    179   5.705611055966606
42    181   5.737133768982996
43    191   5.767171118558823
44    193   5.797052834199024
45    197   5.826479498332014
46    199   5.855758289780918
47    211   5.883510698737226
48    223   5.909894154785374
49    227   5.935928930797645
50    229   5.961850017831695
51    233   5.98743735696402
52    239   6.012489396114497
53    241   6.037437484895055
54    251   6.06149102069145
55    257   6.085076588865347
56    263   6.10821376220704
57    269   6.130920876564687
58    271   6.153544200832454
59    277   6.175759161846289
60    281   6.197736952457842
61    283   6.219637083031898
62    293   6.240864513349413
63    307   6.261193062252831
64    311   6.281325515829207
65    313   6.301393648467639
66    317   6.321271861869745
67    331   6.340369359941858
68    337   6.359183512345247
69    347   6.377509689614254
70    349   6.395783356346673
71    353   6.413901722795247
72    359   6.431767744307211
73    367   6.449292997016495
74    373   6.46658332676721
75    379   6.483645551903798
76    383   6.500574130368299
77    389   6.517285117849966
78    397   6.533701453159411
79    401   6.549994972992726
80    409   6.566009630628406
81    419   6.581680298004607
82    421   6.597313742892979
83    431   6.612620735335886
84    433   6.627892376756985
85    439   6.642990081487638
86    443   6.657985544425533
87    449   6.67281402002559
88    457   6.687415363614267
89    461   6.701921687613431
90    463   6.716396680459248
91    467   6.730778686198989
92    479   6.744830416232808
93    487   6.758680170680925
94    491   6.772445303411436
95    499   6.786017338087611
96    503   6.799508426234903
97    509   6.81286698895835
98    521   6.825943509090708
99    523   6.838995026316502
100    541   6.851636421928918


• Yes, I tried the random big numbers below with Sage, and, interestingly, the difference above for all of them were about $d(n) - 2$. 23094729347; 230420938471926723762342; 230472093472934872031872039417230847; 3405980328309283044891028712039740123749785745; 247201834719875878478574793470370189370982703742756647647676761. – user152634 Jun 4 '14 at 1:27

The number of divisors is usually so small that it doesn't make a difference, so the records are usually the highly abundant numbers, A002093 in the OEIS.

As an example, the $10^4$-th highly abundant number is $N=7442466942548913946301030400=2^{13}\cdot3^4\cdot5^2\cdot7^2\cdot11\cdot13\cdot17\cdot19\cdot23\cdot29\cdot31\cdot37\cdot41\cdot43\cdot47\cdot53\cdot59$ which has 5160960 divisors summing to 53306653535048357847760896000.

If you restrict to squarefree numbers only, then Will's answer is spot on: you can't do better than primorials.