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

A047932 a(n) = floor(3*n-sqrt(12*n-3)).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 12, 14, 16, 19, 21, 24, 26, 29, 31, 34, 36, 39, 42, 44, 47, 49, 52, 55, 57, 60, 63, 65, 68, 71, 73, 76, 79, 81, 84, 87, 90, 92, 95, 98, 100, 103, 106, 109, 111, 114, 117, 120, 122, 125, 128, 131, 133, 136, 139, 142, 144, 147, 150, 153, 156, 158, 161
Offset: 1

Views

Author

Keywords

Comments

a(n) = cumulative sum of number of new penny-penny contacts when putting pennies on a table following a spiral pattern. This is the maximum possible number of contacts.
a(n) is also the maximum number of times the minimum distance can occur among n points in the plane [Harborth].

Crossrefs

Partial sums of A047931.
A186705 is the maximum number of times the *same* distance can occur between n points in the plane, not necessarily the *minimum*.
Cf. A293956.

Programs

  • Mathematica
    Table[Floor[3n-Sqrt[12n-3]],{n,70}] (* Harvey P. Dale, Dec 25 2014 *)

Formula

a(n) = floor(3*n-sqrt(12*n-3)).

Extensions

Entry revised by N. J. A. Sloane, Nov 01 2017

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)

A275015 Number of neighbors of each new term in an isosceles triangle read by rows.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 20 2016

Keywords

Comments

To evaluate a(n) consider only the neighbors of a(n) that are present in the isosceles triangle when a(n) should be a new term in the triangle.
Apart from the left border and the right border, the rest of the elements are 3's.
If every "3" is replaced with a "4", we have the sequence A278290.
a(n) is also the number of new penny-penny contacts when putting pennies in a triangular arrangement.
For the same idea but for a right triangle see A278317; for a square array see A278290, for a square spiral see A278354; and for a hexagonal spiral see A047931.

Examples

			The sequence written as an isosceles triangle begins:
.
.                     0;
.                   1,  2;
.                 1,  3,  2;
.               1,  3,  3,  2;
.             1,  3,  3,  3,  2;
.           1,  3,  3,  3,  3,  2;
.         1,  3,  3,  3,  3,  3,  2;
.       1,  3,  3,  3,  3,  3,  3,  2;
.     1,  3,  3,  3,  3,  3,  3,  3,  2;
.   1,  3,  3,  3,  3,  3,  3,  3,  3,  2;
...
		

Crossrefs

Row sums give A008585.
Left border gives A057427.
Every diagonal that is parallel to the left border gives the elements greater than 1 of A158799.
Right border gives 0 together with A007395, also twice A057427.
Every diagonal that is parallel to the right border gives A122553.

Programs

  • Mathematica
    Table[Boole[n > 1] (Prepend[Reverse@ Rest@ #, First@ #] &@ Range@ n /. k_ /; k > 3 -> 3), {n, 13}] // Flatten (* or *)
    Table[Boole[n > 1] (Map[Mod[#, n] &, Range@ n] /. {k_ /; k > 1 -> 3, 0 -> 2}), {n, 13}] // Flatten (* Michael De Vlieger, Nov 23 2016 *)

A278181 Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its neighbors.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 9, 12, 14, 19, 22, 29, 33, 42, 47, 59, 74, 82, 99, 108, 129, 155, 169, 202, 243, 265, 316, 378, 411, 486, 575, 622, 728, 861, 1017, 1099, 1280, 1487, 1595, 1832, 2116, 2440, 2609, 2980, 3425, 3933, 4198, 4779, 5473, 6262, 6673, 7570, 8631, 9828, 10450, 11800, 13389, 15267, 17383
Offset: 0

Views

Author

Omar E. Pol, Nov 14 2016

Keywords

Comments

To evaluate a(n) consider the neighbors of a(n) that are present in the spiral when a(n) should be a new term in the spiral.

Examples

			Illustration of initial terms as a spiral:
.
.             22 - 19 - 14
.             /          \
.           29    3 - 2   12
.           /    /     \   \
.         33    4   1 - 1   9
.           \    \         /
.           42    5 - 7 - 8
.             \
.             47 - 59 - 74
.
a(16) = 47 because the sum of its two neighbors is 42 + 5 = 47.
a(17) = 59 because the sum of its three neighbors is 47 + 5 + 7 = 59.
a(18) = 74 because the sum of its three neighbors is 59 + 7 + 8 = 74.
a(19) = 82 because the sum of its two neighbors is 74 + 8 = 82.
		

Crossrefs

Programs

  • Mathematica
    A278181[0] = A278181[1] = 1; A278181[n_] := A278181[n] = With[{lev = Ceiling[1/6 (-3 + Sqrt[3] Sqrt[3 + 4 n])]}, With[{pos = 3 lev (lev - 1) + (n - 3 lev (1 + lev))/lev*(lev - 1)}, A278181[n - 1] + A278181[Ceiling[pos]] + If[Mod[n, lev] == 0 || n - 3 lev (lev - 1) == 1, 0, A278181[Floor[pos]]] + If[3 lev (1 + lev) == n, A278181[n - 6 lev + 1], 0]]]; Array[A278181, 61, 0] (* JungHwan Min, Nov 21 2016 *)

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 *)
Showing 1-6 of 6 results.