A055205 Number of nonsquare divisors of n^2.
0, 1, 1, 2, 1, 5, 1, 3, 2, 5, 1, 9, 1, 5, 5, 4, 1, 9, 1, 9, 5, 5, 1, 13, 2, 5, 3, 9, 1, 19, 1, 5, 5, 5, 5, 16, 1, 5, 5, 13, 1, 19, 1, 9, 9, 5, 1, 17, 2, 9, 5, 9, 1, 13, 5, 13, 5, 5, 1, 33, 1, 5, 9, 6, 5, 19, 1, 9, 5, 19, 1, 23, 1, 5, 9, 9, 5, 19, 1, 17, 4, 5, 1, 33, 5, 5, 5, 13, 1, 33, 5, 9, 5, 5, 5
Offset: 1
Examples
n = 8, d(64) = 7 and from the 7 divisors {1,4,16,64} are square and the remaining 3 = a(8). n = 12, d(144) = 15, from which 6 divisors are squares {1,4,9,16,36,144} so a(12) = d(144)-d(12) = 9 a(60) = (number of terms of finite A171425) = 33. [_Reinhard Zumkeller_, Dec 08 2009]
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Programs
-
Haskell
a055205 n = length [d | d <- [1..n^2], n^2 `mod` d == 0, a010052 d == 0] -- Reinhard Zumkeller, Aug 15 2011
-
Mathematica
Table[Count[Divisors[n^2], d_ /; ! IntegerQ[Sqrt[d]]], {n, 1, 95}] (* Jean-François Alcover, Mar 22 2011 *) Table[DivisorSigma[0,n^2]-DivisorSigma[0,n],{n,100}] (* Harvey P. Dale, Sep 02 2017 *)
-
PARI
a(n)=my(f=factor(n)[,2]);prod(i=1,#f,2*f[i]+1)-prod(i=1,#f,f[i]+1) \\ Charles R Greathouse IV, May 02 2013
Formula
a(n) = A000005(n^2)-A000005(n) because the number of square divisors of n^2 equals the number of divisors of n.
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n)^2/2 + c_1 * log(n) + c_2), where c_1 = 3*gamma - 2*zeta'(2)/zeta(2) - zeta(2) - 1 = 0.226634..., c_2 = 3*gamma^2 - (2*gamma - 1)*zeta(2) - 3*gamma_1 + (1 - 3*gamma)*(2*zeta'(2)/zeta(2) + 1) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2) = -0.0529271..., gamma is Euler's constant (A001620), and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Dec 01 2023
Comments