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.

Previous Showing 21-30 of 81 results. Next

A345436 Represent the ring of Gaussian integers E = {x+y*i: x, y rational integers, i = sqrt(-1)} by the cells of a square grid; number the cells of the grid along a counterclockwise square spiral, with the cells representing the ring identities 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, 2, 4, 6, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 51, 53, 59, 61, 67, 69, 75, 77, 81, 83, 87, 89, 91, 93, 97, 99, 101, 103, 107, 109, 111, 113, 117, 119, 121, 125, 127, 131, 133, 137, 139, 143, 145, 149, 151, 155, 157
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2021

Keywords

Comments

The cell with spiral index m represents the Gaussian integer A174344(m+1) + A274923(m+1) * i. So the set of Gaussian primes is {A174344(a(n)+1) + A274923(a(n)+1) * i : n >= 2}. - Peter Munn, Aug 02 2021
The Gaussian integer z = x+i*y has norm x^2+y^2. There are four units (of norm 1), +-1, +-i. The number of Gaussian integers of norm n is A004018(n).
The norms of the Gaussian primes are listed in A055025, and the number of primes with a given norm is given in A055026.
The successive norms of the Gaussian integers along the square spiral are listed in A336336.

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag; Table 4.2, p. 106.
  • L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
  • 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

Extensions

Name clarified by Peter Munn, Aug 02 2021

A334742 Pascal's spiral: starting with a(1) = 1, proceed in a square spiral, computing each term as the sum of horizontally and vertically adjacent prior terms.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 10, 12, 12, 14, 17, 20, 20, 23, 27, 32, 37, 37, 42, 48, 55, 62, 62, 69, 77, 87, 99, 111, 111, 123, 137, 154, 174, 194, 194, 214, 237, 264, 296, 333, 370, 370, 407, 449, 497, 552, 614, 676, 676, 738, 807, 884, 971, 1070
Offset: 1

Views

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Comments

This is the square spiral analogy of Pascal's triangle thought of as a table read by antidiagonals.

Examples

			Spiral begins:
  111--99--87--77--69--62
                        |
   12--12--10---8---7  62
    |               |   |
   14   2---2---1   7  55
    |   |       |   |   |
   17   3   1---1   6  48
    |   |           |   |
   20   3---4---5---5  42
    |                   |
   20--23--27--32--37--37
a(15) = 10 = 8 + 2, the sum of the cells immediately to the right and below. The term to the left is not included in the sum because it has not yet occurred in the spiral.
		

Crossrefs

x- and y-coordinates are given by A174344 and A274923, respectively.

Formula

a(A033638(n)) = a(A002620(n)) for n > 1.

A304586 A linear mapping a(n) = x + d*n of pairs of integers (x,d), where the pairs are enumerated by the counterclockwise square spiral (an axis-parallel number spiral) starting at 0.

Original entry on oeis.org

0, 1, 3, 3, 3, -1, -7, -7, -7, -7, 2, 13, 26, 27, 28, 29, 30, 15, -2, -21, -42, -43, -44, -45, -46, -47, -23, 3, 31, 61, 93, 95, 97, 99, 101, 103, 105, 71, 35, -3, -43, -85, -129, -131, -133, -135, -137, -139, -141, -143, -96, -47, 4, 57, 112, 169, 228, 231, 234, 237, 240, 243
Offset: 0

Views

Author

Hugo Pfoertner, May 16 2018

Keywords

Comments

The sequence is a solution to the riddle described in the comments of A304584 without the restriction of x and d to nonnegative numbers.

Examples

			This is the standard counterclockwise square spiral starting at 0. - _N. J. A. Sloane_, Oct 17 2019
d:
   3 |  36--35--34--33--32--31--30  55
     |   |                       |   |
   2 |  37  16--15--14--13--12  29  54
     |   |   |               |   |   |
   1 |  38  17   4---3---2  11  28  53
     |   |   |   |       |   |   |   |
   0 |  39  18   5   0---1  10  27  52
     |   |   |   |           |   |   |
  -1 |  40  19   6---7---8---9  26  51
     |   |   |                   |   |
  -2 |  41  20--21--22--23--24--25  50
     |   |                           |
  -3 |  42--43--44--45--46--47--48--49
     _________________________________
  x:    -3  -2  -1   0   1   2   3   4
