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-7 of 7 results.

A367147 Index of matching grid point in the bijection between two infinite triangular grids with one grid rotated by Pi/6 around the common point (0,0), using an enumeration of the grid points by A307014 and A307016.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 12, 14, 15, 9, 17, 18, 29, 7, 8, 23, 10, 11, 30, 13, 20, 21, 22, 33, 24, 16, 26, 27, 28, 36, 42, 19, 38, 39, 25, 41, 31, 32, 57, 34, 35, 60, 54, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 72, 37, 63, 66, 40, 69, 55, 73, 74, 56, 76, 77, 58, 79, 80, 59
Offset: 0

Views

Author

Klaus Nagel and Hugo Pfoertner, Nov 06 2023

Keywords

Comments

The methods used to achieve a distance-limited bijection of the points of two square grids (see A307110) are applied here to triangular grids. The two grids, which are rotated by 30 degrees = Pi/6 from each other, are assigned the colors red and blue to distinguish them, which are also used in the illustrations. The blue triangular grid is turned clockwise by 15 degrees = Pi/12, all points are lined up on parallel lines with inclination Pi/12 towards the vertical axis. These are called blue lines. The vertical distance between adjacent points is cos(Pi/12). The same is done for the red grid with a CCW rotation of Pi/12. The whole plane is divided into stripes with a width of cos(Pi/12) ~= 0.9659. Every blue line and every red line contains exactly one grid point of its color in each stripe. The blue and red lines alternately intersect the horizontal centerline of a stripe. The distance between two intersections of the same color is d = sqrt(3)/(2*cos(Pi/12)). The bijection maps the section of a blue line in a stripe to the section of the unique red line, that intersects the centerline less than d/2 away. The grid points on these two line sections are the partners of the tile bijection.
While the method described only finds a minimum of the maximum distance of approximately 0.9659 by assigning the bijection partners using tiles, applying the Hopcroft-Karp algorithm to the bipartite graph corresponding to a sufficiently large section of the two infinite grids achieves significantly lower maximum distances. We conjecture that an upper bound for the maximum distance is sqrt(2)/2~=0.7071. See the corresponding link.
A method that reduces the maximal occurring bijection distance to its conjectured minimum, and only requires local rearrangements, as described for the square grids in A307731, is currently not known in the present case of the triangular grids.

Examples

			   n  A307014(n)        Bijection partner
   |  |  A307016(n)     in rotated grid
   |  |  |                          rotated by Pi/6
   |  |  |   x    y     i  j  a(n)   u      v   Distance([x,y],[u,v])
   0  0  0  0.0  0.0    0  0   0    0.0    0.0  0.0
   1  1  0  1.0  0.0    1  0   1    0.866  0.5  0.51764
   2  0  1  0.5  0.866  0  1   2    0.0    1.0  0.51764
   3 -1  1 -0.5  0.866 -1  1   3   -0.866  0.5  0.51764
   4 -1  0 -1.0  0.0   -1  0   4   -0.866 -0.5  0.51764
   5  0 -1 -0.5 -0.866  0 -1   5    0.0   -1.0  0.51764
   6  1 -1  0.5 -0.866  1 -1   6    0.866 -0.5  0.51764
   7  1  1  1.5  0.866  2 -1  12    1.732  0.0  0.89658
   8 -1  2  0.0  1.732  0  2  14    0.0    2.0  0.26795
   9 -2  1 -1.5  0.866 -2  2  15   -1.732  1.0  0.26795
  10 -1 -1 -1.5 -0.866 -2  1   9   -1.732  0.0  0.89658
  11  1 -2  0.0 -1.732  0 -2  17    0.0   -2.0  0.26795
  12  2 -1  1.5 -0.866  2 -2  18    1.732 -1.0  0.26795
  13  2  0  2.0  0.0    3 -2  29    2.598 -0.5  0.77955
  14  0  2  1.0  1.732  1  1   7    0.866  1.5  0.26795
  15 -2  2 -1.0  1.732 -1  2   8   -0.866  1.5  0.26795
		

Crossrefs

Programs

  • PARI
    \\ See linked file; function call to output data:
    a367147(70)

A305575 List points (x,y) having integer coordinates, 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 x-coordinates.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Jun 05 2018

Keywords

Comments

Similar to A283307, but with secondary sorting by polar angle.

Examples

			The first points (listing [polar angle phi,x,y]) are:
r^2
  0: [0.0*Pi,0,0];
  1: [0.0*Pi,1,0], [0.5*Pi,0,1], [1.0*Pi,-1,0], [1.5*Pi,0,-1];
  2: [0.25*Pi,1,1], [0.75*Pi,-1,1], [1.25*Pi,-1,-1], [1.75*Pi,1,-1];
  4: [0.0*Pi,2,0], [0.5*Pi,0,2], [1.0*Pi,-2,0], [1.5*Pi,0,-2];
  5: [0.148*Pi,2,1], [0.352*Pi,1,2], [0.648*Pi,-1,2], [0.852*Pi,-2,1],
   [1.148*Pi,-2,-1], [1.352*Pi,-1,-2], [1.648*Pi,1,-2], [1.852*Pi,2,-1];
  8: [0.25*Pi,2,2], [0.75*Pi,-2,2], [1.25*Pi,-2,-2], [1.75*Pi,2,-2].
		

