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.

Showing 1-9 of 9 results.

A345435 Represent the ring of Eisenstein integers E = {x+y*omega: x, y rational integers, omega = exp(2*Pi*i/3)} by the cells of a hexagonal grid; number the cells of the grid along a counterclockwise hexagonal spiral, with the cells 0, 1 numbered 0, 1. Sequence lists the index numbers of the cells which are 0 or a prime in E.

Original entry on oeis.org

0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 62, 63, 65, 67, 68, 70, 72, 73, 75, 77, 78, 80, 82, 83, 85, 87, 88, 90, 91, 95, 97, 101, 103, 107, 109, 113, 115
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2021

Keywords

Comments

The Eisenstein integer represented by cell m is A307013(m) + A307012(m)*omega. Thus the set of Eisenstein primes is {A307013(a(n)) + A307012(a(n))*omega : n >= 2}. - Peter Munn, Jun 26 2021
The Eisenstein integer a + b*omega has norm a^2 - a*b + b^2 (see A003136). The number of Eisenstein integers of norm n is given by A004016(n).
The norms of the Eisenstein primes are given in A055664, and the number of Eisenstein primes of norm n is given in A055667.
Reid's 1910 book (still in print) is still the best reference for the Eisenstein integers and similar rings.

Examples

			The smallest Eisenstein integers are 0 (of norm 0), and the six units of norm 1, namely (writing w for omega) +-1, +-w, +-w^2.
The first few Eisenstein primes are (here u is any of the six units):
   u*(2+w), norm = 3, number = 6;
   2*u, norm = 4, number = 6;
   u*(3+w), norm = 7, number = 6;
   u*(3+2*w), norm = 7, number = 6 (so there are 12 primes of norm 7 - see A055667).
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag; Table 4.4, p. 111.
  • L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. VI.
  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970; Theorem 8.22 on page 295 lists the nine UFDs of the form Q(sqrt(-d)), cf. A003173.

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, Jun 26 2021

A307012 Second coordinate in a redundant hexagonal coordinate system of the points of a counterclockwise spiral on an hexagonal grid. First and third coordinates are given in A307011 and A345978.

Original entry on oeis.org

0, 0, 1, 1, 0, -1, -1, -1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2, -2, -1, 0, 1, 2, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 4, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 4
Offset: 0

Views

Author

Hugo Pfoertner, Mar 19 2019

Keywords

Comments

The coordinate system can be described using 3 axes that pass through spiral point 0 and one of points 1, 2 or 3. Along each axis, one of the coordinates is 0. a(n) is the signed distance from spiral point n to the axis that passes through point 1. The distance is measured along either of the lines through point n that are parallel to one of the other 2 axes and the sign is such that point 2 has positive distance. - Peter Munn, Jul 13 2021
We can use this coordinate with the first coordinate to form an oblique coordinate system, in which each coordinate maps to an oblique coordinate vector parallel to the axis along which the other coordinate is 0. See the figure with nonperpendicular axes in the Barile link. When both of these coordinates are positive, the oblique coordinate vectors make a 60-degree angle with each other. [Made more specific by Peter Munn, Jul 19 2021]

Crossrefs

Extensions

Name revised by Peter Munn, Jul 08 2021

A307011 First coordinate in a redundant hexagonal coordinate system of the points of a counterclockwise spiral on an hexagonal grid. Second and third coordinates are given in A307012 and A345978.

Original entry on oeis.org

0, 1, 0, -1, -1, 0, 1, 2, 2, 1, 0, -1, -2, -2, -2, -1, 0, 1, 2, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5
Offset: 0

Views

Author

Hugo Pfoertner, Mar 19 2019

Keywords

Comments

