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.

A368521 Triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| - |x-z| = k, where x,y,z are in {1,2,...,n}.

Original entry on oeis.org

1, 6, 2, 17, 8, 2, 36, 18, 8, 2, 65, 32, 18, 8, 2, 106, 50, 32, 18, 8, 2, 161, 72, 50, 32, 18, 8, 2, 232, 98, 72, 50, 32, 18, 8, 2, 321, 128, 98, 72, 50, 32, 18, 8, 2, 430, 162, 128, 98, 72, 50, 32, 18, 8, 2, 561, 200, 162, 128, 98, 72, 50, 32, 18, 8, 2, 716
Offset: 1

Views

Author

Clark Kimberling, Jan 25 2024

Keywords

Examples

			First eight rows:
   1
   6    2
  17    8    2
  36   18    8    2
  65   32   18    8    2
 106   50   32   18    8    2
 161   72   50   32   18    8    2
 232   98   72   50   32   18    8    2
For n=2, there are 8 triples (x,y,z):
  111:  |x-y| + |y-z| - |x-z| = 0
  112:  |x-y| + |y-z| - |x-z| = 0
  121:  |x-y| + |y-z| - |x-z| = 2
  122:  |x-y| + |y-z| - |x-z| = 0
  211:  |x-y| + |y-z| - |x-z| = 0
  212:  |x-y| + |y-z| - |x-z| = 2
  221:  |x-y| + |y-z| - |x-z| = 0
  222:  |x-y| + |y-z| - |x-z| = 0
so row 2 of the array is (6,2), representing six 0s and two 2s.
		

Crossrefs

Cf. A084990 (column 1), A000578 (row sums), A001105 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368522, A368604, A368605, A368606, A368607, A368609.

Programs

  • Mathematica
    t[n_] := t[n] = Tuples[Range[n], 3]
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] - Abs[#[[1]] - #[[3]]] ==  k &]
    u = Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2, 2}]
    v = Flatten[u] (* sequence *)
    Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2, 2}]]  (* array *)

A368605 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x < y and y >= z.

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 3, 5, 5, 4, 2, 1, 4, 7, 8, 8, 6, 4, 2, 1, 5, 9, 11, 12, 11, 9, 6, 4, 2, 1, 6, 11, 14, 16, 16, 15, 12, 9, 6, 4, 2, 1, 7, 13, 17, 20, 21, 21, 19, 16, 12, 9, 6, 4, 2, 1, 8, 15, 20, 24, 26, 27, 26, 24, 20, 16, 12, 9, 6, 4, 2, 1, 9, 17, 23, 28
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Row n consists of 2n positive integers.

Examples

			First six rows:
  1    1
  2    3    2    1
  3    5    5    4    2    1
  4    7    8    8    6    4    2   1
  5    9   11   12   11    9    6   4   2   1
  6   11   14   16   16   15   12   9   6   4   2   1
For n=3, there are 8 triples (x,y,z) having x < y and y >= z:
  121:  |x-y| + |y-z| = 2
  122:  |x-y| + |y-z| = 1
  131:  |x-y| + |y-z| = 4
  132:  |x-y| + |y-z| = 3
  133:  |x-y| + |y-z| = 2
  231:  |x-y| + |y-z| = 3
  232:  |x-y| + |y-z| = 2
  233:  |x-y| + |y-z| = 1
so row 1 of the array is (2,3,2,1), representing two 1s, three 2s, two 3s, and one 4.
		

Crossrefs

Cf. A000027 (column 1), A007290 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368606, A368607, A368609.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] < #[[2]] >= #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}];
    v = Flatten[u] (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]]  (* array *)

A368606 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x <= y and y >= z.

Original entry on oeis.org

1, 2, 2, 1, 3, 4, 4, 2, 1, 4, 6, 7, 6, 4, 2, 1, 5, 8, 10, 10, 9, 6, 4, 2, 1, 6, 10, 13, 14, 14, 12, 9, 6, 4, 2, 1, 7, 12, 16, 18, 19, 18, 16, 12, 9, 6, 4, 2, 1, 8, 14, 19, 22, 24, 24, 23, 20, 16, 12, 9, 6, 4, 2, 1, 9, 16, 22, 26, 29, 30, 30, 28, 25, 20, 16
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Row n consists of 2n-1 positive integers.

