login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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