.
a(9) = 2 + 9*(-1) = -7 because the 9th position in the spiral corresponds to x = 2 and d = -1,
a(14) = 0 + 14*2 = 28 because the 14th position in the spiral corresponds to x = 0 and d = 2,
a(25) = 3 + 25*(-2) = -47 because the 25th position in the spiral corresponds to x = 3 and d = -2.
		

Crossrefs

Programs

  • Maple
    square2pair:=proc(sq)local w,k;w:=floor(sqrt(sq));k:=floor(w/2);if modp(sq,2)=0 then return[-k,k];else return[k+1,-k];fi;end:pos2pS:=proc(n)local w,q,Q,e,E,sp;w:=floor(sqrt(n));q := w^2;Q:=(w+1)^2;e:=n-q;E:=Q-n;if eRainer Rosenthal, May 24 2018

Extensions

a(1) and a(2) corrected by Rainer Rosenthal, May 24 2018

A336336 Squared distance from start of a point moving in a square spiral.

Original entry on oeis.org

0, 1, 2, 1, 2, 1, 2, 1, 2, 5, 4, 5, 8, 5, 4, 5, 8, 5, 4, 5, 8, 5, 4, 5, 8, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 13, 10, 9, 10, 13, 18, 25, 20, 17, 16, 17, 20, 25, 32, 25, 20, 17, 16, 17, 20, 25, 32, 25, 20, 17, 16, 17, 20, 25, 32
Offset: 1

Views

Author

Hugo Pfoertner, Jul 18 2020

Keywords

Comments

The terms corresponding to the corner points of the spiral with a(k-1) < a(k) > a(k+1), i.e., 2, 2, 2, 5, 8, 8, 8, 13, 18, 18, 18, ... are given by the sequence A001105(1) repeated 3 times, (A001105(1)+A001105(2))/2, A001105(2) repeated 3 times, (A001105(2)+A001105(3))/2, A001105(3) repeated 3 times, ... .
These numbers are the norms of the Gaussian integers discussed in A345436. - N. J. A. Sloane, Jun 25 2021

Crossrefs

Programs

  • PARI
    A336336(m)={my(v=vectorsmall(m));for(Lstart=0,1,my(L=Lstart,d=1,n=0);for(r=1,oo,d=-d;my(k=floor(r/2)*d); for(j=1,L++,n++;if(n<=m,v[n]+=k*k));forstep(j=k-d,-floor((r+1)/2)*d+d,-d,n++;if(n<=m,v[n]+=j*j));if(n>m,break)));v};
    A336336(73)

Formula

a(n) = A174344(n)^2 + A268038(n)^2 = A174344(n)^2 + A274923(n)^2.

A180714 Sum of the x- and y-coordinates of a point moving in a clockwise spiral.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A spiral on the simple square grid is constructed starting at (0,0) and walking in the closest self-avoiding clockwise loop: up 1 unit, right 1 unit, down 2 units, left 2 units, up 3 units etc. The step widths in the x-coordinate are 0, 1, 0, -2, 0, 3, ... a signed version of A142150; the step widths in the y-coordinate are 1, 0, -2, 0, 3, ... The x-coordinate after n steps (n>=0) is a signed variant of A002265(n+3), namely 0, 0, 1, 1, -1, -1, 2, 2, -2, -2, 3, ...; the y-coordinate after n steps is 0, 1, 1, -1, -1, 2, 2, ... (n >= 0). The sum of the x- and y-coordinates after n steps (at corners of the spiral) is c(n) = 0, 1, 2, 0, -2, 1, 4, 0, -4, 1, 6, 0, -6, 1, 8, 0, ..., with g.f. -x*(1+x)/( (x-1)*(x^2+1)^2). The current sequence is obtained by recording the sum of the two coordinates at all intermediate positions walking with a stride of 1 along the edges of the spiral, equivalent to showing all interpolating integers between two values of c(n). The first differences a(n+1)-a(n) are two 1's, four -1's, six 1's, eight -1's etc., blocks of +1 and -1 with run lengths increasing by 2. - R. J. Mathar, Jan 22 2011

