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.

A095686 Half the number of divisors of nonsquares (A000037).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 3, 1, 2, 2, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 3, 1, 4, 1, 3, 2, 2, 2, 1, 2, 2, 4, 1, 4, 1, 3, 3, 2, 1, 5, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 3, 2, 4, 1, 3, 2, 4, 1, 6, 1, 2, 3, 3, 2, 4, 1, 5, 2, 1, 6, 2, 2, 2, 4, 1, 6, 2, 3, 2, 2, 2, 6, 1, 3, 3, 1, 4, 1, 4, 4, 2, 1, 6, 1, 4, 2, 5, 1, 4, 2
Offset: 1

Views

Author

Lekraj Beedassy, Jul 05 2004

Keywords

Comments

The first occurrence of n in the sequence corresponds to the nonsquare = A003680(n) = A005179(2n).
Also number of unordered divisor pairs (d,n/d) for n=A000037. - Lekraj Beedassy, Jul 30 2004

Programs

  • Mathematica
    m=11; DivisorSigma[0, Complement[Range[m^2], Range[m]^2]]/2 (* Amiram Eldar, Nov 05 2019 *)
  • PARI
    lista(nn) = {for (i = 1, nn, if (! issquare(i), print1(numdiv(i)/2, ", ")););} \\ Michel Marcus, Jul 27 2013
    
  • Python
    from math import isqrt
    from sympy import divisor_count
    def A095686(n): return divisor_count(n+(k:=isqrt(n))+int(n>k*(k+1)))>>1 # Chai Wah Wu, Jun 05 2025

Formula

a(n)=A000005(A000037(n))/2.

Extensions

Corrected and extended by Ray Chandler, Jul 09 2004