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

A237591 Irregular triangle read by rows: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts (n>=1, 1<=k<=A003056(n)).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 22 2014

Keywords

Comments

The original name was: Triangle read by rows: T(n,k) = A235791(n,k) - A235791(n,k+1), assuming that the virtual right border of triangle A235791 is A000004.
T(n,k) is also the length of the k-th segment in a zig-zag path on the first quadrant of the square grid, connecting the point (n, 0) with the point (m, m), starting with a segment in vertical direction, where m <= n.
Conjecture: the area of the polygon defined by the x-axis, this zig-zag path and the diagonal [(0, 0), (m, m)], is equal to A024916(n)/2, one half of the sum of all divisors of all positive integers <= n. Therefore the reflected polygon, which is adjacent to the y-axis, with the zig-zag path connecting the point (0, n) with the point (m, m), has the same property. And so on for each octant in the four quadrants.
For the representation of A024916 and A000203 we use two octants, for example: the first octant and the second octant, or the 6th octant and the 7th octant, etc., see A237593.
At least up to n = 128, two zig-zag paths never cross (checked by hand).
The finite sequence formed by the n-th row of triangle together with its mirror row gives the n-th row of triangle A237593.
The connection between A196020 and A237271 is as follows: A196020 --> A236104 --> A235791 --> this sequence --> A237593 --> A239660 --> A237270 --> A237271.
Comments from Franklin T. Adams-Watters on sequences related to the "symmetric representation of sigma" in A235791 and related sequences, Mar 31 2014. (Start)
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
From Hartmut F. W. Hoft, Apr 07 2014: (Start)
The row sum is A235791(n,1) - A235791(n,floor((sqrt(8n+1)-1)/2)+1) = n - 0.
Mathematica function has been written to check the conjecture as well as non-crossing zig-zag paths (Dyck paths rotated by 90 degrees) up through n=30000 (same applies to A237593). (End)
The n-th zig-zag path ending at the point (m, m), where m = A240542(n). - Omar E. Pol, Apr 16 2014
From Omar E. Pol, Aug 23 2015: (Start)
n is an odd prime if and only if T(n,2) = 1 + T(n-1,2) and T(n,k) = T(n-1,k) for the rest of the values of k.
The elements of the n-th row of triangle together with the elements of the n-th row of triangle A261350 give the n-th row of triangle A237593.
T(n,k) is also the area (or the number of cells) of the k-th vertical side at the n-th level (starting from the top) in the left hand part of the front view of the stepped pyramid described in A245092, see Example section.
(End)
From Omar E. Pol, Nov 19 2015: (Start)
T(n,k) is also the number of cells between the k-th and the (k+1)st line segments (from left to right) in the n-th row of the diagram as shown in Example section.
Note that the number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of odd divisors of n. (End)
Conjecture: the values f(n,k) in the n-th row of the triangle are either 1 or 2 for all k with ceiling((sqrt(4*n+1)-1)/2) <= k <= floor((sqrt(8*n+1)-1)/2) = r(n), the length of the n-th row, though the lower bound need not be minimal; tested through 2500000. See also A285356. - Hartmut F. W. Hoft, Apr 17 2017
Conjecture: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts. - Omar E. Pol, Apr 30 2017
From Omar E. Pol, Aug 31 2021: (Start)
It appears that T(n,2)/T(n,1) converges to 1/3.
It appears that T(n,3)/T(n,2) converges to 1/2.
It appears that T(n,4)/T(n,3) converges to 3/5.
It appears that T(n,5)/T(n,4) converges to 2/3. (End)
In other words: T(n,k) is the length of the k-th line segment of the largest Dyck path of the symmetric representation of sigma(n). - Omar E. Pol, Sep 08 2021

Examples

			Triangle begins:
   1;
   2;
   2, 1;
   3, 1;
   3, 2;
   4, 1, 1;
   4, 2, 1;
   5, 2, 1;
   5, 2, 2;
   6, 2, 1, 1;
   6, 3, 1, 1;
   7, 2, 2, 1;
   7, 3, 2, 1;
   8, 3, 1, 2;
   8, 3, 2, 1, 1;
   9, 3, 2, 1, 1;
   9, 4, 2, 1, 1;
  10, 3, 2, 2, 1;
  10, 4, 2, 2, 1;
  11, 4, 2, 1, 2;
  11, 4, 3, 1, 1, 1;
  12, 4, 2, 2, 1, 1;
  12, 5, 2, 2, 1, 1;
  13, 4, 3, 2, 1, 1;
  13, 5, 3, 1, 2, 1;
  14, 5, 2, 2, 2, 1;
  14, 5, 3, 2, 1, 2;
  15, 5, 3, 2, 1, 1, 1;
  ...