Examples

			Spiral begins at x=0, y=0, then moves up-right-down-left-up-right-...
a(0)=0+0=0, a(1)=1+0=1, a(2)=1+1=2, a(3)=0+1=1, a(4)=-1+1=0, a(5)=-1+0=-1, ...
		

Crossrefs

A340974 The sum of the numbers on straight lines of incrementing length n when drawn over numbers of the square spiral, where each line contains numbers which sum to the minimum possible value, and each number on the spiral can only be in one line. If two or more lines exist with the same sum the one containing the smallest number is chosen.

Original entry on oeis.org

1, 5, 18, 46, 95, 171, 238, 372, 549, 775, 1056, 1398, 1807, 2289, 2850, 3482, 3940, 4539, 5525, 6384, 7225, 8263, 9159, 10864, 12032, 13881, 15453, 17094, 18862, 20339, 22758, 25122, 27567, 30605, 33060, 36836, 39285, 43277, 45310, 48850, 53337, 56889, 62264, 65812, 72139, 77531, 81325
Offset: 0

Views

Author

Scott R. Shannon, Feb 01 2021

Keywords

Comments

The upper and left segments of the spiral contain most of the lines, with the bottom segment containing significantly fewer. Up to 500 lines the only two in the right segment are a(1) = 5 and a(3) = 46. It is unknown if any more appear. The list of numbers that are definitely never covered starts 4,8,9,14,15,16. Whether the next lowest are 38,39,40,... or 27,28,29,... is currently unknown as that is dependent on the existence of further vertical or horizontal lines in the right segment.
Up to 500 lines the only occurrence of two lines with the same sum is a(5) = 171. See the examples below. In this instance if the line with the higher numbers is instead chosen then the value for a(6) becomes 273 but otherwise all other lines and sums are identical to the current sequence.

Examples

			The square spiral used is:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(0) = 1 as a line of length 0 covers the number 1, which is the minimum possible value.
a(1) = 5 as a line of length 1 is drawn over numbers 2 and 3, which sum to 5. This is the minimum possible sum for such a line which does not use the previously covered number 1.
a(2) = 18 as a line of length 2 is drawn over numbers 5,6,7, which sum to 18. This is the minimum possible sum for such a line which does not use the previously covered numbers 1,2,3.
a(5) = 171 as a line of length 5 is drawn over numbers 22,23,24,25,26,51, which sum to 171. A straight line of length 5 can also be drawn over the uncovered numbers 26,27,28,29,30,31 which also sums to 171, but as the former contains 22, the smallest number of these sets, that is the line chosen. This is the only instance in the first 500 lines where two lines exist with the same sum.
		

Crossrefs

A341160 The sum of the numbers inside the squares of incrementing size n x n when the square spiral is tiled with these squares, where each tile contains numbers which sum to the minimum possible value, and each number on the spiral can only be in one tile.

Original entry on oeis.org

1, 28, 180, 622, 1910, 3880, 8162, 17592, 28600, 45380, 79376, 122592, 174889, 223556, 313350, 393912, 604421, 792202, 1089859, 1410896, 1644223, 2120976, 2923991, 3369408, 4002500, 5136496, 6298670, 7476224, 8323935, 9464220, 10653646, 12985600, 17233062, 20321768, 22053045, 27665722
Offset: 1

Views

Author

Scott R. Shannon, Feb 06 2021

Keywords

Comments

See A341327 for the list of the spiral numbers not covered by any square in the tiling.

Examples

			The square spiral used is:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(1) = 1 as a square of size 1 x 1 is placed on the number 1, which is the minimum possible value.
a(2) = 28 as a square of size 2 x 2 is placed such that it covers the numbers 2,3,11,12 which sum to 28. This is the minimum possible sum for such a square which does not use the previously covered number 1.
a(3) = 180 as a square of size 3 x 3 is placed such that it covers numbers 4,5,18,15,16,17,34,35,36 which sum to 180. This is the minimum possible sum for such a square which does not use the previously covered numbers 1,2,3,11,12.
		

