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 51 results. Next

A274927 Northwest spoke of spiral in A274640.

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 7, 11, 14, 10, 22, 29, 18, 19, 25, 26, 20, 30, 33, 28, 31, 32, 45, 67, 41, 34, 38, 44, 48, 51, 49, 100, 55, 52, 58, 53, 60, 61, 64, 63, 121, 75, 70, 65, 71, 72, 83, 81, 74, 79, 84, 82, 86, 88, 85, 87, 176, 95, 96, 93, 106, 103, 109, 112, 105
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2016

Keywords

Crossrefs

Cf. A274640, A274641. The 8 spokes are A274924-A274931.

Extensions

More terms from Alois P. Heinz, Jul 12 2016

A274929 Southwest spoke of spiral in A274640.

Original entry on oeis.org

1, 4, 6, 5, 14, 10, 11, 23, 16, 18, 21, 24, 19, 29, 46, 44, 30, 31, 58, 36, 33, 43, 41, 39, 40, 79, 78, 83, 47, 91, 57, 62, 56, 54, 61, 63, 59, 66, 115, 65, 73, 72, 75, 76, 131, 144, 92, 84, 81, 71, 82, 87, 164, 100, 172, 106, 104, 174, 179, 182, 105, 101, 191
Offset: 0

Views

Author

N. J. A. Sloane, Jul 12 2016

Keywords

Crossrefs

Cf. A274640, A274641. The 8 spokes are A274924-A274931.

Extensions

More terms from Alois P. Heinz, Jul 12 2016

A308897 Walk a rook along the square spiral numbered 1, 2, 3, ... (cf. A274640); a(n) = mex of earlier values the rook can move to.

Original entry on oeis.org

1, 2, 1, 2, 3, 4, 1, 3, 4, 2, 3, 4, 1, 3, 4, 2, 5, 6, 7, 8, 1, 5, 6, 7, 8, 2, 5, 6, 7, 8, 1, 5, 6, 7, 8, 2, 3, 6, 5, 8, 7, 4, 1, 3, 6, 5, 8, 7, 4, 2, 3, 6, 5, 8, 7, 4, 1, 3, 6, 5, 8, 7, 4, 2, 9, 10, 11, 12, 13, 14, 15, 16, 1, 9, 10, 11, 12, 13, 14, 15, 16, 2
Offset: 1

Views

Author

N. J. A. Sloane, Jul 02 2019

Keywords

Comments

Mex here means "smallest positive missing number".
Add 1 to the terms of A308896.

Crossrefs

Extensions

More terms from Rémy Sigrist, Jul 02 2019

A317186 One of many square spiral sequences: a(n) = n^2 + n - floor((n-1)/2).

Original entry on oeis.org

1, 2, 6, 11, 19, 28, 40, 53, 69, 86, 106, 127, 151, 176, 204, 233, 265, 298, 334, 371, 411, 452, 496, 541, 589, 638, 690, 743, 799, 856, 916, 977, 1041, 1106, 1174, 1243, 1315, 1388, 1464, 1541, 1621, 1702, 1786, 1871, 1959, 2048, 2140, 2233, 2329, 2426
Offset: 0

Views

Author

N. J. A. Sloane, Jul 27 2018

Keywords

Comments

Draw a square spiral on a piece of graph paper, and label the cells starting at the center with the positive (resp. nonnegative) numbers. This produces two versions of the labeled square spiral, shown in the Example section below.
The spiral may proceed clockwise or counterclockwise, and the first arm of the spiral may be along any of the four axes, so there are eight versions of each spiral. However, this has no effect on the resulting sequences, and it is enough to consider just two versions of the square spiral (starting at 1 or starting at 0).
The present sequence is obtained by reading alternate entries on the X-axis (say) of the square spiral started at 1.
The cross-references section lists many sequences that can be read directly off the two spirals. Many other sequences can be obtained from them by using them to extract subsequences from other important sequences. For example, the subsequence of primes indexed by the present sequence gives A317187.
a(n) is also the number of free polyominoes with n + 4 cells whose difference between length and width is n. In this comment the length is the longer of the two dimensions and the width is the shorter of the two dimensions (see the examples of polyominoes). Hence this is also the diagonal 4 of A379625. - Omar E. Pol, Jan 24 2025
From John Mason, Feb 19 2025: (Start)
The sequence enumerates polyominoes of width 2 having precisely 2 horizontal bars. By classifying such polyominoes according to the following templates, it is possible to define a formula that reduces to the one below:
.
OO O O
O OO OO
O O O
O O OO
OO OO O
.
(End)

Examples

			The square spiral when started with 1 begins:
.
  100--99--98--97--96--95--94--93--92--91
                                        |
   65--64--63--62--61--60--59--58--57  90
    |                               |   |
   66  37--36--35--34--33--32--31  56  89
    |   |                       |   |   |
   67  38  17--16--15--14--13  30  55  88
    |   |   |               |   |   |   |
   68  39  18   5---4---3  12  29  54  87
    |   |   |   |       |   |   |   |   |
   69  40  19   6   1---2  11  28  53  86
    |   |   |   |           |   |   |   |
   70  41  20   7---8---9--10  27  52  85
    |   |   |                   |   |   |
   71  42  21--22--23--24--25--26  51  84
    |   |                           |   |
   72  43--44--45--46--47--48--49--50  83
    |                                   |
   73--74--75--76--77--78--79--80--81--82
