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

A307110 Index of matching grid point in the bijection between two infinite quadratic grids with one grid rotated by Pi/4 around the common point (0,0), using an enumeration of the grid points by A305575 and A305576.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, following a proposal by Rainer Rosenthal, Mar 28 2019

Keywords

Comments

In a discussion in the newsgroup de.sci.mathematik, Klaus Nagel (see links) described a bijection P: G -> H between the grid points of two Cartesian grids G{Z X Z} and H{Z X Z} rotated against each other by Pi/4 around the only common point (0,0). This is a variation of the marriage problem asking for a matching in the infinite bipartite graph of the vertices of G U H with small distance d=|P(g)-g| for all points g in G.
Points within the grids are addressed by (i,j) in grid G and by (k,m) in grid H.
The plane is divided into horizontal strips of width cos(Pi/8) = sqrt(sqrt(2)+2)/2, with the x-axis as centerline of strip 0. Grid G is rotated by Pi/8, grid H by -Pi/8.
Assuming proper boundary conditions, there is exactly one grid point of G per grid line i=const and one grid point of grid H per grid line k=const inside each strip.
The intersections of the grid lines i=const from the rotated grid G and of lines k=const from the rotated grid H with the centerline of the strip are determined. The grid points inside the strip are paired such that the distance of the intersection points of lines i=const of grid G and of lines k=const of grid H with the strip centerline is minimized.
This bijection achieves a maximum of all mutual Euclidean distances of all pairs of cos(Pi/8)=0.9238795... (the strip width).
It is conjectured that the least possible maximum distance within pairs can be reduced to sqrt(5)*sin(Pi/8)=0.855706... (A386241), but not further, and that this can be achieved by "local repairs" of the result of the strip bijection, i.e. by reassigning the connections in groups of 4 pairs, one of which being the pair with d>0.8557... and 3 pairs in the vicinity of the violating pair, but potentially addressing points in neighbor strips. The conjecture is supported by extensive numerical results, but an announced proof by Klaus Nagel remained unpublished.
For the current sequence no repair is applied. The first repairs are required beyond i^2+j^2=40. The affected sequence terms for n>=124 are visible in the b-file of A307731.
The results of the matching are shown by enumerating the grid points of grid G according to the sequence pair A305575(n) for i and A305576(n) for j.
After finding the indices of the bijection partners (k,m) in grid H using Klaus Nagel's method, the position L where A305575(L)=k and A305576(L)=m is determined by table lookups, and the unique result is a(n)=L.
The sequence is a permutation of the natural numbers.

Examples

			The following table shows the first few matched pairs of grid points:
    Grid G     Grid H      Grid H rotated
   n  i  j  a(n) k  m  (k,m) rotated by -Pi/4  distance of matched points
   0  0  0    0  0  0    0.000000  0.000000   0.000000
   1  1  0    1  1  0    0.707107 -0.707107   0.765367
   2  0  1    6 -1  1    0.000000  1.414214   0.414214
   3 -1  0    3 -1  0   -0.707107  0.707107   0.765367
   4  0 -1    8  1 -1    0.000000 -1.414214   0.414214
   5  1  1    2  0  1    0.707107  0.707107   0.414214
   6 -1  1   11 -2  0   -1.414214  1.414214   0.585786
   7 -1 -1    4  0 -1   -0.707107 -0.707107   0.414214
   8  1 -1    9  2  0    1.414214 -1.414214   0.585786
   9  2  0    5  1  1    1.414214  0.000000   0.585786
  10  0  2   15 -1  2    0.707107  2.121320   0.717439
  11 -2  0    7 -1 -1   -1.414214  0.000000   0.585786
  12  0 -2   19  1 -2   -0.707107 -2.121320   0.717439
  13  2  1   14  1  2    2.121320  0.707107   0.317025
		

Crossrefs

