login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3
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, 1, 2, -1, 3, 1, 1, -3, 1, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The sequence is generated by the rewriting rules:

P(1) = 1,2,-1,3,1,1,-3;

P(2) = 1,2,2,-1,-2,3,2 and

P(3) = 3,-1,-3,-2,3,3,2;

P(-x) = reverse(-P(x)) for x=1,2,3, so

P(-1) = 3,-1,-1,-3,1,-2,-1,

P(-2) = -2,-3,2,1,-2,-2,-1, and

P(-3) = -2,-3,-3,2,3,1,-3.

The start is 1.

LINKS

Table of n, a(n) for n=1..84.

Arie Bos, Index notation of grid graphs

Wikipedia, Gosper curve

EXAMPLE

Start with 1, you get in the first step 1, 2, -1, 3, 1, 1, -3,

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

and with each step the length increases by a factor 7.

PROG

(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

CROSSREFS

Cf. A229215.

Sequence in context: A300982 A186007 A212623 * A218578 A006346 A244740

Adjacent sequences:  A229211 A229212 A229213 * A229215 A229216 A229217

KEYWORD

easy,sign

AUTHOR

Arie Bos, Sep 19 2013

EXTENSIONS

Definition corrected by Kerry Mitchell, Aug 06 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 16 08:24 EDT 2018. Contains 316259 sequences. (Running on oeis4.)