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-10 of 18 results. Next

A367146 Cycle lengths obtained by repeated application of the distance-minimizing variant of the strip bijection for the square lattice described in A367150.

Original entry on oeis.org

1, 8, 12, 24, 25, 56, 120, 152, 154, 200, 217, 376, 464, 568, 616, 1242, 1368, 1624, 1736, 1945, 4376, 4968, 5176, 10682, 13016, 14152, 15560, 17497, 40376, 42728, 46648, 94234, 120664, 125320, 139976, 157465, 367544, 376936, 419896, 840570, 1100760, 1119496, 1259720
Offset: 1

Views

Author

Hugo Pfoertner, Nov 25 2023

Keywords

Comments

See the description in the similar A363760 for more information.

Examples

			a(1) = 1: D(0,0) -> [0,0];
a(2) = 8: [1,0] -> [1,1] -> [0,1] -> [-1,1] -> [-1,0] -> [-1,-1] -> [0,-1] -> [1,-1] -> [1,0];
a(3) = 12: [2,0] -> [2,1] -> [1,2] -> [0,2] -> [-1,2] -> [-2,1] -> [-2,0] -> [-2,-1] -> [-1,-2] -> [0,-2] -> [1,-2] -> [2,-1] -> [2,0].
List of start points and corresponding cycle lengths:
    y   0  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
   x \------------------------------------------------------------------
   0 |  1  8  12   8   8   8   8   8   8  25   8   8   8   8   8  24   8
   1 |  8  8  12   8   8   8   8   8   8 154   8   8   8   8   8  24   8
   2 | 12 12   8   8   8   8   8  25  25 154 154   8   8   8   8   8  24
   3 |  8  8   8   8   8   8  25  25   8   8 154 154 154 154   8   8   8
   4 |  8  8   8   8   8   8   8  25   8   8 154   8   8   8 154   8   8
   5 |  8  8   8   8   8   8   8 154 154 154 154   8   8   8 154   8 152
   6 |  8  8   8   8   8   8   8  25   8   8 154   8   8   8 154 152   8
   7 |  8  8  25  25  25  25 154   8   8   8   8 154 154 154   8 152   8
   8 |  8  8  25   8   8 154   8   8   8   8   8   8   8   8   8 152   8
   9 |154 25 154   8   8 154 154   8   8   8   8   8   8   8   8 152   8
  10 |  8  8 154 154 154 154 154   8   8   8   8  24  24  24   8 152   8
  11 |  8  8   8 154   8   8   8 154   8   8  24   8   8   8  24 152   8
  12 |  8  8   8 154   8   8   8 154   8   8  24   8   8   8  24   8 152
  13 |  8  8   8 154   8   8   8 154   8   8  24   8   8   8  24   8   8
  14 |  8  8   8   8 154 154 154   8   8   8   8  24  24  24   8   8   8
  15 | 24 24   8   8   8   8 152 152 152 152 152 152   8   8   8   8  24
  16 |  8  8  24   8   8 152   8   8   8 152   8   8 152   8   8  24   8
		

Crossrefs

Programs

  • PARI
    \\ It is assumed that the PARI program from A367150 has been loaded and the functions defined there are available.
    cycle(v) = {my (n=1, w=BijectionD(v)); while (w!=v, n++; w=BijectionD(w)); n};
    a367146(rmax=205) = {my (L=List()); for (x=0, rmax, for(y=x, rmax, my(c=cycle([x, y])); if(setsearch(L, c)==0, listput(L, c); listsort(L, 1)))); L};
    a367146() \\ produces terms up to a(18)=1624 in about 5 minutes run time.

A367895 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 variant of the distance-limited strip bijection described in A367150.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner and Rainer Rosenthal, Dec 04 2023

Keywords

Crossrefs

A367896 gives the corresponding y-coordinates.

Programs

  • PARI
    \\ ax(n), ay(n) after Kevin Ryde's functions in A174344 and A274923.
    \\ It is assumed that the PARI program from A367150 has been loaded and the functions defined there are available.
    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
    				

A367896 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 variant of the distance-limited strip bijection described in A367150.

Original entry on oeis.org

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

Views

Author

Hugo Pfoertner and Rainer Rosenthal, Dec 04 2023

Keywords

Crossrefs

A367895 gives the corresponding x-coordinates.

Programs

  • PARI
    \\ See A367895 for definitions of required functions.
    a367896(n) = BijectionD([ax(n), ay(n)])[2]

A368121 A variant of A367150 with application of the distance minimization to an 8-fold symmetrically expanded sector between 0 and Pi/4 of the pair of rotated grids created by the strip bijection of A307110.

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, 56, 49, 70, 82, 72, 73, 84, 75, 76, 86, 78, 79, 88, 69, 71, 103
Offset: 0

Views

Author

Hugo Pfoertner, Jan 05 2024

Keywords

Crossrefs

A305575, A305576 are used for enumeration of the grid points.

