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 A368673 #14 Jan 03 2024 11:04:47 %S A368673 0,0,1,1,2,1,4,4,4,3,6,4,7,6,7,9,10,8,11,9,10,11,14,12,14,13,15,13,16, %T A368673 11,18,18,17,18,19,19,22,21,22,22,25,20,27,25,25,26,29,27,29,27,28,28, %U A368673 31,29,30,30,31,32,35,29,36,35,35,37,36,33,40,38,39,36,43 %N A368673 Number of squarefree numbers less than n that do not divide n. %F A368673 a(n) = Sum_{k=1..n} mu(k)^2 * (ceiling(n/k) - floor(n/k)). %F A368673 a(n) = A368642(n) - A064608(n). %e A368673 a(12) = 4 since there are 4 squarefree numbers less than 12 that do not divide 12, namely: 5, 7, 10, and 11. %t A368673 Table[Sum[MoebiusMu[k]^2 (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}] %o A368673 (PARI) a(n) = sum(k=1, n-1, (n % k) && issquarefree(k)); \\ _Michel Marcus_, Jan 03 2024 %o A368673 (Python) %o A368673 from math import isqrt %o A368673 from sympy import factorint, mobius %o A368673 def A368673(n): return sum(mobius(k)*((n-1)//k**2) for k in range(1,isqrt(n-1)+1))-(1<<len(f:=factorint(n)))+int(max(f.values(),default=1)==1) # _Chai Wah Wu_, Jan 03 2024 %Y A368673 Cf. A008683 (mu), A064608, A368642, A368674. %K A368673 nonn,easy %O A368673 1,5 %A A368673 _Wesley Ivan Hurt_, Jan 02 2024