login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Flowsnake parity pattern: a(n) = (A261180(n) mod 2).
3

%I #27 Oct 15 2022 20:36:15

%S 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,

%T 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,

%U 0,1,0,1,1,1,0,0,1,0,1,1

%N Flowsnake parity pattern: a(n) = (A261180(n) mod 2).

%C This sequence is limit-periodic, thus it is somewhat similar to the Dragon Sequence A014577. Compare g.f. defining relations.

%H Bradley Klee, <a href="/A261185/b261185.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F G.f. g(x) satisfies g(x) = x^(-3)*g(x^7) + (x^2 + x^3 + x^7)/(1 - x^7).

%F From _Kevin Ryde_, Oct 15 2022: (Start)

%F Fixed point of the morphism 0 -> 0,1,1,0,0,0,1, 1 -> 0,1,1,1,0,0,1 starting from 0.

%F a(n) = 1 iff n-1 written in base 7 has its least significant non-3 digit equal to 1 or 2 or 6.

%F (End)

%t 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]

%o (PARI) a(n) = n--; my(r); until(r!=3, [n,r]=divrem(n,7)); bittest(70,r); \\ _Kevin Ryde_, Oct 15 2022

%Y Cf. A261180 (flowsnake directions), A007093 (base 7).

%Y Cf. A014577, A261120.

%K nonn,easy

%O 1

%A _Bradley Klee_, Aug 11 2015