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-2 of 2 results.

A361660 Irregular triangle read by rows where row n lists the successive numbers moved in the process of forming row n of the triangle A361642.

Original entry on oeis.org

2, 3, 2, 4, 3, 3, 2, 5, 4, 3, 4, 2, 6, 5, 4, 4, 3, 3, 5, 2, 7, 6, 5, 4, 5, 3, 5, 6, 2, 8, 7, 6, 5, 5, 4, 6, 3, 3, 4, 7, 2, 9, 8, 7, 6, 5, 6, 4, 4, 7, 3, 7, 6, 8, 2, 10, 9, 8, 7, 6, 6, 5, 7, 4, 7, 8, 3, 3, 7, 5, 9, 2, 11, 10, 9, 8, 7, 6, 7, 5, 8, 4, 5, 9, 3, 9, 4, 7, 10, 2
Offset: 1

Views

Author

Tamas Sandor Nagy, Mar 19 2023

Keywords

Comments

The first and last numbers in row n>=2 are n and 2, respectively, and they occur just once each in the row.
For row n>=3, and if and only if n-1 is prime, numbers n and 2 are the only numbers which occur just once (since when n-1 is prime it cannot make a rectangle for any other number to move from the initial column to the final row).
A number can move twice in succession, and so occur here twice in succession, when it fills the top right corner cell in a rectangle of width * height = n.
The move is from the initial column to top right corner cell, and therefore the numbers which appear twice in succession are d+1 for each divisor d of n, in the range 1 < d < n.
If n is a prime, then it has no such divisors, or if n is a semiprime n = x*y (including square of a prime) then x+1 and y+1 are the only numbers appearing twice in succession.
The length of row n is A002541(n). This equals to the number of special integer partitions of n there. Where a rectangle is formed of the changing shape, the row length increases more because the movement of a number that completes the rectangle is repeated as it continues to move again.

Examples

			The irregular triangle T(n,k) begins:
  n/k |  1  2  3  4  5  6  7  8  9 10 11 12 13 14
  ------------------------------------------------
  1   |  (empty row)
  2   |  2;
  3   |  3, 2;
  4   |  4, 3, 3, 2;
  5   |  5, 4, 3, 4, 2;
  6   |  6, 5, 4, 4, 3, 3, 5, 2;
  7   |  7, 6, 5, 4, 5, 3, 5, 6, 2;
  8   |  8, 7, 6, 5, 5, 4, 6, 3, 3, 4, 7, 2;
  9   |  9, 8, 7, 6, 5, 6, 4, 4, 7, 3, 7, 6, 8, 2;
.
Movements of the six-number-high column. 1 never moves. 4 and 3 move twice each in immediate succession as 6 is a composite and a semiprime:
.
  6
  5   5
  4   4     4
  3   3     3     3 4   3
  2   2     2 5   2 5   2 5     2 5 3   2 5       2
  1   1 6   1 6   1 6   1 6 4   1 6 4   1 6 4 3   1 6 4 3 5   1 6 4 3 5 2
.
The parallel is shown for row length and the special integer partition in A002541:
For n = 4, its row consists of 4, 3, 3 and 2, that is four elements.
The special partition of n = 4 is (4), (2 2), (3 1), and (2 1 1), that is also four partitions. The relation is demonstrated by the illustration below. Square blocks represent the four numbers. As they move, the changing shape assumes a number of identical or reflected formations. The number of possible grouping of the blocks within them is exactly the same as the number of the moves that the blocks undergo:
.  _ _
  |   |__________ 1st move
  |   |     _ _  |
  |   |    |   |_|____________ 2nd move ____________________________ 4th move
  |   |    |   | |       _ _ _v_      _|_                           |
  |   |    |   | |      |   |   |____|___|_____ 3rd move            |
  |   |    |   |_v_     |   |   |    |   |_ _ _v_      _ _ _ _ _ _ _v_
  |   |    |   |   |    |   |   |    |   |   |   |    |               |
  |_ _|    |_ _|_ _|    |_ _|_ _|    |_ _|_ _|_ _|    |_ _ _ _ _ _ _ _|
    4        3   1        2   2        2   1   1              4
    ^                                                         ^
    |____________________ Identical partition ________________|
		

Crossrefs

Cf. A361642, A002541 (row length).

A361819 Irregular triangle read by rows where T(n,k) is the distance which number A361660(n,k) moves in the process described in A361642.

Original entry on oeis.org

2, 3, 3, 4, 2, 2, 4, 5, 3, 4, 3, 5, 6, 4, 2, 3, 3, 2, 4, 6, 7, 5, 3, 5, 2, 5, 3, 5, 7, 8, 6, 4, 2, 4, 4, 4, 4, 2, 4, 6, 8, 9, 7, 5, 3, 6, 3, 3, 3, 3, 6, 3, 5, 7, 9, 10, 8, 6, 4, 2, 5, 5, 2, 6, 2, 5, 5, 2, 4, 6, 8, 10, 11, 9, 7, 5, 3, 7, 4, 4, 5, 5, 4, 4, 7, 3, 5, 7, 9, 11
Offset: 1

Views

Author

Tamas Sandor Nagy, Mar 25 2023

Keywords

Comments

Number A361660(n,k) moves to the right and then down and T(n,k) counts the steps in both.
All moves are T(n,k) >= 2 steps since a number moves at least one step right and one step down.
Row n has sum A002378(n-1) which is the total steps to move a column down to a row irrespective of the order of movement.
Each row is a palindrome (the same when reversed), since the moves in A361642 are exactly the reverse moves to send its row back to the starting column.

Examples

			Irregular triangle T(n,k) begins:
  n/k     |   1    2    3    4    5    6    7    8    9
  ------------------------------------------------------
  1       |   (empty row)
  2       |   2;
  3       |   3,   3;
  4       |   4,   2,   2,   4;
  5       |   5,   3,   4,   3,   5;
  6       |   6,   4,   2,   3,   3,   2,   4,   6;
  7       |   7,   5,   3,   5,   2,   5,   3,   5,   7;
 ...
		

Crossrefs

Cf. A361642, A361660, A002541 (row lengths), A002378 (row sums).

Programs

  • MATLAB
    function a = A361819( max_row )
        k = 1;
        for r = 2:max_row
            h = zeros(1,r); h(1) = r;
            while max(h) > 1
               j =  find(h == max(h), 1, 'last' );
               m =  find(h < max(h)-1, 1, 'first' );
               a(k) = (m-j) + (h(j)-h(m)) - 1;
               h(j) = h(j) - 1; h(m) = h(m) + 1;
               k = k+1;
            end
        end
    end % Thomas Scheuerle, Mar 27 2023
Showing 1-2 of 2 results.