For n = 10 the 10th row of triangle A235791 is [10, 4, 2, 1] so row 10 is [6, 2, 1, 1].
From _Omar E. Pol_, Aug 23 2015: (Start)
Illustration of initial terms:
  Row                                                         _
   1                                                        _|1|
   2                                                      _|2 _|
   3                                                    _|2  |1|
   4                                                  _|3   _|1|
   5                                                _|3    |2 _|
   6                                              _|4     _|1|1|
   7                                            _|4      |2  |1|
   8                                          _|5       _|2 _|1|
   9                                        _|5        |2  |2 _|
  10                                      _|6         _|2  |1|1|
  11                                    _|6          |3   _|1|1|
  12                                  _|7           _|2  |2  |1|
  13                                _|7            |3    |2 _|1|
  14                              _|8             _|3   _|1|2 _|
  15                            _|8              |3    |2  |1|1|
  16                          _|9               _|3    |2  |1|1|
  17                        _|9                |4     _|2 _|1|1|
  18                      _|10                _|3    |2  |2  |1|
  19                    _|10                 |4      |2  |2 _|1|
  20                  _|11                  _|4     _|2  |1|2 _|
  21                _|11                   |4      |3   _|1|1|1|
  22              _|12                    _|4      |2  |2  |1|1|
  23            _|12                     |5       _|2  |2  |1|1|
  24          _|13                      _|4      |3    |2 _|1|1|
  25        _|13                       |5        |3   _|1|2  |1|
  26      _|14                        _|5       _|2  |2  |2 _|1|
  27    _|14                         |5        |3    |2  |1|2 _|
  28   |15                           |5        |3    |2  |1|1|1|
  ...
Also the diagram represents the left part of the front view of the pyramid described in A245092. For the other half front view see A261350. For more information about the pyramid and the symmetric representation of sigma see A237593. (End)
From _Omar E. Pol_, Sep 08 2021: (Start)
For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below:
.                           _
                           | |
                           | |
                           | |
                           | |
                           | |
                      _ _ _| |
                    _|    _ _|
                  _|     |
                 |      _|
                 |  _ _|1
      _ _ _ _ _ _| |  2
     |_ _ _ _ _ _ _|2
            7
.
The lengths of the successive line segments from the first vertex to the central vertex of the largest Dyck path are [7, 2, 2, 1] respectively, the same as the 12th row of triangle. (End)
		

Crossrefs

Row n has length A003056(n) hence column k starts in row A000217(k).
Row sums give A000027.
Column 1 is A008619, n >= 1.
Right border gives A042974.

