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.

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.

A278354 Number of neighbors of each new term in a square spiral.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 19 2016

Keywords

Comments

Here the "neighbors" of a(n) are defined to be the adjacent elements to a(n) in the same row, column or diagonals, that are present in the spiral when a(n) is the new element of the sequence in progress.
For the same idea but for a right triangle see A278317; for an isosceles triangle see A275015; for a square array see A278290; and for a hexagonal spiral see A047931.

Examples

			Illustration of initial terms as a spiral (n = 1..169):
.
.     2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 2
.     |                                               |
.     4   2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 2   3
.     |   |                                       |   |
.     4   4   2 - 3 - 4 - 4 - 4 - 4 - 4 - 4 - 2   3   4
.     |   |   |                               |   |   |
.     4   4   4   2 - 3 - 4 - 4 - 4 - 4 - 2   3   4   4
.     |   |   |   |                       |   |   |   |
.     4   4   4   4   2 - 3 - 4 - 4 - 2   3   4   4   4
.     |   |   |   |   |               |   |   |   |   |
.     4   4   4   4   4   2 - 3 - 2   3   4   4   4   4
.     |   |   |   |   |   |       |   |   |   |   |   |
.     4   4   4   4   4   3   0 - 1   4   4   4   4   4
.     |   |   |   |   |   |           |   |   |   |   |
.     4   4   4   4   3   2 - 4 - 3 - 2   4   4   4   4
.     |   |   |   |   |                   |   |   |   |
.     4   4   4   3   2 - 4 - 4 - 4 - 3 - 2   4   4   4
.     |   |   |   |                           |   |   |
.     4   4   3   2 - 4 - 4 - 4 - 4 - 4 - 3 - 2   4   4
.     |   |   |                                   |   |
.     4   3   2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3 - 2   4
.     |   |                                           |
.     3   2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3 - 2
.     |
.     2 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 3
.
		

Crossrefs

Programs

  • Maple
    0,1,seq(op([2,4$floor(i/2),3]),i=0..30); # Robert Israel, Nov 22 2016

Formula

From Robert Israel, Nov 22 2016: (Start)
a(n) = 3 if n>=4 is in A002620.
a(n) = 2 if n>=2 is in A033638.
Otherwise, a(n) = 4 if n > 2. (End)

A280027 Fill an infinite square array by following a spiral around the origin; in the central cell enter a(0)=1; thereafter, in the n-th cell, enter the sum of the entries of those earlier cells that can be seen from that cell.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 23, 42, 76, 146, 239, 441, 852, 1389, 2536, 4971, 9832, 15312, 27964, 54801, 108787, 169086, 308758, 603612, 1201837, 2397202, 3656904, 6687912, 13067709, 25998877, 51918269, 79176868, 144799285, 282915788, 562653823, 1124083053, 2246758839
Offset: 0

Views

Author

N. J. A. Sloane, Dec 24 2016

Keywords

Comments

The spiral track being used here is the same as in A274640, except that the starting cell here is indexed 0 (as in A274641).
The central cell gets index 0 (and we fill it in with the value a(0)=1).
"Can be seen from" means "that are on the same row, column, diagonal, or antidiagonal as".

Examples

			The central portion of the spiral is:
.
     7----4----2
     |         |
    13    1----1  239
     |             |
    23---42---76--146
.
After the terms a(0) to a(8) of the spiral have been filled in, the next cell contains 76+42+23+1+4 = 146 = a(9).
		

Crossrefs

Extensions

More terms from Lars Blomberg, Dec 25 2016

A278619 Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its two largest neighbors in the structure.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 15, 18, 22, 26, 31, 36, 42, 49, 56, 64, 72, 82, 94, 106, 121, 139, 157, 179, 205, 231, 262, 298, 334, 376, 425, 481, 537, 601, 673, 745, 827, 921, 1027, 1133, 1254, 1393, 1550, 1707, 1886, 2091, 2322, 2553, 2815, 3113, 3447, 3781, 4157, 4582, 5063, 5600
Offset: 0

Views

Author

Omar E. Pol, Nov 24 2016

Keywords

Comments

To evaluate a(n) consider only the two largest neighbors of a(n) that are present in the spiral when a(n) should be a new term in the spiral.
For the same idea but for an right triangle see A278645; for a square spiral see A278180.
It appears that the same idea for an isosceles triangle and also for a square array gives A030237.

Examples

			Illustration of initial terms as a spiral:
.
.             18 - 15 - 12
.             /          \
.           22    3 - 2   10
.           /    /     \   \
.         26    4   1 - 1   8
.           \    \         /
.           31    5 - 6 - 7
.             \
.              36 - 42 - 49
.
a(16) = 36 because the sum of its two largest neighbors is 31 + 5 = 36.
a(17) = 42 because the sum of its two largest neighbors is 36 + 6 = 42.
a(18) = 49 because the sum of its two largest neighbors is 42 + 7 = 49.
a(19) = 56 because the sum of its two largest neighbors is 49 + 7 = 56.
		

Crossrefs

A334741 Fill an infinite square array by following a spiral around the origin; in the central cell enter a(0)=1; thereafter, in the n-th cell, enter the sum of the entries of those earlier cells that are in the same row or column as that cell.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 11, 21, 40, 47, 93, 180, 203, 397, 796, 1576, 1675, 3305, 6636, 13192, 14004, 27607, 55029, 110192, 220024, 226740, 450123, 898661, 1798700, 3594248, 3704800, 7354303, 14681369, 29349536, 58710640, 117394896, 119196748, 237492079
Offset: 0

Views

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Comments

The spiral track being used here is the same as in A274640, except that the starting cell here is indexed 0 (as in A274641).
The central cell gets index 0 (and we fill it in with the value a(0)=1).

Examples

			Spiral begins:
     3----2----1
     |         |
     5    1----1   47
     |              |
     8---11---21---40
a(11) = 47 = 1 + 1 + 5 + 40, the sum of the cells in its row and column.
		

Crossrefs

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

Programs

  • PARI
    \\ here P(n) returns A174344 and A274923 as pair.
    P(n)={my(m=sqrtint(n), k=ceil(m/2)); n -= 4*k^2; if(n<0, if(n<-m, [k, 3*k+n], [-k-n, k]), if(nAndrew Howroyd, May 09 2020

A278645 Triangle read by rows in which each new term is the sum of its two largest neighbors in the structure.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 8, 15, 22, 29, 23, 45, 74, 103, 132, 68, 142, 245, 377, 509, 641, 210, 455, 832, 1341, 1982, 2623, 3264, 665, 1497, 2838, 4820, 7443, 10707, 13971, 17235, 2162, 5000, 9820, 17263, 27970, 41941, 59176, 76411, 93646, 7162, 16982, 34245, 62215, 104156, 163332, 239743, 333389, 427035, 520681
Offset: 1

Views

Author

Omar E. Pol, Nov 24 2016

Keywords

Comments

To evaluate T(n,k) consider only the two largest neighbors of T(n,k) that are present in the triangle when T(n,k) should be a new term in the triangle.
For the same idea but for a square spiral see A278180; and for a hexagonal spiral see A278619.
It appears that the same idea for an isosceles triangle and also for a square array gives A030237.

Examples

			Triangle begins:
1;
1,    2;
3,    5,     7;
8,    15,    22,    29;
23,   45,    74,    103,   132;
68,   142,   245,   377,   509,    641;
210,  455,   832,   1341,  1982,   2623,   3264;
665,  1497,  2838,  4820,  7443,   10707,  13971,  17235;
2162, 5000,  9820,  17263, 27970,  41941,  59176,  76411,  93646;
7162, 16982, 34245, 62215, 104156, 163332, 239743, 333389, 427035, 520681;
...
		

Crossrefs

A334745 Starting with a(1) = a(2) = 1, proceed in a square spiral, computing each term as the sum of diagonally adjacent prior terms.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 3, 2, 3, 1, 1, 3, 2, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 3, 1, 1, 4, 3, 6, 3, 4, 1, 1, 4, 3, 6, 3, 4, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 5, 4, 10, 6, 10, 4, 5, 1, 1, 5, 4, 10, 6
Offset: 1

Views

Author

Alec Jones and Peter Kagey, May 09 2020

Keywords

Examples

			Spiral begins:
... 3---3---3---3---1
                    |
1---1---2---2---1   1
|               |   |
2   1---1---1   1   3
|   |       |   |   |
2   1   1---1   2   2
|   |           |   |
1   1---2---1---1   3
|                   |
1---3---2---3---1---1
The last illustrated term above is a(35) = 3 = 2 + 1 because diagonally down-right is 2 and diagonally down-left is 1.
		

Crossrefs

The x- and y-coordinates at n-th step are A174344 and A274923 respectively.

Formula

Conjecture: a(2n-1) = A247976(n).
Showing 1-7 of 7 results.