.
For the square spiral when started with 0, subtract 1 from each entry. In the following diagram this spiral has been reflected and rotated, but of course that makes no difference to the sequences:
.
   99  64--65--66--67--68--69--70--71--72
    |   |                               |
   98  63  36--37--38--39--40--41--42  73
    |   |   |                       |   |
   97  62  35  16--17--18--19--20  43  74
    |   |   |   |               |   |   |
   96  61  34  15   4---5---6  21  44  75
    |   |   |   |   |       |   |   |   |
   95  60  33  14   3   0   7  22  45  76
    |   |   |   |   |   |   |   |   |   |
   94  59  32  13   2---1   8  23  46  77
    |   |   |   |           |   |   |   |
   93  58  31  12--11--10---9  24  47  78
    |   |   |                   |   |   |
   92  57  30--29--28--27--26--25  48  79
    |   |                           |   |
   91  56--55--54--53--52--51--50--49  80
    |                                   |
   90--89--88--87--86--85--84--83--82--81
.
From _Omar E. Pol_, Jan 24 2025: (Start)
For n = 0 there is only one free polyomino with 0 + 4 = 4 cells whose difference between length and width is 0 as shown below, so a(0) = 1.
   _ _
  |_|_|
  |_|_|
.
For n = 1 there are two free polyominoes with 1 + 4 = 5 cells whose difference between length and width is 1 as shown below, so a(1) = 2.
   _ _     _ _
  |_|_|   |_|_|
  |_|_|   |_|_
  |_|     |_|_|
.
(End)
		

Crossrefs

Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Filling in these two squares spirals with greedy algorithm: A274640, A274641.
Cf. also A317187.

Programs

  • Mathematica
    a[n_] := n^2 + n - Floor[(n - 1)/2]; Array[a, 50, 0] (* Robert G. Wilson v, Aug 01 2018 *)
    LinearRecurrence[{2, 0, -2 , 1},{1, 2, 6, 11},50] (* or *)
    CoefficientList[Series[(- x^3 - 2 * x^2 - 1) / ((x - 1)^3 * (x + 1)), {x, 0, 50}], x] (* Stefano Spezia, Sep 02 2018 *)

Formula

From Daniel Forgues, Aug 01 2018: (Start)
a(n) = (1/4) * (4 * n^2 + 2 * n + (-1)^n + 3), n >= 0.
a(0) = 1; a(n) = - a(n-1) + 2 * n^2 - n + 2, n >= 1.
a(0) = 1; a(1) = 2; a(2) = 6; a(3) = 11; a(n) = 2 * a(n-1) - 2 * a(n-3) + a(n-4), n >= 4.
G.f.: (- x^3 - 2 * x^2 - 1) / ((x - 1)^3 * (x + 1)). (End)
E.g.f.: ((2 + 3*x + 2*x^2)*cosh(x) + (1 + 3*x + 2*x^2)*sinh(x))/2. - Stefano Spezia, Apr 24 2024
a(n)+a(n+1)=A033816(n). - R. J. Mathar, Mar 21 2025
a(n)-a(n-1) = A042948(n), n>=1. - R. J. Mathar, Mar 21 2025

A274821 Hexagonal spiral constructed on the nodes of the infinite triangular net in which each term is the least positive integer such that no diagonal contains a repeated term.

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 3, 1, 4, 1, 5, 4, 6, 4, 5, 6, 4, 5, 7, 6, 7, 8, 5, 7, 6, 8, 7, 4, 1, 7, 6, 8, 1, 7, 8, 6, 5, 9, 2, 4, 7, 9, 2, 10, 8, 9, 3, 5, 10, 9, 3, 11, 12, 9, 10, 11, 13, 4, 9, 10, 8, 11, 10, 3, 5, 9, 6, 11, 3, 12, 10, 12, 1, 11, 8, 9, 7, 1, 10, 8, 11, 13, 8, 2, 5, 9, 6, 12, 2, 11, 13, 10, 6, 12, 11, 14, 13, 12, 14, 15
Offset: 0

Views

Author

Omar E. Pol, Jul 09 2016

Keywords

Comments

Also spiral constructed on the infinite hexagonal grid in which each term is the least positive integer such that no diagonal of successive adjacent cells contains a repeated term. Every number is located in the center of a hexagonal cell. Every cell is also the center of three diagonals of successive adjacent cells.

Examples

			Illustration of initial terms as a spiral:
.
.                  10 - 5 - 3 - 9 - 8
.                  /                 \
.                 9   4 - 7 - 8 - 6   10
.                /   /             \   \
.               3   1   6 - 4 - 5   7   2
.              /   /   /         \   \   \
.            11   7   4   2 - 3   1   5   9
.            /   /   /   /     \   \   \   \
.          12   6   5   3   1 - 2   4   8   7
.            \   \   \   \         /   /   /
.             9   8   6   2 - 3 - 1   7   4
.              \   \   \             /   /
.              10   1   4 - 5 - 7 - 6   2
.                \   \                 /
.                11   7 - 8 - 6 - 5 - 9
.                  \
.                  13 - 4 - 9 - 10 - 8
.
		