Crossrefs

Cf. A341327 (spiral numbers not covered), A340974 (lines), A174344, A274923, A296030, A275161.

A344325 Squares visited on a spirally numbered board when stepping to the closest unvisited square which contains a number that shares no digit with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 48, 79, 80, 49, 26, 51, 84, 125, 83, 50, 81, 52, 86, 53, 28, 11, 27, 85, 126, 87, 54, 29, 30, 55, 88, 129, 56, 31, 58, 93, 57, 90, 131, 89, 130, 92, 135, 94, 137, 95, 60, 33, 14, 32, 59, 13, 62, 35, 16, 34, 15, 36, 17, 38, 67, 104, 66, 37, 64, 99, 100, 65, 102
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, May 15 2021

Keywords

Comments

The sequence is infinite as a number containing all ten decimal digits can never be stepped to thus there will always be a square containing a number which has digits not in the number of the current square.
The pattern of visited squares forms nine closely spaced concentric square rings, while these groups of nine have a larger gap of unvisited squares between them. See the linked images.
In the first one million steps the largest single step distance is ~480 units, from a(572017) = 627194 to a(572018) = 3055000. This is a step that jumps between the inner to most outer group of nine concentric rings. The largest single step difference between numbers is from a(721912) = 6951823 to a(721913) = 4404077, a change of 2547746. The smallest unvisited number in the first one million steps is 12, although the image shows the path revisits squares close to the origin after a large number of steps, so it is possible this and other small numbers will eventually be visited.

Examples

			The board is numbered with the square spiral:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12   29
   |   |       |   |   |
  19   6   1---2  11   28
   |   |           |   |
  20   7---8---9--10   27
   |                   |
  21--22--23--24--25--26
.
a(2) = 2 as from 1 there are four numbers one unit away, 2,4,6,8, none of which contain the digit 1, so of these the smallest is chosen, which is 2.
a(11) = 25 as from the square 10 the square with 25 is only one unit away and shares no digit with 10.
a(20) = 83 as the four squares one unit away from 125 have been visited or contain digits 1,2 or 5. The square with 83 is diagonally adjacent to 125 and is the first time a square more than one unit away is stepped to.
a(23) = 52, and is the first square stepped to that is not adjacent to the previous square, being three units away from 81. All closer squares have been either visited or contain a 1 or 8 in their number.
		

Crossrefs

A344367 Squares visited on a spirally numbered board when stepping to the closest unvisited square that contains a number that shares one or more digits with the number of the current square. If two or more such squares are the same distance away the one with the smaller number is chosen.

Original entry on oeis.org

1, 11, 10, 12, 13, 14, 15, 16, 17, 18, 19, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 3, 23, 22, 21, 20, 40, 41, 42, 43, 44, 45, 46, 47, 24, 25, 26, 27, 28, 29, 2, 52, 51, 50, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 59, 58, 57, 56, 55, 54, 53, 125, 124, 123, 122, 121, 120
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, May 16 2021

Keywords

Examples

			The board is numbered with the square spiral:
.
  17--16--15--14--13   .
   |               |   .
  18   5---4---3  12  29
   |   |       |   |   |
  19   6   1---2  11  28
   |   |           |   |
  20   7---8---9--10  27
   |                   |
  21--22--23--24--25--26
.
a(2) = 11. There are three squares 2 units away from the starting square 1 that also contain the digit 1 - 11, 15, and 19. Of these 11 is the smallest so is the square stepped to.
a(3) = 10. Of the two adjacent squares to 11 that also contain the digit 1 the square 10 is the smallest.
a(4) = 12. This is the only unvisited square within 2 units of a(3) = 10 that also contains the digit 1.
a(12) = 39. This is the only unvisited square within sqrt(2) units of a(11) = 19 that contains either the digit 3 or 9. It is also the first square stepped to that does not share the digit 1 with the previous square.
		

Crossrefs

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
    				
Previous Showing 21-30 of 81 results. Next