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.

A365960 Sum of the 6 nearest neighbors of n in a hexagonal spiral with positive integers.

Original entry on oeis.org

27, 38, 40, 48, 56, 64, 54, 78, 86, 72, 100, 84, 114, 96, 128, 108, 142, 120, 126, 162, 138, 176, 150, 156, 196, 168, 174, 216, 186, 192, 236, 204, 210, 256, 222, 228, 234, 282, 246, 252, 302, 264, 270, 276, 328, 288, 294, 300, 354, 312, 318, 324, 380, 336, 342, 348, 406, 360, 366, 372, 378, 438, 390, 396, 402
Offset: 1

Views

Author

Keywords

Examples

			Spiral begins:
                  49--48--47--46--45
                  /                 \
                50  28--27--26--25  44
                /   /             \   \
              51  29  13--12--11  24  43
              /   /   /         \   \   \
            52  30  14   4---3  10  23  42
            /   /   /   /     \   \   \   \
          53  31  15   5   1---2   9  22  41
            \   \   \   \         /   /   /
            54  32  16   6---7---8  21  40
              \   \   \             /   /
               55  33  17--18--19--20  39
                \   \                 /
                56  34--35--36--37--38
                  \
                  57--58--59--60--61
.
The 6 nearest neighbors of 2 are 1,3,7,8,9,10. Their sum is a(2)=38.
		

Crossrefs

Programs

  • Mathematica
    step=9; ta[x_]:=Table[12,x];f=Flatten[Table[Table[{ta[If[m==2,k-1,k]],16+2m+12k},{m,6}],{k,0,step}]][[3;;]];Join[{27,38},f+6Range[3,Length@f+2]]