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.

Showing 1-4 of 4 results.

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

A302433 a(n) is the sum of the nonmiddle divisors of n.

Original entry on oeis.org

0, 2, 4, 5, 6, 7, 8, 13, 10, 18, 12, 21, 14, 24, 16, 27, 18, 36, 20, 33, 32, 36, 24, 50, 26, 42, 40, 45, 30, 61, 32, 59, 48, 54, 36, 85, 38, 60, 56, 77, 42, 83, 44, 84, 64, 72, 48, 110, 50, 88, 72, 98, 54, 105, 72, 105, 80, 90, 60, 152, 62, 96, 88, 119, 84, 127, 68, 126, 96, 127, 72, 172, 74, 114, 124
Offset: 1

Views

Author

Omar E. Pol, Apr 07 2018

Keywords

Comments

The nonmiddle divisors of n are here the divisors of n that are not in the half-open interval [sqrt(n/2), sqrt(n*2)).

Examples

			For n = 12 the divisors of 12 are [1, 2, 3, 4, 6, 12] and the middle divisors of 12 are [3, 4]. The divisors of 12 that are not middle divisors are called here the "nonmiddle" divisors of 12; they are [1, 2, 6, 12] and the sum of them is 1 + 2 + 6 + 12 = 21, so a(12) = 21.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, # &, Or[#^2 < n/2, #^2 >= 2 n] &], {n, 75}] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n) = sumdiv( n, d, d*(d*d= 2*n)); \\ Michel Marcus, Apr 20 2018

Formula

a(n) = A000203(n) - A071090(n).

A375038 Irregular triangle read by rows T(n,k), n >= 2, k >= 1, in which row n lists the nonmiddle divisors of n.

Original entry on oeis.org

2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 4, 8, 1, 9, 1, 2, 5, 10, 1, 11, 1, 2, 6, 12, 1, 13, 1, 2, 7, 14, 1, 15, 1, 2, 8, 16, 1, 17, 1, 2, 6, 9, 18, 1, 19, 1, 2, 10, 20, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 2, 3, 8, 12, 24, 1, 25, 1, 2, 13, 26, 1, 3, 9, 27, 1, 2, 14, 28
Offset: 2

Views

Author

Omar E. Pol, Jul 28 2024

Keywords

Comments

Except the 1, all positive integers have nonmiddle divisors.
The nonmiddle divisors of n are here the divisors of n that are not in the half-open interval [sqrt(n/2), sqrt(n*2)).

Examples

			Triangle begins starting in row n = 2:
  2;
  1, 3;
  1, 4;
  1, 5;
  1, 6;
  1, 7;
  1, 4, 8;
  1, 9;
  1, 2, 5, 10;
  1, 11;
  1, 2, 6, 12;
  ...
For n = 12 the divisors of 12 are [1, 2, 3, 4, 6, 12] and the middle divisors are [3, 4], so the nonmiddle divisors are [1, 2, 6, 12], the same as the row n = 12 of the triangle.
		

Crossrefs

Nonzero terms of A375037.
The sum of row n is A302433(n).
The number of terms in row n is A067743(n).
Column 1 gives A054977.

Programs

  • Mathematica
    row[n_] := Select[Divisors[n], !(Sqrt[n/2] <= # < Sqrt[2*n]) &]; Table[row[n], {n, 2, 28}] // Flatten (* Amiram Eldar, Jul 29 2024 *)

A375037 Irregular triangle read by rows T(n,k), n >= 1, k >= 1, in which row n lists the divisors of n but every middle divisor is replaced with zero.

Original entry on oeis.org

0, 0, 2, 1, 3, 1, 0, 4, 1, 5, 1, 0, 0, 6, 1, 7, 1, 0, 4, 8, 1, 0, 9, 1, 2, 5, 10, 1, 11, 1, 2, 0, 0, 6, 12, 1, 13, 1, 2, 7, 14, 1, 0, 0, 15, 1, 2, 0, 8, 16, 1, 17, 1, 2, 0, 6, 9, 18, 1, 19, 1, 2, 0, 0, 10, 20, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 2, 3, 0, 0, 8, 12, 24
Offset: 1

Views

Author

Omar E. Pol, Jul 28 2024

Keywords

Comments

The nonzero terms in row n are the nonmiddle divisors of n.
The nonmiddle divisors of n are here the divisors of n that are not in the half-open interval [sqrt(n/2), sqrt(n*2)).

Examples

			Triangle begins:
  0;
  0, 2;
  1, 3;
  1, 0, 4;
  1, 5;
  1, 0, 0, 6;
  1, 7;
  1, 0, 4, 8;
  1, 0, 9;
  1, 2, 5, 10;
  1, 11;
  1, 2, 0, 0, 6, 12;
  ...
For n = 12 the divisors of 12 are [1, 2, 3, 4, 6, 12] and the middle divisors are [3, 4], but here the middle divisors are replaced with zeros, so the 12th row of the triangle is [1, 2, 0, 0, 6, 12].
		

Crossrefs

Row sums give A302433.
Nonzero terms give A375038.
Row lengths give A000005.
The number of zeros in row n is A067742(n).
The number of nonzero terms in row n is A067743(n).

Programs

  • Mathematica
    row[n_] := Divisors[n] /. {x_?(Sqrt[n/2] <= # < Sqrt[2*n] &) -> 0}; Table[row[n], {n, 1, 24}] // Flatten (* Amiram Eldar, Jul 29 2024 *)
Showing 1-4 of 4 results.