login
Half the number of divisors of nonsquares (A000037).
2

%I #18 Jun 06 2025 00:37:56

%S 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,

%T 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,

%U 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

%N Half the number of divisors of nonsquares (A000037).

%C The first occurrence of n in the sequence corresponds to the nonsquare = A003680(n) = A005179(2n).

%C Also number of unordered divisor pairs (d,n/d) for n=A000037. - _Lekraj Beedassy_, Jul 30 2004

%H Amiram Eldar, <a href="/A095686/b095686.txt">Table of n, a(n) for n = 1..10000</a>

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

%t m=11; DivisorSigma[0, Complement[Range[m^2], Range[m]^2]]/2 (* _Amiram Eldar_, Nov 05 2019 *)

%o (PARI) lista(nn) = {for (i = 1, nn, if (! issquare(i), print1(numdiv(i)/2, ", ")););} \\ _Michel Marcus_, Jul 27 2013

%o (Python)

%o from math import isqrt

%o from sympy import divisor_count

%o def A095686(n): return divisor_count(n+(k:=isqrt(n))+int(n>k*(k+1)))>>1 # _Chai Wah Wu_, Jun 05 2025

%K nonn

%O 1,4

%A _Lekraj Beedassy_, Jul 05 2004

%E Corrected and extended by _Ray Chandler_, Jul 09 2004