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.

Previous Showing 11-14 of 14 results.

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

Original entry on oeis.org

1, 2, 4, 2, 2, 4, 10, 8, 3, 2, 4, 8, 16, 18, 12, 4, 2, 4, 8, 12, 24, 28, 26, 16, 5, 2, 4, 8, 12, 18, 32, 40, 40, 34, 20, 6, 2, 4, 8, 12, 18, 24, 42, 52, 56, 52, 42, 24, 7, 2, 4, 8, 12, 18, 24, 32, 52, 66, 72, 72, 64, 50, 28, 8, 2, 4, 8, 12, 18, 24, 32, 40
Offset: 1

Views

Author

Clark Kimberling, Dec 25 2023

Keywords

Comments

Row n consists of 2n-1 positive integers having sum A000575(n) = n^3.

Examples

			First eight rows:
1
2  4   2
2  4  10   8   3
2  4   8  16  18  12   4
2  4   8  12  24  28  26  16   5
2  4   8  12  18  32  40  40  34  20   6
2  4   8  12  18  24  42  52  56  52  42  24   7
2  4   8  12  18  24  32  52  66  72  72  64  50  28  8
		

Crossrefs

Cf. A000575, A007590 (limiting row), A368434, A368437.

Programs

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

A368436 Irregular triangular array T, read by rows: T(n,k) = number of sums |x-y|+|y-z| = k, where (x,y,z) is a permutation of three distinct numbers x,y,z taken from {0,1,...,n}, for n >= 2, k >= 2.

Original entry on oeis.org

2, 4, 4, 12, 4, 4, 6, 20, 14, 12, 4, 4, 8, 28, 24, 28, 12, 12, 4, 4, 10, 36, 34, 44, 30, 24, 12, 12, 4, 4, 12, 44, 44, 60, 48, 48, 24, 24, 12, 12, 4, 4, 14, 52, 54, 76, 66, 72, 50, 40, 24, 24, 12, 12, 4, 4, 16, 60, 64, 92, 84, 96, 76, 72, 40, 40, 24, 24, 12
Offset: 1

Views

Author

Clark Kimberling, Dec 25 2023

Keywords

Comments

Row n consists of 2n even positive integers having sum A007531(n+2) = (n+2)!/(n-1)!.

Examples

			Taking n = 2, the permutations of {x,y,z} of {0,1,2} with sums |x-y| + |y-z| = k, for k = 2,3, are as follows:
012: |0-1| + |1-2| = 2
021: |0-2| + |2-1| = 3
102: |1-0| + |0-2| = 3
120: |1-2| + |2-0| = 3
201: |2-0| + |0-1| = 3
210: |2-1| + |1-0| = 2
so that row 1 of the array is (2,4), representing two 2s and four 3s.
First eight rows:
 2    4
 4   12    4    4
 6   20   14   12    4    4
 8   28   24   28   12   12    4    4
10   36   34   44   30   24   12   12    4    4
12   44   44   60   48   48   24   24   12   12    4    4
14   52   54   76   66   72   50   40   24   24   12   12    4    4
16   60   64   92   84   96   76   72   40   40   24   24   12   12   4   4
		

Crossrefs

Cf. A007531, A368434, A368437 (reversed rows).

Programs

  • Mathematica
    t[n_] := t[n] = Permutations[-1 + Range[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, 2, 2 n - 1}];
    v = Flatten[u]  (* sequence *)
    Column[u]       (* array *)

A368158 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, 3, 1, 3, 6, 6, 2, 1, 4, 9, 11, 9, 4, 2, 1, 5, 12, 16, 16, 13, 6, 4, 2, 1, 6, 15, 21, 23, 22, 17, 9, 6, 4, 2, 1, 7, 18, 26, 30, 31, 28, 22, 12, 9, 6, 4, 2, 1, 8, 21, 31, 37, 40, 39, 35, 27, 16, 12, 9, 6, 4, 2, 1, 9, 24, 36, 44, 49, 50, 48, 42, 33, 20, 16
Offset: 1

Views

Author

Clark Kimberling, Jan 20 2024

Keywords

Comments

Row n consists of 2n+1 positive integers.

Examples

			First six rows:
  2   3   1
  3   6   6   2   1
  4   9  11   9   4   2   1
  5  12  16  16  13   6   4   2  1
  6  15  21  23  22  17   9   6  4  2  1
  7  18  26  30  31  28  22  12  9  6  4  2  1
For n=2, there are 6 triples (x,y,z) having x <= y:
  111:  |x-y| + |y-z| = 0
  112:  |x-y| + |y-z| = 1
  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 1 of the array is (2,3,1), representing two 0s, three 1s, and one 1.
		

Crossrefs

Cf. A002411 (row sums), A002620 (limiting reverse row), A368434, A368437, A368515, A368516, A368517, 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, 0, 2 n - 2}];
    v = Flatten[u]  (* sequence *)
    Column[Table[Length[a[n, k]], {n, 2, 15}, {k, 0, 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 *)
Previous Showing 11-14 of 14 results.