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”).

A373550
a(n) is the parity of the n-th squarefree number.
5
1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1
OFFSET
1
LINKS
FORMULA
a(n) = A005117(n) mod 2 = A000035(A005117(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2/3.
MATHEMATICA
Mod[Select[Range[200], SquareFreeQ], 2]
PROG
(PARI) lista(kmax) = for(k = 1, kmax, if(issquarefree(k), print1(k % 2, ", ")));
(Python)
from math import isqrt
from sympy import mobius
def A373550(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m&1 # Chai Wah Wu, Aug 12 2024
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jun 09 2024
STATUS
approved