A335358 a(n) is the X-coordinate of the n-th point of the Koch curve; sequence A335359 gives Y-coordinates.
0, 1, 1, 2, 3, 3, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9, 8, 9, 9, 8, 7, 7, 6, 7, 7, 8, 9, 9, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 26, 27, 27, 26, 25, 25, 24
Offset: 0
Examples
The Koch curve starts (on a hexagonal lattice) as follows: . . . . . . + . . . . . . /8\ . . . . +---+ +---+ . . . . 6\ 7 9 /10 . . . + . + . + . + . . . /2\ /5 \ / \ . +---+ +---+ . . +---+ +---+ . 0 1 3 4 12 13 15 16 Hence, a(4) = a(5) = a(7) = a(8) = 3.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8192
- Artem Litvinov, A study of the Koch polyline, 2021 [in Russian].
- Wikipedia, Koch snowflake
- Index entries for sequences related to coordinates of 2D curves
Programs
-
PARI
{ hex = [1,I,I-1,-1,-I,1-I]; z=0; for (n=0, 72, print1 (real(z)", "); q=digits(n, 4); d=sum(k=1, #q, if (q[k]==1, +1, q[k]==2, -1, 0)); z+=hex[1+d%#hex]) }
Formula
From Andrey Zabolotskiy, Nov 12 2021: (Start)
a(2*n) = a(n) + 2*y(n),
y(2*n) = a(n) - y(n),
where y(k) = A335359(k). See Litvinov, 2021. (End)
Comments