Crossrefs

For the y-coordinates see A305576.

Programs

  • PARI
    atan2(y,x)=if(x>0,atan(y/x),if(x==0,if(y>0,Pi/2,-Pi/2),if(y>=0,atan(y/x)+Pi,atan(y/x)-Pi)));
    angle(x,y)=(atan2(y,x)+2*Pi)%(2*Pi);
    {a004018(n) = if( n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3)))};
    xyselect=1; \\ change to 2 for A305576
    print1(0,", ");for(s=1,25,my(r=a004018(s));if(r>0,my(v=matrix(r,3),w=vector(r),m=sqrtint(s),L=0);for(i=-m,m,my(k=s-i^2,kk);if(k==0,v[L++,1]=i;v[L,2]=0;v[L,3]=angle(i,0),if(issquare(k),kk=sqrtint(k);forstep(j=-kk,kk,kk+kk,v[L++,1]=i;v[L,2]=j;v[L,3]=angle(i,j)))));p=vecsort(v[,3],,1);for(k=1,L,w[k]=v[p[k],xyselect]);for(k=1,L,print1(w[k],", ")))); \\ Hugo Pfoertner, May 12 2019

A305576 List points (x,y) having integer coordinates, 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 y-coordinates.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Jun 05 2018

Keywords

Comments

Similar to A283308, but with secondary sorting by polar angle.

Examples

			See A305575.
		

Crossrefs

For the x-coordinates see A305575.

Programs

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

A307016 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 second coordinate in a barycentric coordinate system.

Original entry on oeis.org

0, 0, 1, 1, 0, -1, -1, 1, 2, 1, -1, -2, -1, 0, 2, 2, 0, -2, -2, 1, 2, 3, 3, 2, 1, -1, -2, -3, -3, -2, -1, 0, 3, 3, 0, -3, -3, 2, 4, 2, -2, -4, -2, 1, 3, 4, 4, 3, 1, -1, -3, -4, -4, -3, -1, 0, 4, 4, 0, -4, -4, 2, 3, 5, 5, 3, 2, -2, -3, -5, -5, -3, -2, 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 j. i is given in A307014, k is given in A307017.

Crossrefs

Programs

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

A307017 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 third coordinate in a barycentric coordinate system.

Original entry on oeis.org

0, 1, 1, 0, -1, -1, 0, 2, 1, -1, -2, -1, 1, 2, 2, 0, -2, -2, 0, 3, 3, 2, 1, -1, -2, -3, -3, -2, -1, 1, 2, 3, 3, 0, -3, -3, 0, 4, 2, -2, -4, -2, 2, 4, 4, 3, 1, -1, -3, -4, -4, -3, -1, 1, 3, 4, 4, 0, -4, -4, 0, 5, 5, 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 k. i is given in A307014, j is given in A307016.

Crossrefs

A367149 Length of cycles obtained by repeated application of the strip bijection for the triangular lattice (A367147), sorted by increasing minimum radius visited by any cycle of this length.

Original entry on oeis.org

1, 10, 12, 56, 110, 37, 278, 60, 398, 72, 36, 154, 1114, 370, 2336, 168, 614, 444, 516, 1786, 192, 660, 600, 1128, 84, 156, 120, 2952, 492, 1574, 961, 3456, 2100, 10790, 564, 2604, 12110, 10440, 1500, 3924, 4882, 25570, 1668, 16524, 1164, 12876, 9610, 9420, 22906, 7008, 10716
Offset: 1

Views

Author

Hugo Pfoertner, Dec 08 2023

Keywords

Examples

			See the linked file with list of points at minimum radius.
		

Crossrefs

A permutation of A367148.
Cf. A367147.

Programs

  • PARI
    \\ Bijection function Q provided in A367147
    cycle(v, upto=oo)= {my (n=1, w=Q(v)); while (w!=v, n++; if (n>upto,return(0)); w=Q(w)); n};
    \\ upto can be used to ignore longer cycles
    a367149(Points, upto=oo) =
    { my (L=LL=List());
      for (n=1, #Points,
           my (c=cycle(Points[n],upto));
           if (c>0 && setsearch(LL,c)==0,
           \\ deactivate print to mute diagnostic printout
           print ([c, Points[n], sqrt(Points[n][1]^2 + Points[n][2]^2 + Points[n][1] *Points[n][2])]);
           listput(L,c);
           listput(LL,c); listsort(LL,1))
          ); L};
    \\ Function a307014_16 provided in A307014
    \\ Enumeration of grid points of triangular lattice by increasing radius
    Plist = a307014_16(120,-46); \\ creates list of 52218 grid points
    a367149(Plist) \\ all cycles having a point with R < 120 (a(1)-a(28)); takes 2 to 4 minutes
Showing 1-7 of 7 results.