login
A072629
Parity of n*floor(log n).
2
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,1
COMMENTS
a(n)=1 for n: 3, 5, 7, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 149, 151, .... - Robert G. Wilson v, Feb 01 2015
FORMULA
a(n) = n*floor(log(n)) mod 2.
EXAMPLE
Parity either alternates or it is steadily 0. Intervals of such kind also change and return: 01010...0000....0101.., etc.
MATHEMATICA
f[n_] := Mod[n*Floor@ Log@ n, 2]; Array[f, 105] (* Robert G. Wilson v, Feb 01 2015 *)
PROG
(PARI) a(n) = (log(n)\1*n)%2; \\ Charles R Greathouse IV, Sep 04 2015, corrected by Antti Karttunen, Feb 06 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 28 2002
STATUS
approved