login
A375349
a(n) is the parity of the n-th cubefree number.
1
1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0
OFFSET
1
LINKS
FORMULA
a(n) = A004709(n) mod 2 = A000035(A004709(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4/7.
In general, the asymptotic mean of the parity of the k-free numbers is 2^(k-1)/(2^k - 1).
MATHEMATICA
cubeFreeQ[n_] := Max[FactorInteger[n][[;; , 2]]] < 3; Mod[Select[Range[200], cubeFreeQ], 2]
PROG
(PARI) lista(kmax) = print1(1, ", "); for(k = 2, kmax, if(vecmax(factor(k)[, 2]) < 3, print1(k % 2, ", ")));
(Python)
from sympy import mobius, integer_nthroot
def A375349(n):
def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x, 3)[0]+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m&1 # Chai Wah Wu, Aug 13 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Aug 12 2024
STATUS
approved