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-10 of 12 results. Next

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

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 25 2024

Keywords

Comments

The rows are the reversals of the rows in A368521.

Examples

			First eight rows:
   1
   2   6
   2   8   17
   2   8   18   36
   2   8   18   32   65
   2   8   18   32   50   106
   2   8   18   32   50    72   161
   2   8   18   32   50    72    98    232
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 (2,6), representing two 2s and six 0s.
		

Crossrefs

Cf. A084990 (column 1), A000578 (row sums), A001105 (limiting row), A368521.

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]]] ==  2n-2-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 *)

A368515 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.

Original entry on oeis.org

2, 2, 4, 8, 4, 2, 6, 14, 14, 8, 4, 2, 8, 20, 24, 22, 12, 8, 4, 2, 10, 26, 34, 36, 30, 18, 12, 8, 4, 2, 12, 32, 44, 50, 48, 40, 24, 18, 12, 8, 4, 2, 14, 38, 54, 64, 66, 62, 50, 32, 24, 18, 12, 8, 4, 2, 16, 44, 64, 78, 84, 84, 76, 62, 40, 32, 24, 18, 12, 8, 4
Offset: 1

Views

Author

Clark Kimberling, Dec 31 2023

Keywords

Comments

Row n consists of 2n even positive integers.

Examples

			First six rows:
  2    2
  4    8   4     2
  6   14   14    8    4   2
  8   20   24   22   12   8     4    2
 10   26   34   36   30   18   12    8    4   2
 12   32   44   50   48   40   24   18   12   8   4   2
For n=2, there are 4 triples (x,y,z) having x != y:
  121:  |x-y| + |y-z| = 2
  122:  |x-y| + |y-z| = 1
  211:  |x-y| + |y-z| = 1
  212:  |x-y| + |y-z| = 2,
so that row 2 of the array is (2,2), representing two 1s and two 2s.
		

Crossrefs

Cf. A045991 (row sums), A007590 (limiting reverse row), A368434, A368437, A368516, A368517, A368518, A368519, A368520, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] &];
    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 *)

A368516 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, 6, 4, 2, 10, 12, 8, 4, 2, 14, 20, 20, 12, 8, 4, 2, 18, 28, 32, 28, 18, 12, 8, 4, 2, 22, 36, 44, 44, 38, 24, 18, 12, 8, 4, 2, 26, 44, 56, 60, 58, 48, 32, 24, 18, 12, 8, 4, 2, 30, 52, 68, 76, 78, 72, 60, 40, 32, 24, 18, 12, 8, 4, 2, 34, 60, 80, 92, 98, 96
Offset: 1

Views

Author

Clark Kimberling, Dec 31 2023

Keywords

Comments

Row n consists of 2n-1 even positive integers.

Examples

			First six rows:
   2
   6    4    2
  10   12    8    4    2
  14   20   20   12    8    4    2
  18   28   32   28   18   12    8    4   2
  22   36   44   44   38   24   18   12   8   4   2
For n=3, there are 12 triples (x,y,z) having x != y and y != z:
  121:  |x-y| + |y-z| = 2
  123:  |x-y| + |y-z| = 2
  131:  |x-y| + |y-z| = 4
  132:  |x-y| + |y-z| = 3
  212:  |x-y| + |y-z| = 2
  213:  |x-y| + |y-z| = 3
  231:  |x-y| + |y-z| = 3
  232:  |x-y| + |y-z| = 2
  312:  |x-y| + |y-z| = 3
  313:  |x-y| + |y-z| = 4
  321:  |x-y| + |y-z| = 2
  323:  |x-y| + |y-z| = 2,
so that row 2 of the array is (6,4,2), representing six 2s, four 3s, and two 4s.
		

Crossrefs

Cf. A011379 (row sums), A007590 (limiting reverse row), A368434, A368437, A368515, A368517, A368518, A368519, A368520, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] != #[[2]] && #[[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 *)

A368517 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.

Original entry on oeis.org

1, 1, 2, 4, 2, 1, 3, 7, 7, 4, 2, 1, 4, 10, 12, 11, 6, 4, 2, 1, 5, 13, 17, 18, 15, 9, 6, 4, 2, 1, 6, 16, 22, 25, 24, 20, 12, 9, 6, 4, 2, 1, 7, 19, 27, 32, 33, 31, 25, 16, 12, 9, 6, 4, 2, 1, 8, 22, 32, 39, 42, 42, 38, 31, 20, 16, 12, 9, 6, 4, 2, 1, 9, 25, 37
Offset: 1

Views

Author

Clark Kimberling, Dec 31 2023

Keywords

Comments

Row n consists of 2n positive integers.

Examples

			First eight rows:
  1   1
  2   4   2   1
  3   7   7   4   2   1
  4  10  12  11   6   4   2   1
  5  13  17  18  15   9   6   4   2   1
  6  16  22  25  24  20  12   9   6   4   2  1
  7  19  27  32  33  31  25  16  12   9   6  4  2  1
  8  22  32  39  42  42  38  31  20  16  12  9  6  4  2  1
