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.

A355480 a(n) is the number of distinct, hexagonal-tiled regions after the n-th step of the walk described in A355478.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Paolo Xausa, Jul 21 2022

Keywords

Comments

See A355478 for additional information and animations.

Examples

			In the following diagrams the walk is shown at the end of the n-th step, together with the position of the bee (*).
.
n     0      1      8        28               60
a(n)  0      0      0         1                2
                                         __
                                      __/ 2\*_
      *      __*   __    __          / 2\__/  \__
                     \     \__       \__/ 2\__   \__
                     /     /  \__       \__/ 2\__/  \__
                     \     \*_   \__       \__/  \__   \__
                     /     / 1\     \            / 1\     \
                     \     \__/   __/            \__/   __/
                     /     /   __/               /   __/
                     \*    \__/                  \__/
.
		

Crossrefs

Programs

  • Mathematica
    A355480[nterms_]:=Module[{a={0},walk={{0,0}},angle=0,cells},Do[AppendTo[walk,AngleVector[Last[walk],angle+=If[PrimeQ[n],-1,1]Pi/3]];cells=FindCycle[Graph[MapApply[UndirectedEdge,Partition[walk,2,1]]],{6},All];AppendTo[a,Length[ConnectedComponents[Graph[Flatten[cells]]]]],{n,nterms-1}];Take[a,nterms]];
    A355480[100]