From Peter Munn, Jul 22 2021: (Start)
The points of the spiral are equally the points of a hexagonal lattice, the points of an isometric (triangular) grid and the center points of the cells of a honeycomb (regular hexagonal tiling or grid). The coordinate system can be described using 3 axes that pass through spiral point 0 and one of points 1, 2 or 3. Along each axis, one of the coordinates is 0.
a(n) is the signed distance from spiral point n to the axis that passes through point 2. The distance is measured along either of the lines through point n that are parallel to one of the other 2 axes and the sign is such that point 1 has positive distance.
This coordinate can be paired with either of the other coordinates to form oblique coordinates as described in A307012. Alternatively, all 3 coordinates can be used together, symmetrically, as described in A345978.
There is a negated variant of the 3rd coordinate, which is the conventional sense of this coordinate for specifying (with the 2nd coordinate) the Eisenstein integers that can be the points of the spiral when it is embedded in the complex plane. See A307013.
(End)

Crossrefs

Numbers on the spokes of the spiral: A000567, A028896, A033428, A045944, A049450, A049451.
Positions on the spiral that correspond to Eisenstein primes: A345435.

Programs

  • PARI
    r=-1;d=-1;print1(m=0,", ");for(k=0,8,for(j=1,r,print1(s,", "));if(k%2,,m++;r++);for(j=-m,m+1,if(d*j>=-m,print1(s=d*j,", ")));d=-d)

Extensions

Name revised by Peter Munn, Jul 08 2021

A307014 List coordinates (x,y) of the points in an hexagonal grid, sorted first by radial coordinate r and in case of ties, by polar angle 0 <= phi < 2*Pi in a polar coordinate system. Sequence gives the first coordinate in a barycentric coordinate system.

Original entry on oeis.org

0, 1, 0, -1, -1, 0, 1, 1, -1, -2, -1, 1, 2, 2, 0, -2, -2, 0, 2, 2, 1, -1, -2, -3, -3, -2, -1, 1, 2, 3, 3, 3, 0, -3, -3, 0, 3, 2, -2, -4, -2, 2, 4, 3, 1, -1, -3, -4, -4, -3, -1, 1, 3, 4, 4, 4, 0, -4, -4, 0, 4, 3, 2, -2, -3, -5, -5, -3, -2, 2, 3, 5, 5, 4, 1
Offset: 0

Views

Author

Hugo Pfoertner, Mar 21 2019

Keywords

Comments

Cartesian coordinates (x,y) of the grid points are converted to barycentric coordinates (i,j,k) by i = x - y/sqrt(3), j = 2*y/sqrt(3), k = x + y/sqrt(3). The sequence gives i. j is given in A307016, k is given in A307017.
The sorting by polar angle affects the grid points in the shells of size A035019, starting at indices given by A038590.

Crossrefs

Programs

  • PARI
    \\ See Link
    \\ To create the data of this sequence load program from file and call
    a307014_16(5, 4) \\ Hugo Pfoertner, Nov 07 2023

A334492 a(n) is the "real" part of f(n) = Sum_{k>=0, d_k>0} (1+w)^(d_k-1) * (3+w)^k where Sum_{k>=0} d_k * 7^k is the base 7 representation of n and w = -1/2 + sqrt(-3)/2 is a primitive cube root of unity; sequence A334493 gives "w" parts.

Original entry on oeis.org

0, 1, 1, 0, -1, -1, 0, 3, 4, 4, 3, 2, 2, 3, 2, 3, 3, 2, 1, 1, 2, -1, 0, 0, -1, -2, -2, -1, -3, -2, -2, -3, -4, -4, -3, -2, -1, -1, -2, -3, -3, -2, 1, 2, 2, 1, 0, 0, 1, 8, 9, 9, 8, 7, 7, 8, 11, 12, 12, 11, 10, 10, 11, 10, 11, 11, 10, 9, 9, 10, 7, 8, 8, 7, 6, 6
Offset: 0

Views

Author

Rémy Sigrist, May 03 2020

Keywords

Comments

For any Eisenstein integer z = u + v*w (where u and v are integers), we call u the "real" part of z and v the "w" part of z.
This sequence has connections with A316657; here we work with Eisenstein integers, there with Gaussian integers.
It appears that f defines a bijection from the nonnegative integers to the Eisenstein integers.

