A065251 Simple quasi-periodic sequence consisting of the terms 1, 0 and -1.
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
Keywords
Links
- A. Karttunen, Conjecture regarding A065249 and A065251
Programs
-
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 *)
Formula
a(n) = 1-((n-2^[log_2(n)]) mod 3)