A229215 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 Gosper's island.
1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2, -1, -2, -3, -2, -3, 1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2, -1, -2, -3, -2, -3, -2, -1, -2, -1, 3, -1, -2, -1, -2, -3, -2, -3, -2, -1, -2, -3, -2, -3, 1, -3, 1, -3, -2, -3, 1, -3, 1, -3, -2, -3, -2
Offset: 1
Examples
Start with 1,2,3,-1,-2,-3 and you get in the first step 1,-3,1,2,1,2,3,2,3,-1,3,-1,-2,-1,-2,-3,-2,-3 and in the second step 1,-3,1,-3,-2,-3,1,-3,1,2,1,2,1,-3, ... ,-1,-2,-3,-2,-3. With each step the length increases by a factor of 3.
Links
- Paolo Xausa, Table of n, a(n) for n = 1..19683
- Arie Bos, Index notation of grid graphs, arXiv:1210.7123 [cs.CG], 2012.
- Wikipedia, Gosper curve
- Index entries for sequences that are fixed points of mappings
Crossrefs
Cf. A229214.
Programs
-
Mathematica
SubstitutionSystem[{t_ :> {{1,-3,1}, {2,1,2}, {3,2,3}}[[Abs[t]]]*Sign[t]}, {1}, {3}][[1]] (* Paolo Xausa, Jun 12 2024 *)
-
PARI
(P(v)=concat(apply(i->[i,i-sign(i)*4^(i*i<2),i],v)));A229215=P(P(P(P([1])))) \\ To get a(n), ceil(log_3(n)) iterations are required. - M. F. Hasler, Aug 06 2015
Extensions
Definition corrected by Kerry Mitchell, Aug 06 2015
Comments