A067742 Number of middle divisors of n, i.e., divisors in the half-open interval [sqrt(n/2), sqrt(n*2)).
1, 1, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 0, 2, 1, 0, 1, 0, 2, 0, 0, 0, 2, 1, 0, 0, 2, 0, 2, 0, 1, 0, 0, 2, 1, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 2, 1, 1, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 2, 1, 0, 2, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 2, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 0, 2, 0
Offset: 1
Examples
a(6)=2 because the 2 middle divisors of 6 (2 and 3) are between sqrt(3) and sqrt(12).
References
- Robin Chapman, Kimmo Eriksson and Richard Stanley, On the Number of Divisors of n in a Special Interval: Problem 10847, Amer. Math. Monthly 108:1 (Jan 2001), p. 77 (Proposal); 109:1 (Jan 2002), p. 80 (Solution). [Please do not delete this reference. - N. J. A. Sloane, Dec 16 2020]
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Robin Chapman, Kimmo Eriksson and Richard Stanley, On the Number of Divisors of n in a Special Interval: Problem 10847, Amer. Math. Monthly 108, (2001), p. 77; solution by Reiner Martin, Amer. Math. Monthly 109, (2002), p. 80.
- M. D. Hirschhorn and P. M. Hirschhorn, Partitions into Consecutive Parts, Mathematics Magazine 78.5 (2005): 396-396.
- Christian Kassel and Christophe Reutenauer, The zeta function of the Hilbert scheme of n points on a two-dimensional torus, arXiv:1505.07229v3 [math.AG], 2015, see page 29 Remarks 6.8(b). [Note that a later version of this paper has a different title and different contents, and the number-theoretical part of the paper was moved to the publication which is next in this list.]
- Christian Kassel and Christophe Reutenauer, Complete determination of the zeta function of the Hilbert scheme of n points on a two-dimensional torus, arXiv:1610.07793 [math.NT], 2016, see Remark 1.3.
- Omar E. Pol, Illustration of initial terms obtained geometrically
- J. E. Vatne, The sequence of middle divisors is unbounded, arXiv:1607.02122 [math.NT], 2016, shows that there is a subsequence diverging to infinity.
Crossrefs
Programs
-
Mathematica
(* number of middle divisors *) a067742[n_] := Select[Divisors[n], Sqrt[n/2] <= # < Sqrt[2n] &] a067742[115] (* data *) (* Hartmut F. W. Hoft, Jul 17 2014 *) a[ n_] := If[ n < 1, 0, DivisorSum[ n, 1 &, n/2 <= #^2 < 2 n &]]; (* Michael Somos, Jun 04 2015 *) (* support function a240542[] is defined in A240542 *) b[n_] := a240542[n] - a240542[n-1] Map[b,Range[105]] (* data - Hartmut F. W. Hoft, Feb 06 2017 *)
-
PARI
A067742(n) = {sumdiv(n, d, d2 = d^2; n / 2 < d2 && d2 <= n << 1)} \\ M. F. Hasler, May 12 2008
-
PARI
a(n) = A067742(n) = {my(d = divisors(n), iu = il = #d \ 2); if(#d <= 2, return(n < 3)); while(d[il]^2 > n>>1, il--); while(d[iu]^2 < (n<<1), iu++); iu - il - 1 + issquare(n/2)} \\ David A. Corneth, Apr 06 2018
-
Python
from sympy import divisors def A067742(n): return sum(1 for d in divisors(n,generator=True) if n <= 2*d**2 < 4*n) # Chai Wah Wu, Jun 09 2022
Formula
G.f.: Sum_{k>=1} (-1)^(k-1)*x^(k*(k+1)/2)/(1-x^k). (This g.f. corresponds to the assertion in Theorem 2.)
Another g.f., corresponding to the definition: Sum_{k>=1} x^(2*k*(k+1))*(1-x^(6*k^2))/(1-x^(2*k)) + Sum_{k>=0} x^((k+1)*(2*k+1))*(1-x^((2*k+1)*(3*k+2)))/(1-x^(2*k+1)). - N. J. A. Sloane, Jan 04 2021
It appears that a(n) = A240542(n) - A240542(n-1), the difference between two adjacent Dyck paths as defined in A237593. - Hartmut F. W. Hoft, Feb 06 2017
The above conjecture is essentially the same as Michel Marcus's conjecture in A237593. - Omar E. Pol, Dec 20 2020
a(n) = A348406(n) - 1. - Omar E. Pol, Oct 29 2021
Extensions
Edited by N. J. A. Sloane, Jan 03 2021
Comments