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 A008966 #115 Feb 16 2025 08:32:32 %S A008966 1,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1, %T A008966 1,0,1,1,1,0,1,1,1,0,0,1,1,0,0,0,1,0,1,0,1,0,1,1,1,0,1,1,0,0,1,1,1,0, %U A008966 1,1,1,0,1,1,0,0,1,1,1,0,0,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,0,0,0 %N A008966 a(n) = 1 if n is squarefree, otherwise 0. %C A008966 a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1). %C A008966 The infinite lower triangular matrix with A008966 on the main diagonal and the rest zeros is the square of triangle A143255. - _Gary W. Adamson_, Aug 02 2008 %H A008966 Daniel Forgues, <a href="/A008966/b008966.txt">Table of n, a(n) for n = 1..100000</a> %H A008966 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MoebiusFunction.html">Moebius Function</a> %H A008966 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A008966 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A008966 Dirichlet g.f.: zeta(s)/zeta(2s). %F A008966 a(n) = abs(mu(n)), where mu is the Moebius function (A008683). %F A008966 a(n) = 0^(bigomega(n) - omega(n)), where bigomega(n) and omega(n) are the numbers of prime factors of n with and without repetition (A001222, A001221, A046660). - _Reinhard Zumkeller_, Apr 05 2003 %F A008966 Multiplicative with p^e -> 0^(e - 1), p prime and e > 0. - _Reinhard Zumkeller_, Jul 15 2003 %F A008966 a(n) = 0^(A046951(n) - 1). - _Reinhard Zumkeller_, May 20 2007 %F A008966 a(n) = 1 - A107078(n). - _Reinhard Zumkeller_, Oct 03 2008 %F A008966 a(n) = floor(rad(n)/n), where rad() is A007947. - _Enrique Pérez Herrero_, Nov 13 2009 %F A008966 A175046(n) = a(n)*A073311(n). - _Reinhard Zumkeller_, Apr 05 2010 %F A008966 a(n) = floor(A000005(n^2)/A007425(n)). - _Enrique Pérez Herrero_, Apr 15 2010 %F A008966 a(A005117(n)) = 1; a(A013929(n)) = 0; a(n) = A013928(n + 1) - A013928(n). - _Reinhard Zumkeller_, Jul 05 2010 %F A008966 a(n) * A112526(n) = A063524(n). - _Reinhard Zumkeller_, Sep 16 2011 %F A008966 a(n) = mu(n) * lambda(n) = A008836(n) * A008683(n). - _Enrique Pérez Herrero_, Nov 29 2013 %F A008966 a(n) = Sum_{d|n} 2^omega(d)*mu(n/d). - _Geoffrey Critzer_, Feb 22 2015 %F A008966 a(n) = A085357(A156552(n)). - _Antti Karttunen_, Mar 06 2017 %F A008966 Limit_{n->oo} (1/n)*Sum_{j=1..n} a(j) = 6/Pi^2. - _Andres Cicuttin_, Aug 13 2017 %F A008966 a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^bigomega(n/d) * a(d). - _Ilya Gutkovskiy_, Mar 10 2021 %p A008966 A008966 := proc(n) if numtheory[issqrfree](n) then 1 ; else 0 ; end if; end proc: # _R. J. Mathar_, Mar 14 2011 %t A008966 A008966[n_] := Abs[MoebiusMu[n]]; Table[A008966[n], {n, 100}] (* _Enrique Pérez Herrero_, Apr 15 2010 *) %t A008966 Table[If[SquareFreeQ[n],1,0],{n,100}] (* or *) Boole[SquareFreeQ/@ Range[ 100]] (* _Harvey P. Dale_, Feb 28 2015 *) %o A008966 (MuPAD) func(abs(numlib::moebius(n)), n): %o A008966 (Magma) [ Abs(MoebiusMu(n)) : n in [1..100]]; %o A008966 (PARI) a(n)=if(n<1,0,direuler(p=2,n,1+X))[n] %o A008966 (PARI) a(n)=issquarefree(n) \\ _Michel Marcus_, Feb 22 2015 %o A008966 (Haskell) %o A008966 a008966 = abs . a008683 %o A008966 -- _Reinhard Zumkeller_, Dec 13 2015, Dec 15 2014, May 27 2012, Jan 25 2012 %o A008966 (Python) %o A008966 from sympy import factorint %o A008966 def A008966(n): return int(max(factorint(n).values(),default=1)==1) # _Chai Wah Wu_, Apr 05 2023 %Y A008966 Cf. A005117, A008836 (Dirichlet inverse), A013928 (partial sums). %Y A008966 Cf. A179211, A179212, A179213, A179214, A179215. %Y A008966 Cf. A020639, A073576, A087188. %Y A008966 Cf. A124010, A212793, A085357, A156552. %Y A008966 Parity of A002033. %Y A008966 Cf. A047999, A036987 %Y A008966 Cf. A082020 (Dgf at s=2), A157289 (Dgf at s=3), A157290 (Dgf at s=4). %K A008966 easy,nonn,mult %O A008966 1,1 %A A008966 _N. J. A. Sloane_ %E A008966 Deleted an unclear comment. - _N. J. A. Sloane_, May 30 2021