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-5 of 5 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.

A274912 Square array read by antidiagonals upwards in which each new term is the least nonnegative integer distinct from its neighbors.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 11 2016

Keywords

Comments

In the square array we have that:
Antidiagonal sums give A168237.
Odd-indexed rows give A010673.
Even-indexed rows give A010684.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed antidiagonals give the initial terms of A010674.
Even-indexed antidiagonals give the initial terms of A000034.
Main diagonal gives A010674.
This is also a triangle read by rows in which each new term is the least nonnegative integer distinct from its neighbors.
In the triangle we have that:
Row sums give A168237.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed diagonals give A010673.
Even-indexed diagonals give A010684.
Odd-indexed rows give the initial terms of A010674.
Even-indexed rows give the initial terms of A000034.
Odd-indexed antidiagonals give the initial terms of A010673.
Even-indexed antidiagonals give the initial terms of A010684.

Examples

			The corner of the square array begins:
0, 2, 0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, ...
0, 2, 0, 2, ...
1, 3, 1, ...
0, 2, ...
1, ...
...
The sequence written as a triangle begins:
0;
1, 2;
0, 3, 0;
1, 2, 1, 2;
0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2, 1, 2;
...
		

Crossrefs

Programs

  • Maple
    ListTools:-Flatten([seq([[0,3]$i,0,[1,2]$(i+1)],i=0..10)]); # Robert Israel, Nov 14 2016
  • Mathematica
    Table[Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)

Formula

a(n) = A274913(n) - 1.
From Robert Israel, Nov 14 2016: (Start)
G.f.: 3*x/(1-x^2) - Sum_{k>=0} (2*x^(2*k^2+3*k+1)-x^(2*k^2+5*k+3))/(1+x).
G.f. as triangle: x*(1+2*y+3*x*y)/((1-x^2*y^2)*(1-x^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 *)

A274917 Square spiral in which each new term is the least positive integer distinct from its (already assigned) eight neighbors.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jul 11 2016

Keywords

Comments

The largest element is 5 and it is also the element with lower density in the spiral.
See A275609 for proof that 5 is maximal and for further comments. - N. J. A. Sloane, Mar 24 2019

Examples

			Illustration of initial terms as a spiral (n = 0..168):
.
.     2 - 3 - 2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2
.     |                                               |
.     4   1 - 4 - 3 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3
.     |   |                                       |   |
.     2   3   2 - 1 - 5 - 1 - 3 - 1 - 2 - 4 - 2   4   2
.     |   |   |                               |   |   |
.     1   5   4   3 - 2 - 4 - 2 - 4 - 3 - 1   3   1   3
.     |   |   |   |                       |   |   |   |
.     4   2   1   5   1 - 3 - 1 - 5 - 2   4   2   4   2
.     |   |   |   |   |               |   |   |   |   |
.     1   3   4   2   4   2 - 4 - 3   1   3   1   3   1
.     |   |   |   |   |   |       |   |   |   |   |   |
.     4   2   1   3   1   3   1 - 2   4   2   4   2   4
.     |   |   |   |   |   |           |   |   |   |   |
.     1   3   4   2   4   2 - 4 - 3 - 1   3   1   3   1
.     |   |   |   |   |                   |   |   |   |
.     4   2   1   3   1 - 3 - 1 - 2 - 4 - 2   4   2   4
.     |   |   |   |                           |   |   |
.     1   3   4   2 - 4 - 2 - 4 - 3 - 1 - 3 - 1   3   1
.     |   |   |                                   |   |
.     4   2   1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2   4
.     |   |                                           |
.     1   3 - 4 - 2 - 4 - 2 - 4 - 3 - 1 - 3 - 1 - 3 - 1
.     |
.     2 - 5 - 1 - 3 - 1 - 3 - 1 - 2 - 4 - 2 - 4 - 2 - 4
.
a(13) = 5 is the first "5" in the sequence and its four neighbors are 4 (southwest), 3 (south), 1 (southeast) and 2 (east) when a(13) is placed in the spiral.
a(157) = 5 is the 6th "5" in the sequence and it is also the first "5" that is below the NE-SW main diagonal of the spiral (see the second term in the last row of the above diagram).
		

Crossrefs

Cf. A274913, A274921, A275609, A278354 (number of neighbors).

Formula

a(n) = A275609(n) + 1. - Omar E. Pol, Nov 14 2016

A278545 Number of neighbors of the n-th term in a full square array read by antidiagonals.

Original entry on oeis.org

3, 5, 5, 5, 8, 5, 5, 8, 8, 5, 5, 8, 8, 8, 5, 5, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5
Offset: 1

Views

Author

Omar E. Pol, Nov 23 2016

Keywords

Comments

Apart from the first row and the first column, the rest of the elements are 8's.
For the same idea but for a right triangle see A278480; for an isosceles triangle see A278481; for a square spiral see A010731; and for a hexagonal spiral see A010722.

Examples

			The corner of the square array begins:
3,5,5,5,5,5,5,5,5,5,...
5,8,8,8,8,8,8,8,8,...
5,8,8,8,8,8,8,8,...
5,8,8,8,8,8,8,...
5,8,8,8,8,8,...
5,8,8,8,8,...
5,8,8,8,...
5,8,8,...
5,8,...
5,...
...
		

Crossrefs

Antidiagonal sums give 3 together with the elements > 2 of A017089.

Programs

  • Maple
    3, seq(op([5,8$i,5]),i=0..20); # Robert Israel, Dec 04 2016

Formula

G.f. 3+x+8*x/(1-x)-3*(1+x)*Theta_2(0,sqrt(x))/(2*x^(1/8)) where Theta_2 is a Jacobi Theta function. - Robert Israel, Dec 04 2016
Showing 1-5 of 5 results.