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.

A335359 a(n) is the Y-coordinate of the n-th point of the Koch curve; sequence A335358 gives X-coordinates.

This page as a plain text file.
%I A335359 #14 Feb 07 2021 09:49:17
%S A335359 0,0,1,0,0,1,2,2,3,2,2,1,0,0,1,0,0,1,2,2,3,4,4,5,6,6,7,6,6,7,8,8,9,8,
%T A335359 8,7,6,6,7,6,6,5,4,4,3,2,2,1,0,0,1,0,0,1,2,2,3,2,2,1,0,0,1,0,0,1,2,2,
%U A335359 3,4,4,5,6,6,7,6,6,7,8,8,9,10,10,11,12
%N A335359 a(n) is the Y-coordinate of the n-th point of the Koch curve; sequence A335358 gives X-coordinates.
%C A335359 Coordinates are given on a hexagonal lattice with X-axis and Y-axis as follows:
%C A335359            Y
%C A335359           /
%C A335359          /
%C A335359         0 ---- X
%H A335359 Rémy Sigrist, <a href="/A335359/b335359.txt">Table of n, a(n) for n = 0..8192</a>
%H A335359 Wikipedia, <a href="https://en.wikipedia.org/wiki/Koch_snowflake">Koch snowflake</a>
%H A335359 <a href="/index/Con#coordinates_2D_curves">Index entries for sequences related to coordinates of 2D curves</a>
%F A335359 a(n) = 0 iff n belongs to A332206.
%e A335359 The Koch curve starts (on a hexagonal lattice) as follows:
%e A335359    .   .   .   .   .   .   +   .   .   .   .   .   .
%e A335359                           /8\
%e A335359      .   .   .   .   +---+   +---+   .   .   .   .
%e A335359                      6\  7   9  /10
%e A335359    .   .   .   +   .   +   .   +   .   +   .   .   .
%e A335359               /2\     /5        \     / \
%e A335359      .   +---+   +---+   .   .   +---+   +---+   .
%e A335359          0   1   3   4           12  13  15  16
%e A335359 Hence, a(6) = a(7) = a(9) = a(10) = 2.
%o A335359 (PARI) { hex = [1,I,I-1,-1,-I,1-I]; z=0; for (n=0, 84, print1 (imag(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]) }
%Y A335359 Cf. A065359, A332206, A335358.
%K A335359 nonn,base
%O A335359 0,7
%A A335359 _Rémy Sigrist_, Jun 03 2020