For n=3, there are 9 triples (x,y,z) having x < y:
  121:  |x-y| + |y-z| = 2
  122:  |x-y| + |y-z| = 1
  123:  |x-y| + |y-z| = 2
  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 that row 2 of the array is (2,4,2,1), representing two 1s, four 2s, two 3s, and one 4.
		

Crossrefs

Cf. A006002 (row sums), A002620 (limiting reverse row), A368434, A368437, A368515, A368516, A368518, A368519, A368520, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] < #[[2]] &];
    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 *)

A368519 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 < z.

Original entry on oeis.org

2, 4, 3, 2, 6, 6, 8, 2, 2, 8, 9, 14, 9, 6, 2, 2, 10, 12, 20, 16, 16, 6, 6, 2, 2, 12, 15, 26, 23, 26, 17, 12, 6, 6, 2, 2, 14, 18, 32, 30, 36, 28, 26, 12, 12, 6, 6, 2, 2, 16, 21, 38, 37, 46, 39, 40, 27, 20, 12, 12, 6, 6, 2, 2, 18, 24, 44, 44, 56, 50, 54, 42
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Row n consists of 2n-1 positive integers.

Examples

			First six rows:
   2
   4   3    2
   6   6    8   2   2
   8   9   14   9   6   2   2
   10  12  20  16  16   6   6  2  2
   12  15  26  23  26  17  12  6  6  2  2
For n=3, there are 9 triples (x,y,z) having x < z:
112:  |x-y| + |y-z| = 1
113:  |x-y| + |y-z| = 2
122:  |x-y| + |y-z| = 1
123:  |x-y| + |y-z| = 2
132:  |x-y| + |y-z| = 3
133:  |x-y| + |y-z| = 2
213:  |x-y| + |y-z| = 3
223:  |x-y| + |y-z| = 1
233:  |x-y| + |y-z| = 1,
so that row 1 of the array is (4,3,2), representing four 1s, three 2s, and two 3s.
		

Crossrefs

Cf. A006002 (row sums), A110660 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, A368518, A368520, A368521, A368522.

Programs

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

A368520 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 <= z.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 7, 2, 2, 4, 6, 12, 8, 6, 2, 2, 5, 8, 17, 14, 15, 6, 6, 2, 2, 6, 10, 22, 20, 24, 16, 12, 6, 6, 2, 2, 7, 12, 27, 26, 33, 26, 25, 12, 12, 6, 6, 2, 2, 8, 14, 32, 32, 42, 36, 38, 26, 20, 12, 12, 6, 6, 2, 2, 9, 16, 37, 38, 51, 46, 51, 40, 37, 20, 20
Offset: 1

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

Row n consists of 2n-1 positive integers.

Examples

			First seven rows:
 1
 2   2   2
 3   4   7   2   2
 4   6  12   8   6   2   2
 5   8  17  14  15   6   6   2   2
 6  10  22  20  24  16  12   6   6  2  2
 7  12  27  26  33  26  25  12  12  6  6  2  2
For n=2, there are 6 triples (x,y,z) having x <= z:
111:  |x-y| + |y-z| = 0
112:  |x-y| + |y-z| = 1
121:  |x-y| + |y-z| = 2
122:  |x-y| + |y-z| = 1
212:  |x-y| + |y-z| = 2
222:  |x-y| + |y-z| = 0
so that row 1 of the array is (2,2,2), representing two 0s, two 1s, and two 2s.
		

Crossrefs

Cf. A002411 (row sums), A110660 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368521, A368522.

Programs

  • Mathematica
    t1[n_] := t1[n] = Tuples[Range[n], 3];
    t[n_] := t[n] = Select[t1[n], #[[1]] <= #[[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 *)

A368604 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

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

Views

Author

Clark Kimberling, Jan 22 2024

Keywords

Comments

The difference sequence of the k-th column is (k), for k >= 1.

Examples

			First nine rows:
  0
  1    0
  2    2    1
  3    4    4    2
  4    6    7    6    4
  5    8   10   10    9    6
  6   10   13   14   14   12    9
  7   12   16   18   19   18   16   12
  8   14   19   22   24   24   23   20   16
For n=3, there are 5 triples (x,y,z) having x < y and y > z:
121:  |x-y| + |y-z| = 2
131:  |x-y| + |y-z| = 4
132:  |x-y| + |y-z| = 3
231:  |x-y| + |y-z| = 3
232:  |x-y| + |y-z| = 2
so that row 1 of the array is (2,2,1), representing two 2s, two 3s, and one 4.
		

Crossrefs

Cf. A000027 (column 1), A002620 (T(n,n)), A002717 (row sums), A368434, A368437, A368515, A368516, A368517, A368518, A368519, A368521, A368522.

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, 2, n + 1}];
    v = Flatten[u]
    Column[Table[Length[a[n, k]], {n, 1, 15}, {k, 2, n + 1}]]

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 *)
Showing 1-10 of 12 results. Next