cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A229214 If 1, 2, and 3 represent the three 2D vectors (1,0), (0.5,sqrt(3)/2) and (-0.5,sqrt(3)/2) and -1, -2 and -3 are the negation of these vectors, then this sequence represents the Gosper flowsnake.

This page as a plain text file.
%I A229214 #32 Jun 12 2024 09:40:02
%S A229214 1,2,-1,3,1,1,-3,1,2,2,-1,-2,3,2,3,-1,-1,-3,1,-2,-1,3,-1,-3,-2,3,3,2,
%T A229214 1,2,-1,3,1,1,-3,1,2,-1,3,1,1,-3,-2,-3,-3,2,3,1,-3,1,2,-1,3,1,1,-3,1,
%U A229214 2,2,-1,-2,3,2,1,2,2,-1,-2,3,2,3,-1,-1,-3,1,-2,-1,-2,-3,2,1,-2,-2,-1
%N A229214 If 1, 2, and 3 represent the three 2D vectors (1,0), (0.5,sqrt(3)/2) and (-0.5,sqrt(3)/2) and -1, -2 and -3 are the negation of these vectors, then this sequence represents the Gosper flowsnake.
%C A229214 The sequence is generated by the rewriting rules:
%C A229214 P(1) = 1,2,-1,3,1,1,-3;
%C A229214 P(2) = 1,2,2,-1,-2,3,2 and
%C A229214 P(3) = 3,-1,-3,-2,3,3,2;
%C A229214 P(-x) = reverse(-P(x)) for x=1,2,3, so
%C A229214 P(-1) = 3,-1,-1,-3,1,-2,-1,
%C A229214 P(-2) = -2,-3,2,1,-2,-2,-1, and
%C A229214 P(-3) = -2,-3,-3,2,3,1,-3.
%C A229214 The start is 1.
%H A229214 Paolo Xausa, <a href="/A229214/b229214.txt">Table of n, a(n) for n = 1..16807</a>
%H A229214 Arie Bos, <a href="http://arxiv.org/abs/1210.7123">Index notation of grid graphs</a>, arXiv:1210.7123 [cs.CG], 2012.
%H A229214 Wikipedia, <a href="http://en.wikipedia.org/wiki/Gosper_curve">Gosper curve</a>
%e A229214 Start with 1, you get in the first step 1, 2, -1, 3, 1, 1, -3,
%e A229214 and in the 2nd step 1, 2, -1, 3, 1, 1, -3, 1, 2, 2, -1, -2, 3, 2, 3, -1, -1, -3, 1, -2, -1, 3, -1, -3, -2, 3, 3, 2, 1, 2, -1, 3, 1, 1, -3, 1, 2, -1, 3, 1, 1, -3, -2, -3, -3, 2, 3, 1, -3
%e A229214 and with each step the length increases by a factor 7.
%t A229214 With[{p = {{1,2,-1,3,1,1,-3}, {1,2,2,-1,-2,3,2}, {3,-1,-3,-2,3,3,2}}}, SubstitutionSystem[{t_/; t > 0 :> p[[t]], t_ :> -Reverse[p[[-t]]]}, {1}, {3}][[1]]] (* _Paolo Xausa_, Jun 12 2024 *)
%o A229214 (PARI) A229214(n,P=[[1,2,-1,3,1,1,-3],[1,2,2,-1,-2,3,2],[3,-1,-3,-2,3,3,2]],a=P[1])={while(#a<n,a=concat(apply(i->if(i<0,-Vecrev(P[-i]),P[i]),a)));a} \\ _M. F. Hasler_, Aug 06 2015
%Y A229214 Cf. A261180 (as 0..5).  Coordinates: A334485, A334486.
%Y A229214 Cf. A229215 (Gosper island directions).
%K A229214 easy,sign
%O A229214 1,2
%A A229214 _Arie Bos_, Sep 19 2013
%E A229214 Definition corrected by _Kerry Mitchell_, Aug 06 2015