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

A278317 Number of neighbors of each new term in a right triangle read by rows.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 18 2016

Keywords

Comments

To evaluate T(n,k) consider only the neighbors of T(n,k) that are present in the triangle when T(n,k) should be a new term in the triangle.
Apart from the first column and the first two diagonals the rest of the elements are 4's.
For the same idea but for an isosceles triangle see A275015; for a square array see A278290, for a square spiral see A278354; and for a hexagonal spiral see A047931.

Examples

			Triangle begins:
0;
1, 2;
2, 3, 2;
2, 4, 3, 2;
2, 4, 4, 3, 2;
2, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 4, 3, 2;
2, 4, 4, 4, 4, 4, 4, 4, 3, 2;
...
		

Crossrefs

Apart from the initial zero, row sums give A004767.
Column 1 is A130130.
Columns > 1 give the terms greater than 1 of A158411.
Right border gives 0 together with A007395, also twice A057427.
Second right border gives A122553.

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)

A278290 Number of neighbors of each new term in a square array read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 16 2016

Keywords

Comments

Here the "neighbors" of T(n,k) are defined to be the adjacent elements to T(n,k), in the same row, column or diagonals, that are present in the square array when T(n,k) is the new element of the sequence in progress.
Apart from row 1 and column 1 the rest of the elements are 4's.
If every "4" is replaced with a "3" we have the sequence A275015.
For the same idea but for a right triangle see A278317; for an isosceles triangle see A275015; for a square spiral see A278354; and for a hexagonal spiral see A047931.

Examples

			The corner of the square array read by antidiagonals upwards begins:
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,...
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4, 4,...
1, 4, 4, 4, 4,...
1, 4, 4, 4,...
1, 4, 4,...
1, 4,...
1,...
..
		

Crossrefs

Antidiagonal sums give 0 together with A004767.
Row 1 gives 0 together with A007395, also twice A057427.
Column 1 gives A057427.

Programs

  • Mathematica
    Table[Boole[# > 1] + 2 Boole[k > 1] + Boole[And[# > 1, k > 1]] &[n - k + 1], {n, 14}, {k, n}] // Flatten (* or *)
    Table[Boole[n > 1] (Map[Mod[#, n] &, Range@ n] /. {k_ /; k > 1 -> 4, 0 -> 2}), {n, 14}] // Flatten (* Michael De Vlieger, Nov 23 2016 *)

A278481 Number of neighbors of the n-th term in a full isosceles triangle read by rows.

Original entry on oeis.org

2, 4, 4, 4, 6, 4, 4, 6, 6, 4, 4, 6, 6, 6, 4, 4, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4
Offset: 1

Views

Author

Omar E. Pol, Nov 23 2016

Keywords

Comments

Apart from the left border and the right border, the rest of the elements are 6's.
For the same idea but for a right triangle see A278480; for a square array see A278545, for a square spiral see A010731; and for a hexagonal spiral see A010722.

Examples

			The sequence written as an isosceles triangle begins:
.
.                     2;
.                   4,  4;
.                 4,  6,  4;
.               4,  6,  6,  4;
.             4,  6,  6,  6,  4;
.           4,  6,  6,  6,  6,  4;
.         4,  6,  6,  6,  6,  6,  4;
.       4,  6,  6,  6,  6,  6,  6,  4;
.     4,  6,  6,  6,  6,  6,  6,  6,  4;
.   4,  6,  6,  6,  6,  6,  6,  6,  6,  4;
...
		

Crossrefs

Row sums give A016933.
Left border gives A040002, the same as the right border.
Middle column gives the elements > 1 of A134201, also twice A122553.
Showing 1-4 of 4 results.