cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A067742 Number of middle divisors of n, i.e., divisors in the half-open interval [sqrt(n/2), sqrt(n*2)).

Original entry on oeis.org

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

Views

Author

Marc LeBrun, Jan 29 2002

Keywords

Comments

Comment from N. J. A. Sloane, Jan 03 2021: (Start)
Theorem 1: (i) a(n) = (number of odd divisors of n <= sqrt(2*n)) - (number of odd divisors of n > sqrt(2*n)).
(ii) Let r(n) = A003056(n). Then a(n) = (number of odd divisors of n <= r(n)) - (number of odd divisors of n > r(n)).
(iii) a(n) = Sum_{k=1..r(n)} (-1)^(k+1)*A237048(n,k).
(iv) a(n) is odd iff n is a square or twice a square (cf. A053866). Indices of odd terms give A028982. Indices of even terms give A028983.
The proofs are straightforward. These results were conjectured by Omar E. Pol in 2017. (End)
Theorem 2: a(n) is equal to the difference between the number of partitions of n into an odd number of consecutive parts and the number of partitions of n into an even number of consecutive parts. [Chapman et al., 2001; Hirschhorn and Hirschhorn, 2005]. - Omar E. Pol, Feb 06 2017
From Omar E. Pol, Feb 06 2017: (Start)
Conjecture 1: This is the central column of the isosceles triangle of A249351.
Conjecture 2: a(n) is also the width of the terrace at the n-th level in the main diagonal of the pyramid described in A245092.
Conjecture 3: a(n) is also the number of central subparts of the symmetric representation of sigma(n). For more information see A279387.
Conjectures 2 and 3 were proposed after Michel Marcus's conjecture in A237593. (End)
Conjectures 1, 2, and 3 are all true. - N. J. A. Sloane, Feb 11 2021

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]

Crossrefs

Cf. A001227, A003056, A028982, A028983, A053866, A067743, A071090 (sums of middle divisors), A082647, A128605, A131576.
Cf. also A071561 (positions of zeros), A071562 (positions of nonzeros), A299761 (middle divisors of n), A355143 (products of middle divisors).
Relation to Dyck paths: A237048, A237593, A240542 (partial sums), A245092, A249351, A279387, A348406.

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
a(A128605(n)) = n and a(m) <> n for m < A128605(n). - Reinhard Zumkeller, Mar 14 2007
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
Conjecture: a(n) = A082647(n) - A131576(n) = A001227(n) - 2*A131576(n). - Omar E. Pol, Feb 06 2017
a(n) = A348406(n) - 1. - Omar E. Pol, Oct 29 2021
a(n) = A000005(n) - A067743(n). - Omar E. Pol, Jun 11 2022

Extensions

Edited by N. J. A. Sloane, Jan 03 2021