|
|
A261185
|
|
Flowsnake parity pattern: a(n) = (A261180(n) mod 2).
|
|
3
|
|
|
0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
COMMENTS
|
This sequence is limit-periodic, thus it is somewhat similar to the Dragon Sequence A014577. Compare g.f. defining relations.
|
|
LINKS
|
|
|
FORMULA
|
G.f. g(x) satisfies g(x) = x^(-3)*g(x^7) + (x^2 + x^3 + x^7)/(1 - x^7).
Fixed point of the morphism 0 -> 0,1,1,0,0,0,1, 1 -> 0,1,1,1,0,0,1 starting from 0.
a(n) = 1 iff n-1 written in base 7 has its least significant non-3 digit equal to 1 or 2 or 6.
(End)
|
|
MATHEMATICA
|
a[x_ /; IntegerQ[(x + 3)/7]] := a[(x + 3)/7]; MapThread[(a[x_ /; IntegerQ[(x - #1)/7]] := #2) &, {{1, 2, 3, 5, 6, 7}, {0, 1, 1, 0, 0, 1}}]; a /@ Range[7^2]
|
|
PROG
|
(PARI) a(n) = n--; my(r); until(r!=3, [n, r]=divrem(n, 7)); bittest(70, r); \\ Kevin Ryde, Oct 15 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|