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

A065251
Simple quasi-periodic sequence consisting of the terms 1, 0 and -1.
5
1, 1, 0, 1, 0, -1, 1, 1, 0, -1, 1, 0, -1, 1, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0, -1, 1, 0
OFFSET
1,1
FORMULA
a(n) = 1-((n-2^[log_2(n)]) mod 3)
MAPLE
[seq(A065251(j), j=1..120)]; A065251 := n -> 1-((n-2^floor_log_2(n)) mod 3);
MATHEMATICA
Table[1-Mod[n-2^Floor[Log[2, n]], 3], {n, 110}] (* Harvey P. Dale, Dec 25 2017 *)
CROSSREFS
The same sequence modulo 3: A065252. Cf. A065249.
Sequence in context: A285518 A093719 A153778 * A039982 A267349 A254651
KEYWORD
sign
AUTHOR
Antti Karttunen, Oct 25 2001
STATUS
approved