A274921 Spiral constructed on the nodes of the triangular net in which each new term is the least positive integer distinct from its neighbors.
1, 2, 3, 2, 3, 2, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 3, 2, 1, 2, 3, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 3, 2, 1, 3, 2, 3, 1, 2, 3, 1, 3, 2, 1, 3, 1, 2, 3, 1, 2, 1, 3, 2, 1, 3, 1, 2, 3, 1, 2, 1, 3, 2, 1, 3, 1, 2, 3, 1, 2, 3, 2, 1, 3, 2, 1, 2, 3, 1, 2, 3, 1, 3, 2, 1
Offset: 0
Keywords
Examples
Illustration of initial terms as a spiral: . . 3 - 1 - 2 - 3 - 1 - 2 . / \ . 1 2 - 3 - 1 - 2 - 3 1 . / / \ \ . 2 3 1 - 2 - 3 - 1 2 3 . / / / \ \ \ . 3 1 2 3 - 1 - 2 3 1 2 . / / / / \ \ \ \ . 1 2 3 1 2 - 3 1 2 3 1 . / / / / / \ \ \ \ \ . 2 3 1 2 3 1 - 2 3 1 2 3 . \ \ \ \ \ / / / / . 1 2 3 1 2 - 3 - 1 2 3 1 . \ \ \ \ / / / . 3 1 2 3 - 1 - 2 - 3 1 2 . \ \ \ / / . 2 3 1 - 2 - 3 - 1 - 2 3 . \ \ / . 1 2 - 3 - 1 - 2 - 3 - 1 . \ . 3 - 1 - 2 - 3 - 1 - 2 .
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Programs
-
Maple
A[0]:= 1: A[1]:= 2: A[2]:= 3: b:= 3: c:= 2: d:= 2: e:= 1: f:= 1: for n from 3 to 200 do if n = b then r:= b; b:= c + d - f + 1; f:= e; e:= d; d:= c; c:= r; A[n]:= A[n-2]; else A[n]:= 6 - A[n-1] - A[n-2]; fi od: seq(A[i],i=0..200); # Robert Israel, Sep 15 2017
Formula
a(n) = A274920(n) + 1.
Comments