Examples

			The following diagram depicts f(n) for n = 0..13:
            "w" axis
                \
           .     .     .     .     .     .     .     .
                  \              10     9
                   \
        .     .     .     .     .     .     .     .
                   3 \   2    11     7     8
                      \
           ._____._____._____._____._____._____._____. "real" axis
                4     0 \   1    12    13
                         \
        .     .     .     .     .     .     .     .
                   5     6 \
- f(9) = 4 + 2*w, hence a(9) = 4.
		

Crossrefs

Cf. A307013 (equivalent coordinate for a counterclockwise spiral), A316657, A334493.

Programs

  • PARI
    See Links section.

A345764 Number the tiles of a regular hexagonal tiling from 0 in a spiral. Consider perpendicular axes, X and Y, through the center of tile 0, one of which passes through the center of tile 1. Define a set of equivalence classes of tiles with respect to reflections about X and Y. a(n) is the smallest number of a tile in the same equivalence class as tile n.

Original entry on oeis.org

0, 1, 2, 2, 1, 2, 2, 7, 8, 7, 10, 11, 10, 7, 8, 7, 10, 11, 10, 19, 20, 21, 20, 19, 24, 25, 25, 24, 19, 20, 21, 20, 19, 24, 25, 25, 24, 37, 38, 39, 40, 39, 38, 37, 44, 45, 46, 45, 44, 37, 38, 39, 40, 39, 38, 37, 44, 45, 46, 45, 44, 61, 62, 63, 64, 65, 64, 63, 62, 61
Offset: 0

Views

Author

Peter Munn, Jun 26 2021

Keywords

Comments

The sense of the spiral (clockwise/counterclockwise) and its orientation are not significant, but for the purpose of illustration, we depict a counterclockwise spiral with its first step towards the right side of the page.
Equivalence classes contain a maximum of 4 tiles. This happens when tile m's reflection about axis X is a different tile, m_x, and these 2 tiles' reflections about axis Y are 2 further tiles, m_y and m_xy, to give an equivalence class {m, m_x, m_y, m_xy}. Some equivalence classes are smaller, because a tile is its own reflection about an axis, X or Y, that passes through the center of the tile.
The Wichmann reference describes bijections from certain unique factorization domains to the hexagonal tiling. Align the spiral with the mapping so that domain identities 0 and 1 map to tiles 0 and 1 respectively. If two integers from one of the domains map to tiles in the same equivalence class, then they share the same status as units, primes or composites.

Examples

			Illustration of the relative positions of tiles on the spiral, marking the n-th tile on the spiral by a(n) to denote its equivalence class:
.
.              24 -- 25 -- 25 -- 24
.              /                   \
.             /                     \
.           19    10 -- 11 -- 10    19
.           /     /             \     \
.          /     /               \     \
.        20     7     2 --- 2     7    20
.        /     /     /       \     \     \
.       /     /     /         \     \     \
.     21     8     1     0 --- 1     8    21
.       \     \     \               /     /
.        \     \     \             /     /
.        20     7     2 --- 2 --- 7    20
.          \     \                     /
.           \     \                   /
.           19    10 -- 11 -- 10 -- 19
.             \
.              \
.              24 -- 25 -- 25 -- 24
.
Recall that the underlying tile numbers count steps along the spiral from 0. When we follow the spiral in the illustration above and encounter a number m, which denotes an equivalence class, for the first time, this is also at tile number m.
Tile 1 maps to itself (as does tile 4) when reflected about the axis through the centers of tiles 0 and 1 (horizontal as shown above). Tiles 1 and 4 map to each other when reflected about the perpendicular (vertical) axis. So tiles 1 and 4 form an equivalence class, and the smallest number of a tile in this class is 1. So a(1) = 1 and a(4) = 1.
		

Crossrefs

Formula

a(n) = min({m : |A307012(m)| = |A307012(n)| and |A328818(m)| = |A328818(n)|}).
a(n) = min({m : |A307012(n)| = |A307012(m)| and |2*A307013(n) - A307012(n)| = |2*A307013(m) - A307012(m)|}).