Programs

  • Mathematica
    row[n_]:= Floor[(Sqrt[8*n+1] -1)/2];  f[n_,k_]:= Ceiling[(n+1)/k-(k+1)/2] - Ceiling[(n+1)/(k+1)-(k+2)/2];
    Table[f[n,k],{n,1,50},{k,1,row[n]}]//Flatten
    (* Hartmut F. W. Hoft, Apr 08 2014 *)
  • PARI
    row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i);
    row(n) = {my(orow = concat(row235791(n), 0)); vector(#orow -1, i, orow[i] - orow[i+1]);} \\ Michel Marcus, Mar 27 2014
    
  • Python
    from sympy import sqrt
    import math
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
    for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017

Formula

T(n,k) = ceiling((n+1)/k - (k+1)/2) - ceiling((n+1)/(k+1) - (k+2)/2), for 1 <= n and 1 <= k <= floor((sqrt(8n+1)-1)/2). - Hartmut F. W. Hoft, Apr 07 2014

Extensions

3 more rows added by Omar E. Pol, Aug 23 2015
New name from a comment dated Apr 30 2017. - Omar E. Pol, Jun 18 2023

A295423 a(n) = size of the part containing the diagonal of the symmetric representation of sigma(k) when k is the n-th number with an odd number of parts.

Original entry on oeis.org

1, 3, 7, 12, 15, 3, 28, 8, 31, 39, 42, 60, 5, 56, 72, 63, 12, 91, 90, 96, 32, 124, 7, 15, 120, 120, 168, 16, 127, 144, 36, 195, 18, 186, 9, 224, 180, 234, 20, 252, 21, 20, 217, 210, 280, 48, 248, 22, 360, 11, 312, 255, 54, 336, 104, 336, 24, 403, 372, 26, 54, 392, 378, 363, 26, 480, 13, 66
Offset: 1

Views

Author

Hartmut F. W. Hoft, Feb 12 2018

Keywords

Comments

a(n) = middle element of row A071562(n) in A237270.
Every odd prime number p occurs in the sequence since the symmetric representation of p^2 has the three parts ( (p^2 + 1)/2 , p, (p^2 + 1)/2 ).
Let n = 2^m * q, m>=0 and q odd, and let r = floor( (sqrt(8n+1) - 1)/2 ). The symmetric representation of sigma(n) has an odd number of parts precisely when there exists an odd divisor d of q such that d <= r and d*2^(m+1) > r (see the link in A071562).
Conjecture: Every even number, except 2, 4, 6, 10, and 14, occurs as the size of the middle part of the symmetric representation with an odd number of parts.
By symmetry, an even middle part must have an even width at the diagonal constraining the geometry for small areas bounded by adjacent Dyck paths.
Size 2 clearly is impossible with a pair of Dyck paths as boundary.
Size 4 is impossible since the two bounding Dyck paths must end in lengths of 2. However, the rightmost entry in a row of A237591 equals 2 only in rows k*(k+1)/2 - 1, for k>1, so no 2's exist at the diagonal in adjacent Dyck paths.
Size 6 is impossible if Conjecture (2) in A285356 is true since the middle area requires legs of length 3 in the Dyck path at the diagonal; and so are sizes 10 and 14 unless the middle part touches the previous part at a point.
Sizes 6, 10, and 14 do not occur as the middle part for any number n <= 35000 that has an odd number of parts in its symmetric representation of sigma.
For more information see A071562 and A237270.

Examples

			a(4)  = 12 since A071562(4)  =  6 and row  6 of A237270 is (12).
a(8)  =  8 since A071562(8)  = 15 and row 15 of A237270 is (8, 8, 8).
a(23) =  7 since A071562(23) = 49 and row 49 of A237270 is (25, 7, 25).
a(16) = 63 since A071562(16) = 32 and row 32 of A237270 is (63).
Possible layouts for the middle of sizes 4, 6, 10 and 14 with possible Dyck path continuations:
  area:  4          6             10               14
                                              _|_ _
                 _|_          _|_ _            |   |_ _
     _|_ _        | |_         |   |_          |_      |
      |   |       |   |_       |_    |_          |_    |_
      |_ _|_      |_ _ _|_       |_    |           |_    |
          |             |          |_ _|_            |_ _|_
                                       |                 |
		

Crossrefs

Programs

  • Mathematica
    (* function a237270[] is defined in A237270 and the property *)
    (* on odd divisors is used to minimize computations with a237270 *)
    row[n_] := Floor[(Sqrt[8n+1]-1)/2]
    evenExp[n_] := First[NestWhile[{#[[1]]+1, #[[2]]/2}&, {0,n}, EvenQ[Last[#]]&]]
    oddSRQ[n_] := Module[{e=2^evenExp[n], r=row[n]}, Select[Divisors[n/e], #<=r&&2 e #>r&]!={}]
    middle[list_] := list[[Ceiling[Length[list]/2]]]
    a295423[m_, n_] := Map[middle[a237270[#]]&, Select[Range[m, n], oddSRQ]]
    a295423[1, 170] (* data *)

A285426 Numbers n such that at least two consecutive elements of the n-th row of A237591 are in increasing order.

Original entry on oeis.org

14, 20, 25, 27, 33, 34, 35, 39, 42, 43, 44, 49, 50, 52, 53, 54, 56, 60, 61, 62, 63, 64, 65, 68, 69, 72, 73, 74, 75, 76, 77, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 1

Views

Author

Omar E. Pol, Apr 18 2017

Keywords

Comments

In other words: numbers n such that the elements of the n-th row of A237591 are not in nonincreasing order.
Note that the n-th row of A237591 is also the first half of the associated Dyck path of A237593.

Examples

			14 is in the sequence because the elements of the 14th row of A237591 are 8, 3, 1, 2, and they are not in nonincreasing order (note that the last two element are in increasing order).
		

Crossrefs

Programs

  • Python
    import math
    from sympy import sqrt
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
    def isok(n):
        l = [T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]
        return any(l[i + 1] > l[i] for i in range(len(l) - 1))
    print([n for n in range(1, 151) if isok(n)]) # Indranil Ghosh, Apr 20 2017
Showing 1-3 of 3 results.