Programs

  • PARI
    /* It is assumed that the files a305575 and a305576 contain the second column of the corresponding b-files */
    a305575=readvec(a305575); a305576=readvec(a305576);
    p(i,j)={my(C=cos(Pi/8),S=sin(Pi/8),T=S/C,gx=i*C-j*S,gy=i*S+j*C,k,xm,ym,v=[0,0]);
    k=round(gy/C); ym=C*k; xm=gx+(gy-ym)*T;
      v[1]=round((xm-ym*T)*C);  v[2]=round((ym+v[1]*S)/C);  v}
    findpos(v)={for(k=1,#a305575,if(v[1]==a305575[k]&&v[2]==a305576[k],return(k-1)))}
    for(n=1,67,print1(findpos(p(a305575[n],a305576[n])),", "))

A367150 Results of the strip bijection as described in A307110 with subsequent reassignment of the pair connections at all locations, in which 4 points of a unit square in one grid are mapped to a unit square in the other (rotated by Pi/4) grid in such a way that the maximum distance of the two points in the 4 assigned pairs is minimized.

Original entry on oeis.org

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

Views

Author

Rainer Rosenthal and Hugo Pfoertner, Nov 22 2023

Keywords

Comments

The strip bijection of A307110 assigns each grid point in one grid to a unique grid point in the rotated grid. The mapping therefore corresponds to a permutation of the nonnegative integers. Approximately 2/3 of the grid points are mapped in such a way that 4 points that form a unit square in the original grid also form a unit square after being mapped onto the rotated grid. We call this a stable (grid) cell under the bijection map. The method differs from that used in A307731 in that for each stable cell it is tried whether the maximum of the 4 pair distances resulting from the application of strip bijection can be reduced by a cyclic rotation of the connections. The one of the two assignments by cyclic connection change is selected that provides a smaller maximum of the 4 distances in the pairs assigned to each other. In contrast, a cyclic rotation of the connections is only carried out in the method of A307731 if the maximum of the 4 distances exceeds the upper limit of the bijection distance of sqrt(5)*sin(Pi/8)=0.855706... .

Examples

			   n   i = A305575(n)
   |   |   j = A305576(n)
   |   |   |   A307110(n)
   |   |   |   |  k   m  distance_A307110
   |   |   |   |  |   |    |      a(n)  k'  m' distance after
   |   |   |   |  |   |    |        |   |   |  reconnecting
   0   0   0   0  0   0  0.0000     0   0   0   0.0000
   1   1   0   1  1   0  0.7654 L   5   1   1   0.4142  r
   2   0   1   6 -1   1  0.4142     6  -1   1   0.4142
   3  -1   0   3 -1   0  0.7654 L   7  -1  -1   0.4142  r
   4   0  -1   8  1  -1  0.4142     8   1  -1   0.4142
   5   1   1   2  0   1  0.4142     2   0   1   0.4142
   6  -1   1  11 -2   0  0.5858     3  -1   0   0.4142  r
   7  -1  -1   4  0  -1  0.4142     4   0  -1   0.4142
   8   1  -1   9  2   0  0.5858     1   1   0   0.4142  r
   9   2   0   5  1   1  0.5858    13   2   1   0.7174  r
  10   0   2  15 -1   2  0.7174    15  -1   2   0.7174
  11  -2   0   7 -1  -1  0.5858    17  -2  -1   0.7174  r
  13   2   1                improved by reconnecting
  15  -1   2         L = 0.7654      ->         0.7174
  17  -2  -1
See the linked file for a visualization of the differences from A307110.
		

Crossrefs

Cf. A305575, A305576 (enumeration of the grid points in the square lattice).

Programs

  • PARI
    \\ See Pfoertner link.

A362955 a(n) is the x-coordinate of the n-th point in a square spiral mapped to a square grid rotated by Pi/4 using the distance-limited strip bijection described in A307110.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, May 10 2023

Keywords

Crossrefs

A362956 gives the corresponding y-coordinates.

Programs

  • PARI
    \\ ax(n), ay(n) after Kevin Ryde's functions in A174344 and A274923,
    \\ p(i,j) given in A307110
    ax(n) = {my(m=sqrtint(n), k=ceil(m/2)); n -= 4*k^2; if(n<0, if(n<-m, k, -k-n), if(n
    				

A362956 a(n) is the y-coordinate of the n-th point in a square spiral mapped to a square grid rotated by Pi/4 using the distance-limited strip bijection described in A307110.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, May 10 2023

Keywords

Crossrefs

A362955 gives the corresponding x-coordinates.

Programs

  • PARI
    \\ for functions ax, ay, p see A362955
    for (k=0, 81, print1 (p(ax(k),ay(k))[2]", "))

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)

A386241 Decimal expansion of sqrt(5)*sin(Pi/8).

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner, Jul 18 2025

Keywords

Comments

Upper bound of the wobbling distance S of two rotated square lattices. See A307110 and A307731 for the special case of rotation angle Pi/4. According to Jan Fricke (1999), the angle Pi/4 is the most unfavorable case, i.e., smaller bounds can be found for all other angles.

Examples

			0.8557061686312838477748180718246837073...
		

Crossrefs

Programs

Formula

The minimal polynomial is 8*x^4 - 40*x^2 + 25. - Joerg Arndt, Aug 02 2025
Showing 1-6 of 6 results.