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.

A337175 Number of pairs of divisors of n, (d1,d2), such that d1 <= d2 and d1*d2 < n.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 4, 2, 4, 1, 9, 1, 4, 4, 6, 1, 9, 1, 9, 4, 4, 1, 16, 2, 4, 4, 9, 1, 16, 1, 9, 4, 4, 4, 20, 1, 4, 4, 16, 1, 16, 1, 9, 9, 4, 1, 25, 2, 9, 4, 9, 1, 16, 4, 16, 4, 4, 1, 36, 1, 4, 9, 12, 4, 16, 1, 9, 4, 16, 1, 36, 1, 4, 9, 9, 4, 16, 1, 25, 6, 4, 1, 36, 4, 4
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 28 2021

Keywords

Examples

			a(9) = 2; (1,1), (1,3).
a(10) = 4; (1,1), (1,2), (1,5), (2,2).
a(11) = 1; (1,1).
a(12) = 9; (1,1), (1,2), (1,3), (1,4), (1,6), (2,2), (2,3), (2,4), (3,3).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Sign[Floor[i*k/n]]) (1 - Ceiling[n/k] + Floor[n/k]) (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 80}]
    a[n_] := Floor[DivisorSigma[0, n]^2/4]; Array[a, 100] (* Amiram Eldar, Feb 01 2025 *)
  • PARI
    a(n) = numdiv(n)^2\4; \\ Amiram Eldar, Feb 01 2025
  • Python
    from sympy import divisor_count
    def A337175(n):
        return divisor_count(n)**2//4  # Chai Wah Wu, Jan 29 2021
    

Formula

a(n) = Sum_{d1|n, d2|n} (1 - sign(floor(d1*d2/n))).
a(n) = tau^2/4 if tau is even and a(n) = (tau-1)*(tau+1)/4 if tau is odd, where tau = A000005(n) is the number of divisors of n, i.e., a(n) = A002620(A000005(n)) = floor(A000005(n)^2/4). - Chai Wah Wu, Jan 29 2021
a(n) = (A035116(n) - A010052(n))/4. - Ridouane Oudra, May 20 2025
a(n) = A337174(n) - A038548(n). - Ridouane Oudra, May 28 2025