login
A366255
Parity of May code (A303767).
4
0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1
OFFSET
0
FORMULA
a(n) = A000035(A303767(n)).
PROG
(PARI)
A209229(n) = (n && !bitand(n, n-1));
A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); };
A303767(n) = if(!n, n, if(A209229(n), n+A303767(n-1), A053644(n)+A303767(n-A053644(n)-1)));
A366255(n) = (A303767(n)%2);
CROSSREFS
Characteristic function of A366256, whose complement A366257 gives the positions of 0's.
Sequence in context: A292077 A327256 A327177 * A057212 A023959 A341334
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 05 2023
STATUS
approved