Programs

  • PARI
    \\ See Pfoertner link.

A368126 A variant of A367150 with application of the distance minimization to an 8-fold symmetrically expanded sector between Pi/4 and Pi/2 of the pair of rotated grids created by the strip bijection of A307110.

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, 56, 49, 71, 72, 83, 74, 75, 85, 77, 78, 87, 80, 69, 81, 102, 73
Offset: 0

Views

Author

Hugo Pfoertner, Jan 05 2024

Keywords

Crossrefs

A305575, A305576 are used to enumerate the grid points in rings of increasing radius.

Programs

  • PARI
    \\ See Pfoertner link.

A367894 Length of cycles obtained by repeated application of the distance-minimizing strip bijection for the square lattice (A367150), sorted by increasing minimum radius visited by any cycle of this length.

Original entry on oeis.org

1, 8, 12, 25, 154, 24, 152, 56, 376, 217, 120, 1242, 200, 616, 1368, 568, 1624, 1945, 464, 10682, 1736, 4968, 13016, 5176
Offset: 1

Views

Author

Hugo Pfoertner, Dec 12 2023

Keywords

Examples

			See linked file.
		

Crossrefs

A permutation of A367146.

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])),", "))

A307731 Results of strip bijection as described in A307110 with additional application of local repairs to reduce the maximum wobbling distance S from S1=cos(Pi/8) to S2=sqrt(5)*sin(Pi/8).

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, Apr 25 2019

Keywords

Comments

The terms visible in the data section are identical with those of A307110. The first difference occurs at a(124)=141, A307110(124)=125.
The wobbling distance S is the mutual Euclidean distance of the pairs matched by a bijection.
.
- - - G - -\- - - - - - / - G - - - - -\- - - - - G -/- - - - - - - - - G
| + \ / | \ +|/ |
| + \ / | \ + | |
| H | H | |
| / \ | / \ | |
| / \ . . . / |\ |
| / . \ | / . | \ /|
|/ \ | / . | \ / |
/| . \| / . | \ / |
/ | |\ / .| \ / |
H + | . | +H # # # # . H + + |
- \ + G - - - - - - - - - - G+ -\- - - - # # # # #G.- - - - - - -\- -+ +G
\ | . #| \ \ +| . / \ |
\ # | D \ +| / \ |
| \ . # | \ \ +| / \
| \ <--------r=S1------C \ + | ./ |
| \ # | B \ + | / |
| . # | B \ + / |
| .H+ | B H |. |
| / \++ | B / #. |
| / . \++ | B / #| \ |
| / . \+++ | B / . # \ |
- - - G / - - - - - . - \ -+G - - - - -B/ - - . +G - - \ - - - - - - - G
+ / . \ |# / B +E+. | . \ + /
+/ | . # /. +M+ | . \ + / |
+/ | | \# / +E+ b | .\ +/ |
H | | H+ . b | .H |
\ | | / .\ b | / .\ |
\ | / . \ b | / . \ |
\ / | . \ b | / \ |
| \ / | . \ b | / . \
| \ / |. \ b | / |
| \ / |. \ c--------r=S1------>. |
- - - G+++++- \ - / - - - - G.- - - - - - - - - HdG - - - - - - - - -.- G
| ++++H +. / \ . |
| / \ |+ / | \ |
| / \ |+. / | \ . |
| / \ | + / | \ . /
|/ \ | + . / | \ . / |
/ \ + . / | \ . / |
/ | | \ + . | . / |
H | | H . | . H |
\ | | / \ . | . / + |
\ | / \ . / + |
- - - G - - - - - - - - - / G - - - - -\- - - - - G - - - / - - - - - - G
.
The ASCII graphics above shows the situation after the application of the strip bijection, as it is described in A307110, for a position in the grids containing a "long" junction exceeding the length S2. The linked graphics file "Construction of repair" shows a similar configuration, but without labels.
All junctions resulting from the strip bijection are marked by plus signs. The long junction is marked by embedded letters "E". There are 6 possible orientations of E-junctions (called E for short), but the method for their elimination is identical for all cases.
The target of the method is to achieve a local reconnecting, which replaces 4 junctions by circularly shifted new junctions. To determine the affected grid points, the following steps are performed:
From the midpoint (marked by M in the figure) of E construct a bisecting line Bb perpendicular to E. Draw two circles, one on each side of E with centers on B and b at distance S1 from M. E is a tangent at M of these circles with radius r = S1. The two circles are marked by dots ".." in the figure.
For the two circle centers C and c determine the distances D and d of the respective closest grid points in lattice G. The position (c) of the circle center, for which this minimum distance is smaller, indicates on which side of E no reconnecting is required. A circle with radius S1 around c contains only one grid point of G and one of H. All other grid points of both lattices lie outside of this circle.
The side of E with the larger distance between circle center and closest grid point is where the circular shift of junctions is to be performed. The circle around C with radius r = S1 contains 3 grid points of lattice G and 3 grid points of lattice H.
After having found c, it is possible to replace the geometric determination of the 3 grid point pairs on the opposite side of E by a lookup in a table of differences between the coordinates of M and c rounded to nearest integers, leading to a unique identification of the 6 occurring cases. The function "repair" in the PARI program implements this selection.
The 4 new junctions are marked by "###" in the figure. They replace the 4 previous "+++" junctions, including the long junction E. The maximum of their lengths does not exceed S2, approaching S2 for length of E approaching S1. The limiting case for the 4 rearranged junctions are two of length S2 and two of length sin(Pi/8) = 0.38268...
The described repair is applied to all occurrences of bijection distances exceeding S2 within the overlay of the two lattices. Numerical experiments with random points on square lattices of huge size show that approximately 0.956 % (roughly 1/105) of the grid points lead to a bijection distance S > S2 after the application of the strip bijection. No counterexample for the validity of the method is known, but a formal proof is missing.
In the ring-wise one-dimensional mapping of the bijection as given by A307110, the first affected position is n = 124. The table in the example section shows the corresponding changes for this earliest repair together with the listing of another repair with different orientation of E.
All affected index positions have to be exchanged in the one-dimensional list. Due to the occurrence frequency of E-junctions the current sequence is expected to differ from A307110 for roughly 4% of the terms.
The PARI program provided as external file is self-contained, including the code for generation of the rings used for 1d-mapping, A305575 and A305576, and the code for the strip bijection of A307110. To generate a b-file of 10000 terms, the corresponding code lines at the end of the program have to be activated.

