login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008966 a(n) = 1 if n is squarefree, otherwise 0. 286

%I #114 Jan 28 2024 09:09:34

%S 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 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 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 a(n) = 1 if n is squarefree, otherwise 0.

%C 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 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 Daniel Forgues, <a href="/A008966/b008966.txt">Table of n, a(n) for n = 1..100000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MoebiusFunction.html">Moebius Function</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>

%F Dirichlet g.f.: zeta(s)/zeta(2s).

%F a(n) = abs(mu(n)), where mu is the Moebius function (A008683).

%F 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 Multiplicative with p^e -> 0^(e - 1), p prime and e > 0. - _Reinhard Zumkeller_, Jul 15 2003

%F a(n) = 0^(A046951(n) - 1). - _Reinhard Zumkeller_, May 20 2007

%F a(n) = 1 - A107078(n). - _Reinhard Zumkeller_, Oct 03 2008

%F a(n) = floor(rad(n)/n), where rad() is A007947. - _Enrique Pérez Herrero_, Nov 13 2009

%F A175046(n) = a(n)*A073311(n). - _Reinhard Zumkeller_, Apr 05 2010

%F a(n) = floor(A000005(n^2)/A007425(n)). - _Enrique Pérez Herrero_, Apr 15 2010

%F a(A005117(n)) = 1; a(A013929(n)) = 0; a(n) = A013928(n + 1) - A013928(n). - _Reinhard Zumkeller_, Jul 05 2010

%F a(n) * A112526(n) = A063524(n). - _Reinhard Zumkeller_, Sep 16 2011

%F a(n) = mu(n) * lambda(n) = A008836(n) * A008683(n). - _Enrique Pérez Herrero_, Nov 29 2013

%F a(n) = Sum_{d|n} 2^omega(d)*mu(n/d). - _Geoffrey Critzer_, Feb 22 2015

%F a(n) = A085357(A156552(n)). - _Antti Karttunen_, Mar 06 2017

%F Limit_{n->oo} (1/n)*Sum_{j=1..n} a(j) = 6/Pi^2. - _Andres Cicuttin_, Aug 13 2017

%F a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^bigomega(n/d) * a(d). - _Ilya Gutkovskiy_, Mar 10 2021

%p A008966 := proc(n) if numtheory[issqrfree](n) then 1 ; else 0 ; end if; end proc: # _R. J. Mathar_, Mar 14 2011

%t A008966[n_] := Abs[MoebiusMu[n]]; Table[A008966[n], {n, 100}] (* _Enrique Pérez Herrero_, Apr 15 2010 *)

%t Table[If[SquareFreeQ[n],1,0],{n,100}] (* or *) Boole[SquareFreeQ/@ Range[ 100]] (* _Harvey P. Dale_, Feb 28 2015 *)

%o (MuPAD) func(abs(numlib::moebius(n)), n):

%o (Magma) [ Abs(MoebiusMu(n)) : n in [1..100]];

%o (PARI) a(n)=if(n<1,0,direuler(p=2,n,1+X))[n]

%o (PARI) a(n)=issquarefree(n) \\ _Michel Marcus_, Feb 22 2015

%o (Haskell)

%o a008966 = abs . a008683

%o -- _Reinhard Zumkeller_, Dec 13 2015, Dec 15 2014, May 27 2012, Jan 25 2012

%o (Python)

%o from sympy import factorint

%o def A008966(n): return int(max(factorint(n).values(),default=1)==1) # _Chai Wah Wu_, Apr 05 2023

%Y Cf. A005117, A008836 (Dirichlet inverse), A013928 (partial sums).

%Y Cf. A179211, A179212, A179213, A179214, A179215.

%Y Cf. A020639, A073576, A087188.

%Y Cf. A124010, A212793, A085357, A156552.

%Y Parity of A002033.

%Y Cf. A047999, A036987

%Y Cf. A082020 (Dgf at s=2), A157289 (Dgf at s=3), A157290 (Dgf at s=4).

%K easy,nonn,mult

%O 1,1

%A _N. J. A. Sloane_

%E Deleted an unclear comment. - _N. J. A. Sloane_, May 30 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 06:27 EDT 2024. Contains 372020 sequences. (Running on oeis4.)