Crossrefs

Cf. A269526 (square array), A274640 (square spiral), A274651 (right triangle), A274820, A274920, A274921, A275606, A275610.

Formula

a(n) = A274820(n) + 1.

A324774 East spoke of spiral in A274641.

Original entry on oeis.org

0, 1, 3, 7, 10, 11, 15, 8, 18, 23, 21, 17, 26, 25, 20, 36, 42, 38, 39, 48, 27, 28, 31, 45, 54, 59, 44, 47, 65, 72, 69, 75, 82, 76, 64, 74, 41, 61, 93, 95, 100, 102, 66, 62, 111, 79, 112, 57, 106, 63, 107, 119, 108, 68, 123, 129, 139
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2019

Keywords

Crossrefs

The 8 spokes are A324774-A324781. To get them, subtract 1 from A274924-A274931, respectively.

A324781 South-East spoke of spiral in A274641.

Original entry on oeis.org

0, 5, 4, 11, 15, 16, 20, 23, 26, 12, 14, 35, 39, 42, 46, 53, 22, 55, 58, 61, 38, 67, 68, 34, 45, 36, 41, 89, 49, 96, 93, 98, 101, 56, 106, 114, 116, 115, 119, 65, 129, 130, 72, 76, 139, 142, 75, 79, 77, 158, 160, 155, 164, 91, 90, 173, 88, 180, 103, 186, 189
Offset: 0

Views

Author

N. J. A. Sloane, Jul 05 2019

Keywords

Crossrefs

The 8 spokes are A324774-A324781. To get them, subtract 1 from A274924-A274931, respectively.

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.

A355270 Lexicographically earliest sequence of positive integers on a square spiral such that the sum of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 4, 3, 5, 4, 2, 4, 3, 5, 4, 4, 2, 3, 6, 4, 6, 5, 7, 6, 2, 6, 3, 2, 5, 8, 4, 3, 6, 6, 7, 3, 5, 7, 6, 8, 8, 7, 1, 2, 7, 5, 1, 2, 5, 8, 6, 4, 8, 5, 6, 9, 7, 1, 4, 10, 1, 1, 6, 3, 9, 12, 5, 1, 7, 2, 1, 6, 4, 1, 13, 6, 4, 7, 9, 12, 10, 7, 11, 1, 5, 2, 10, 7, 4, 5, 8
Offset: 1

Views

Author

Scott R. Shannon, Jun 26 2022

Keywords

Comments

In the first 2 million terms the largest number is 1959, while the number 1, the most commonly occurring number, appears 10893 times. See the linked images.

Examples

			The spiral begins:
.
                                .
    4---8---5---2---3---6---2   :
    |                       |   :
    3   2---4---5---3---4   6   5
    |   |               |   |   |
    6   4   2---1---1   4   7   2
    |   |   |       |   |   |   |
    6   3   2   1---1   3   5   1
    |   |   |           |   |   |
    7   5   3---2---4---3   6   5
    |   |                   |   |
    3   4---4---2---3---6---4   7
    |                           |
    5---7---6---8---8---7---1---2
.
a(25) = 6 as when a(25) is placed, at coordinate (2,-2) relative to the starting square, its adjacent squares are a(10) = 3, a(9) = 4, a(24) = 3. The sums of adjacent pairs of numbers in a(25)'s column are 3 + 3 = 6, 3 + 4 = 7, 4 + 4 = 8, in its northwest diagonal are 4 + 1 = 5, 1 + 2 = 3, 2 + 2 = 4, and in its row are 3 + 2 = 5, 2 + 4 = 6, 4 + 4 = 8. Setting a(25) to 1 would create a sum of 5 with its diagonal neighbor 4, but 5 has already occurred as a sum on this diagonal. Similarly numbers 2, 3, 4 and 5 can be eliminated as they create sums with the three adjacent numbers, 3, 4, and 3, which have already occurred along the corresponding column, diagonal or row. This leaves 6 as the smallest number which creates new sums, namely 9, 10 and 9, with its three neighbors that have not already occurred along the corresponding column, diagonal and row.
		

Crossrefs

A275915 First differences of A273059.

Original entry on oeis.org

9, 4, 4, 4, 61, 10, 10, 10, 116, 16, 16, 16, 169, 22, 22, 22, 119, 26, 26, 26, 259, 32, 32, 32, 314, 38, 38, 38, 367, 44, 44, 44, 421, 50, 50, 50, 476, 56, 56, 56, 529, 62, 62, 62, 319, 66, 66, 66, 619, 72, 72, 72, 674, 78, 78, 78, 727, 84, 84, 84, 782, 90, 90, 90, 835, 96, 96, 96, 489, 100
Offset: 0

Views

Author

N. J. A. Sloane, Aug 28 2016

Keywords

Crossrefs

Previous Showing 21-30 of 51 results. Next