A000188 (1) Number of solutions to x^2 == 0 (mod n). (2) Also square root of largest square dividing n. (3) Also max_{ d divides n } gcd(d, n/d).
1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 2, 5, 1, 3, 2, 1, 1, 1, 4, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 4, 7, 5, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 3, 8, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 5, 2, 1, 1, 1, 4, 9, 1, 1, 2, 1, 1, 1, 2, 1, 3
Offset: 1
Examples
a(8) = 2 because the largest square dividing 8 is 4, the square root of which is 2. a(9) = 3 because 9 is a perfect square and its square root is 3. a(10) = 1 because 10 is squarefree.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Henry Bottomley, Some Smarandache-type multiplicative sequences.
- Kevin A. Broughan, Restricted divisor sums, preprint.
- Kevin A. Broughan, Restricted divisor sums, Acta Arithmetica, 101(2) (2002), 105-114.
- Kevin A. Broughan, Relationship between the integer conductor and k-th root functions, Int. J. Pure Appl. Math. 5(3) (2003), 253-275.
- Kevin A. Broughan, Relaxations of the ABC Conjecture using integer k'th roots, New Zealand J. Math. 35(2) (2006), 121-136.
- John M. Campbell, An Integral Representation of Kekulé Numbers, and Double Integrals Related to Smarandache Sequences, arXiv preprint arXiv:1105.3399 [math.GM], 2011.
- Steven R. Finch and Pascal Sebah, Squares and Cubes Modulo n, arXiv:math/0604465 [math.NT], 2006-2016.
- Vaclav Kotesovec, Graph - the asymptotic ratio (100000 terms)
- Gerry Myerson, Trifectas in Geometric Progression, Australian Mathematical Society Gazette 35(3) (2008), 189-194
- Andrew Reiter, On (mod n) spirals (2014), and posting to Number Theory Mailing List, Mar 23 2014.
- N. J. A. Sloane, Transforms.
- Florentin Smarandache, Collected Papers, Vol. II, Tempus Publ. Hse, Bucharest, 1996.
- László Tóth, Counting solutions of quadratic congruences in several variables revisited, arXiv preprint arXiv:1404.4214 [math.NT], 2014.
- László Tóth, Counting Solutions of Quadratic Congruences in Several Variables Revisited, J. Int. Seq. 17 (2014), # 14.11.6.
Crossrefs
Cf. A019554 (outer square root), A053150 (inner 3rd root), A019555 (outer 3rd root), A053164 (inner 4th root), A053166 (outer 4th root), A015052 (outer 5th root), A015053 (outer 6th root).
Cf. A000189, A000190, A007947, A008833, A027748, A046951, A055210, A007913, A117811, A124010. For partial sums see A120486.
Cf. A240976 (Dgf at s=2).
Programs
-
Haskell
a000188 n = product $ zipWith (^) (a027748_row n) $ map (`div` 2) (a124010_row n) -- Reinhard Zumkeller, Apr 22 2012
-
Maple
with(numtheory):A000188 := proc(n) local i: RETURN(op(mul(i,i=map(x->x[1]^floor(x[2]/2),ifactors(n)[2])))); end;
-
Mathematica
Array[Function[n, Count[Array[PowerMod[#, 2, n ] &, n, 0 ], 0 ] ], 100] (* Second program: *) nMax = 90; sList = Range[Floor[Sqrt[nMax]]]^2; Sqrt[#] &/@ Table[ Last[ Select[ sList, Divisible[n, #] &]], {n, nMax}] (* Harvey P. Dale, May 11 2011 *) a[n_] := With[{d = Divisors[n]}, Max[GCD[d, Reverse[d]]]] (* Mamuka Jibladze, Feb 15 2015 *) f[p_, e_] := p^Floor[e/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
-
PARI
a(n)=if(n<1,0,sum(i=1,n,i*i%n==0))
-
PARI
a(n)=sqrtint(n/core(n)) \\ Zak Seidov, Apr 07 2009
-
PARI
a(n)=core(n, 1)[2] \\ Michel Marcus, Feb 27 2013
-
Python
from sympy.ntheory.factor_ import core from sympy import integer_nthroot def A000188(n): return integer_nthroot(n//core(n),2)[0] # Chai Wah Wu, Jun 14 2021
Formula
a(n) = Sum_{d^2|n} phi(d), where phi is the Euler totient function A000010.
Multiplicative with a(p^e) = p^floor(e/2). - David W. Wilson, Aug 01 2001
Dirichlet series: Sum_{n >= 1} a(n)/n^s = zeta(2*s - 1)*zeta(s)/zeta(2*s), (Re(s) > 1).
Finch & Sebah show that the average order of a(n) is 3 log n/Pi^2. - Charles R Greathouse IV, Jan 03 2013
a(n) = sqrt(n/A007913(n)). - M. F. Hasler, May 08 2014
Sum_{n>=1} lambda(n)*a(n)*x^n/(1-x^n) = Sum_{n>=1} n*x^(n^2), where lambda() is the Liouville function A008836 (cf. A205801). - Mamuka Jibladze, Feb 15 2015
a(2*n) = a(n)*(A096268(n-1) + 1). - observed by Velin Yanev, Jul 14 2017, The formula says that a(2n) = 2*a(n) only when 2-adic valuation of n (A007814(n)) is odd, otherwise a(2n) = a(n). This follows easily from the definition (2). - Antti Karttunen, Nov 28 2017
Sum_{k=1..n} a(k) ~ 3*n*((log(n) + 3*gamma - 1)/Pi^2 - 12*zeta'(2)/Pi^4), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Dec 01 2020
Conjecture: a(n) = Sum_{k=1..n} A010052(n*k). - Velin Yanev, Jul 04 2021
G.f.: Sum_{k>=1} phi(k) * x^(k^2) / (1 - x^(k^2)). - Ilya Gutkovskiy, Aug 20 2021
Extensions
Edited by M. F. Hasler, May 08 2014
Comments