Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #44 Dec 06 2024 07:05:44
%S 0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,0,
%T 0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,
%U 0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,1,0
%N Whether n has non-unitary prime divisors.
%C Also the characteristic function of the numbers that are not squarefree: A013929. - _Enrique Pérez Herrero_, Jul 08 2012
%C The sequence of partial sums of this sequence is A057627. - _Jason Kimberley_, Feb 01 2017
%H Enrique Pérez Herrero, <a href="/A107078/b107078.txt">Table of n, a(n) for n = 1..5000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%F a(n) = 1 if A056170(n)>0, 0 otherwise.
%F a(n) = A107079(n) - A013928(n+1).
%F a(n) = 1 - A008966(n). - _Reinhard Zumkeller_, Oct 03 2008
%F a(n) = Sum_{k=0..n-1} (mu(n-k-1) mod 2) - Sum_{k=0..n-1} (mu(n-k) mod 2).
%F a(n) = abs(mu(n) - (-1)^omega(n)) = (mu(n) - (-1)^omega(n))^2 = abs(A008683(n) - (-1)^A001221(n)). - _Enrique Pérez Herrero_, Apr 28 2012
%F a(n) = 1 - mu(n)^2. - _Enrique Pérez Herrero_, Jul 08 2012
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 - 6/Pi^2 (A229099). - _Amiram Eldar_, Jul 24 2022
%p seq(1 - abs(numtheory:-mobius(n)), n = 1..101); # _Peter Luschny_, Jul 27 2023
%t Table[1-MoebiusMu[n]^2,{n,1,100}] (* _Enrique Pérez Herrero_, Jul 08 2012 *)
%o (Python)
%o from sympy import mobius
%o def A107078(n): return int(not mobius(n)) # _Chai Wah Wu_, Dec 05 2024
%Y Cf. A087049. - _R. J. Mathar_, Aug 24 2008
%Y Cf. A013929, A008683, A008966, A107078, A229099.
%K easy,nonn
%O 1,1
%A _Paul Barry_, May 10 2005