OFFSET
1,7
COMMENTS
The AND - XOR formulas are just a restatement of the fact that J(-3|n) = J(-1|n)*J(3|n), i.e., that Jacobi-symbol is multiplicative (also) with respect to its upper argument.
LINKS
FORMULA
a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 5 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+5, and 0 otherwise.
Also, for n > 1, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(-3|n) = -1], where J is the Jacobi-symbol.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 28 2017
STATUS
approved