A328818 2 * x-coordinate of the points of a counterclockwise spiral on an hexagonal grid.

Original entry on oeis.org

0, 2, 1, -1, -2, -1, 1, 3, 4, 3, 2, 0, -2, -3, -4, -3, -2, 0, 2, 4, 5, 6, 5, 4, 3, 1, -1, -3, -4, -5, -6, -5, -4, -3, -1, 1, 3, 5, 6, 7, 8, 7, 6, 5, 4, 2, 0, -2, -4, -5, -6, -7, -8, -7, -6, -5, -4, -2, 0, 2, 4, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 3, 1, -1, -3, -5, -6, -7, -8, -9, -10, -9, -8, -7, -6, -5, -3, -1
Offset: 0

Views

Author

Hugo Pfoertner, Oct 28 2019

Keywords

Comments

The Cartesian coordinates of the points of a counterclockwise spiral on an hexagonal grid are given by x(n) = a(n)/2 and by y(n)= A307012(n) * sqrt(3)/2.

Crossrefs

Formula

a(n) = A307011(n) + A307013(n).

A345978 Third coordinate of the points of a counterclockwise spiral on an hexagonal grid in a symmetric redundant hexagonal coordinate system.

Original entry on oeis.org

0, -1, -1, 0, 1, 1, 0, -1, -2, -2, -2, -1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 4, 4, 4, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -5, -5, -5, -5, -5, -4, -3, -2, -1, 0, 1, 2
Offset: 0

Views

Author

Hugo Pfoertner, Jul 15 2021

Keywords

Comments

This is a negated version of A307013 with the advantage of symmetry, i.e., A307011(n) + A307012(n) + a(n) = 0. The mutual angles of the 3 coordinate axes then are 120 or 240 degrees.
From Peter Munn, Jul 18 2021: (Start)
The coordinate system can be described using 3 axes that pass through spiral point 0 and one of points 1, 2 or 3. Along each axis, one of the coordinates is 0. a(n) is the signed distance from spiral point n to the axis that passes through point 3. The distance is measured along either of the lines through point n that are parallel to one of the other 2 axes and the sign is such that point 1 has negative distance.
The coordinates may be used in 2 ways. Firstly, any 2 of the 3 coordinates can be paired as oblique coordinates, which entails mapping each coordinate to a vector that is parallel to the line along which the other coordinate is 0 (described further in A307012). Alternatively, each of the 3 coordinates is mapped to a vector perpendicular to the line along which the coordinate is 0, then the sum of the vectors is divided by the square root of 3.
This coordinate system has been used for more than half a century. See the extract from Moffatt, Pearsall and Wulff included in the linked Princeton MAE page (which refers to a 4th coordinate, making it a 3D system). "Cube coordinates" appears to be a currently popular term for the system in some information technology communities. This refers to the useful isometric view of the cubic cells from a 3 dimensional lattice that are indexed by 3 coordinates that sum to zero.
(End)

References

  • William G Moffatt, George W Pearsall and John Wulff, The Structure and Properties of Materials Volume I: Structure, Wiley, 1964.

Crossrefs

Formula

a(n) = -A307013(n) = -(A307011(n) + A307012(n)).

Extensions

Name revised by Peter Munn, Jul 22 2021

A354947 Number of primes adjacent to prime(n) in a hexagonal spiral of positive integers.

Original entry on oeis.org

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

Views

Author

Wade Reece Eberly, Sep 23 2022

Keywords

Examples

			The spiral begins
      13--12--11
      /         \
    14   4---3  10
    /   /     \   \
  15   5   1---2   9
    \   \         /
    16   6---7---8
      \
      17--18--19--...
For n=4, prime(4) = 7 in the spiral has a(4) = 2 primes adjacent (2 and 19).
		

Crossrefs

Cf. A307011, A307013 (spiral coordinates), A056105 (spiral first spoke).
Showing 1-9 of 9 results.