A095686 Half the number of divisors of nonsquares (A000037).
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
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
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
Extensions
Corrected and extended by Ray Chandler, Jul 09 2004
Comments