Examples

			First six rows:
  1
  2    2    1
  3    4    4    2    1
  4    6    7    6    4    2   1
  5    8   10   10    9    6   4   2   1
  6   10   13   14   14   12   9   6   4   2   1
For n=2, there are 5 triples (x,y,z) having x <= y and y >= z:
  111:  |x-y| + |y-z| = 0
  121:  |x-y| + |y-z| = 2
  122:  |x-y| + |y-z| = 1
  221:  |x-y| + |y-z| = 1
  222:  |x-y| + |y-z| = 0
so row 2 of the array is (2,2,1), representing two 0s, two 1s, and one 3.
		

Crossrefs

Cf. A000027 (column 1), A000330 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368607, A368609.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] <= #[[2]] >= #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}];
    v = Flatten[u]  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 0, 2 n - 2}]]  (* array *)

A368607 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x != y and y < z.

Original entry on oeis.org

1, 3, 2, 1, 5, 6, 4, 2, 1, 7, 10, 10, 6, 4, 2, 1, 9, 14, 16, 14, 9, 6, 4, 2, 1, 11, 18, 22, 22, 19, 12, 9, 6, 4, 2, 1, 13, 22, 28, 30, 29, 24, 16, 12, 9, 6, 4, 2, 1, 15, 26, 34, 38, 39, 36, 30, 20, 16, 12, 9, 6, 4, 2, 1, 17, 30, 40, 46, 49, 48, 44, 36, 25
Offset: 1

Views

Author

Clark Kimberling, Jan 25 2024

Keywords

Comments

Row n consists of 2n-1 positive integers.

Examples

			First six rows:
 1
 3    2   1
 5    6   4   2  1
 7   10  10   6  4   2   1
 9   14  16  14  9   6   4  2  1
 11  18  22  22  19  12  9  6  4  2  1
For n=3, there are 6 triples (x,y,z) having x != y and y < z:
  123:  |x-y| + |y-z| = 2
  212:  |x-y| + |y-z| = 2
  213:  |x-y| + |y-z| = 3
  312:  |x-y| + |y-z| = 3
  313:  |x-y| + |y-z| = 4
  323:  |x-y| + |y-z| = 2
so row 2 of the array is (3,2,1), representing three 2s, two 3s, and one 4.
		

Crossrefs

Cf. A005408 (column 1), A002411 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368606, A368609.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] < #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 2, 2 n - 2}];
    v = Flatten[u] (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 2, 2 n - 2}]] (* array *)

A368608 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y| + |y-z| = k, where x,y,z are in {1,2,...,n} and x != y and y <= z.

Original entry on oeis.org

2, 1, 4, 5, 2, 1, 6, 9, 8, 4, 2, 1, 8, 13, 14, 12, 6, 4, 2, 1, 10, 17, 20, 20, 16, 9, 6, 4, 2, 1, 12, 21, 26, 28, 26, 21, 12, 9, 6, 4, 2, 1, 14, 25, 32, 36, 36, 33, 26, 16, 12, 9, 6, 4, 2, 1, 16, 29, 38, 44, 46, 45, 40, 32, 20, 16, 12, 9, 6, 4, 2, 1, 18, 33
Offset: 1

Views

Author

Clark Kimberling, Jan 25 2024

Keywords

Comments

Row n consists of 2n positive integers.

Examples

			First six rows:
   2   1
   4   5   2   1
   6   9   8   4   2   1
   8  13  14  12   6   4   2  1
  10  17  20  20  16   9   6  4  2  1
  12  21  26  28  26  21  12  9  6  4  2  1
For n=2, there are 3 triples (x,y,z) having x != y and y <= z:
  122:  |x-y| + |y-z| = 1
  211:  |x-y| + |y-z| = 1
  212:  |x-y| + |y-z| = 2
so row 2 of the array is (2,1), representing two 1s and one 2.
		

Crossrefs

Cf. A005443 (column 1), A027480 (row sums), A002620 (limiting reversed row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368520, A368521, A368522, A368604, A368605, A368606, A368607, A368609.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] <= #[[3]] &];
    a[n_, k_] := Select[t[n], Abs[#[[1]] - #[[2]]] + Abs[#[[2]] - #[[3]]] == k &];
    u = Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}];
    v = Flatten[u]  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 1, 2 n - 2}]]  (* array *)
Showing 1-5 of 5 results.