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.
%I A057828 #32 Mar 26 2025 08:36:03 %S A057828 1,1,1,1,2,1,2,1,2,2,3,1,3,2,2,2,4,1,4,2,3,2,4,1,4,3,4,3,5,1,5,3,4,3, %T A057828 4,2,6,3,4,2,6,2,6,3,3,3,6,2,6,3,5,4,7,3,6,3,5,4,7,2,7,4,4,4,7,3,8,4, %U A057828 6,2,8,3,8,4,5,4,7,3,8,3,6,5,9,2,8,5,6,5,9,2,8,5,6,5,8,3,9,4,6,4,10,3,10,5 %N A057828 Number of perfect squares, k^2, where k^2 <= n and gcd(k,n) = 1. %C A057828 Number of square totatives of n, i.e., number of perfect squares less than n that are coprime to n. - _Michael De Vlieger_, Dec 11 2017 %H A057828 Reinhard Zumkeller, <a href="/A057828/b057828.txt">Table of n, a(n) for n = 1..10000</a> %H A057828 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Totative.html">Totative</a>. %F A057828 a(n) = Sum_{d|n} mu(d)*floor(sqrt(n)/d). - _Ridouane Oudra_, Jan 26 2025 %F A057828 a(n) = Sum_{k=1..floor(sqrt(n))} A054521(n,k). - _Ridouane Oudra_, Mar 25 2025 %e A057828 Only 2 squares, 1 and 9, are <= 14 and relatively prime to 14. So a(14) = 2. %p A057828 with(numtheory): seq(add(mobius(d)*floor(sqrt(n)/d), d in divisors(n)), n=1..100); # _Ridouane Oudra_, Jan 26 2025 %t A057828 Table[Count[Range[Sqrt@ n]^2, _?(CoprimeQ[#, n] &)], {n, 104}] %o A057828 (Haskell) %o A057828 a057828 x = length $ filter ((== 1) . (gcd x)) $ %o A057828 takeWhile (<= x) $ tail a000290_list %o A057828 -- _Reinhard Zumkeller_, Jul 22 2012 %o A057828 (PARI) a(n) = sumdiv(n, d, moebius(d)*(sqrt(n)\d)); \\ _Michel Marcus_, Jan 27 2025 %o A057828 (PARI) a(n,f=factor(n))=my(g=f,d); g[,2]=vectorv(#f~,i,1); d=divisors(g,1); sum(i=1,#d, moebius(d[i][2])*sqrtint(n\d[i][1]^2)) \\ _Charles R Greathouse IV_, Mar 26 2025 %Y A057828 Cf. A000290, A010051, A054521. %K A057828 nonn,look %O A057828 1,5 %A A057828 _Leroy Quet_, Nov 08 2000