A072629 Parity of n*floor(log n).
0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Keywords
Examples
Parity either alternates or it is steadily 0. Intervals of such kind also change and return: 01010...0000....0101.., etc.
Links
Programs
-
Mathematica
f[n_] := Mod[n*Floor@ Log@ n, 2]; Array[f, 105] (* Robert G. Wilson v, Feb 01 2015 *)
-
PARI
a(n) = (log(n)\1*n)%2; \\ Charles R Greathouse IV, Sep 04 2015, corrected by Antti Karttunen, Feb 06 2019
Formula
a(n) = n*floor(log(n)) mod 2.
Comments