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

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
OFFSET
1
COMMENTS
This sequence is limit-periodic, thus it is somewhat similar to the Dragon Sequence A014577. Compare g.f. defining relations.
FORMULA
G.f. g(x) satisfies g(x) = x^(-3)*g(x^7) + (x^2 + x^3 + x^7)/(1 - x^7).
From Kevin Ryde, Oct 15 2022: (Start)
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
Cf. A261180 (flowsnake directions), A007093 (base 7).
Sequence in context: A359820 A241979 A200244 * A093692 A254114 A105384
KEYWORD
nonn,easy
AUTHOR
Bradley Klee, Aug 11 2015
STATUS
approved