Examples

			The table shows the first re-matched pairs of grid points together with the result of the unmodified strip bijection:
    Grid G          Grid H             Grid H rotated
   n     i    j    a(n)   k    m   (k,m) rotated by -Pi/4  distance of
                                                           matched points
  124   -6    2    141   -6   -3    -6.363961   2.121320   0.383648
  140   -6    3    125   -6   -2    -5.656854   2.828427   0.383649
  180   -7    3    173   -7   -2    -6.363961   3.535534   0.831470 < S2
  172   -7    2    181   -7   -3    -7.071068   2.828427   0.831470 < S2
  ...
  266   -6    7    256   -9    1    -5.656854   7.071068   0.350428
  309   -6    8    320  -10    1    -6.363961   7.778174   0.426232
  279   -5    8    328  -10    2    -5.656854   8.485281   0.816673 < S2
  235   -5    7    268   -9    2    -4.949747   7.778174   0.779795 < S2
compared to (unmodified):                                        S2=0.855706..
                A307110(n)
  124   -6    2    125   -6   -2    -5.656854   2.828427   0.896683 > S2
  140   -6    3    173   -7   -2    -6.363961   3.535534   0.647506
  180   -7    3    181   -7   -3    -7.071068   2.828427   0.185709
  172   -7    2    141   -6   -3    -6.363961   2.121320   0.647506
  ...
  266   -6    7    320  -10    1    -6.363961   7.778174   0.859083 > S2
  309   -6    8    328  -10    2    -5.656854   8.485281   0.594346
  279   -5    8    268   -9    2    -4.949747   7.778174   0.227446
  235   -5    7    256   -9    1    -5.656854   7.071068   0.660688
		

Crossrefs

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
    				

A368124 A variant of A367146 with application of the distance minimization to the first of two symmetrized versions of the strip bijection between two square lattices as described in A368121.

Original entry on oeis.org

1, 8, 12, 24, 60, 72, 168, 216, 264, 300, 624, 1560, 1692, 1752, 2232, 4824, 9804, 12456, 13080, 17064, 35040, 57084, 92184, 92952, 123096, 244584, 332652, 639192, 651432, 855240, 1660752
Offset: 1

Views

Author

Hugo Pfoertner, Jan 01 2024

Keywords

Comments

Apparently, a(n) == 0 (mod 4) for n > 1. For cycles, whose lengths are multiples of 8, the visited points form 8 separated islands.
Larger terms are 4293336, 4462104, 5787768, 11050488, 28333080, 38414184, 72397248.

Crossrefs

A368125 is a permutation of this sequence.
A368129 is the analog for the second symmetrized version of the strip bijection.

Programs

  • PARI
    \\ Uses definitions and functions from
    \\ a367150_PARI.txt and a368121_PARI.txt
    cycle(v) = {my (n=1, w=BijectionD(v, BijectionK)); while (w!=v, n++; w=BijectionD(w,BijectionK)); n};
    a368124(rmax=205) = {my (L=List()); for (r2=0, rmax^2, for (x=0, sqrtint(r2), my (y2=r2-x^2,y); if (issquare(y2,&y), if(x>=y, my (c=cycle([x,y])); if (setsearch(L,c)==0, print([c,[x,y],sqrt(x^2+y^2)],", "); listput(L,c); listsort(L,1)))))); L};
    a368124() \\ Terms < 1000
Showing 1-10 of 18 results. Next