OFFSET
1
COMMENTS
This sequence is the characteristic function for the integers in A030059.
The cumulative sums of the sequence at a(10^k) for k = 1, 2, ..., 6 are 4, 30, 303, 3053, 30421, 303857.
REFERENCES
P. J. McCarthy, Introduction to Arithmetical Functions, Springer Verlag, 1986, page 227, Exercise 5.9.
LINKS
FORMULA
Dirichlet g.f.: (zeta(s)/zeta(2*s) - 1/zeta(s))/2
a(n) = 1 if n is of the form p_1*p_2*...*p_r for some odd number r, otherwise a(n) = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi^2 (A104141). - Amiram Eldar, Jul 24 2022
EXAMPLE
a(4) = 0 because 4 = 2^2 (the prime factors of n must not have exponents other than 1).
a(30) = 1 because 30 = 2*3*5 (there are an odd number of prime factors).
MATHEMATICA
Table[(Abs[MoebiusMu[n]] - MoebiusMu[n])/2, {n, 1, 100}]
a[n_] := If[MoebiusMu[n] == -1, 1, 0]; Array[a, 100] (* Amiram Eldar, Jul 24 2022 *)
onpQ[n_]:=Module[{c=PrimeNu[n]}, OddQ[c]&&c==PrimeOmega[n]]; Table[If[onpQ[n], 1, 0], {n, 100}] (* Harvey P. Dale, Apr 08 2023 *)
PROG
(PARI) A252233(n) = ((issquarefree(n)-moebius(n))/2); \\ Antti Karttunen, Oct 08 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, Mar 21 2015
STATUS
approved