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 254 results. Next

A240542 The midpoint of the (rotated) Dyck path from (0, n) to (n, 0) defined by A237593 has coordinates (a(n), a(n)). Also a(n) is the alternating sum of the n-th row of A235791.

Original entry on oeis.org

1, 2, 2, 3, 3, 5, 5, 6, 7, 7, 7, 9, 9, 9, 11, 12, 12, 13, 13, 15, 15, 15, 15, 17, 18, 18, 18, 20, 20, 22, 22, 23, 23, 23, 25, 26, 26, 26, 26, 28, 28, 30, 30, 30, 32, 32, 32, 34, 35, 36, 36, 36, 36, 38, 38, 40, 40, 40, 40, 42, 42, 42, 44, 45, 45, 47, 47, 47, 47, 49, 49, 52, 52
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 07 2014

Keywords

Comments

The sequence is closely related to the alternating harmonic series.
Its asymptotic behavior is lim_{k -> infinity} a(k)/k = log 2. The relative error is abs(a(k) - k*log(2))/(k*log(2)) <= 2/sqrt(k).
Conjecture 1: the sequence of first positions of the alternating runs of odd and even numbers in a(k) equals A028982. Example: the positions in (1),(2),2,(3),3,5,5,(6),(7),7,7,9,9,9,11,(12),12,(13),13,15,... are 1,2,4,8,9,16,18,... Checked with a Mathematica function through a(1000000).
See A235791, A237591 and A237593 for additional formulas and properties.
Conjecture 2: The sequence of differences a(n) - a(n-1), for n>=1, appears to be equal to A067742(n), the sequence of middle divisors of n; as an empty sum, a(0) = 0, (which was conjectured by Michel Marcus in the entry A237593). Checked with the two respective Mathematica functions up to n=100000. - Hartmut F. W. Hoft, Jul 17 2014
The number of occurrences of n is A259179(n). - Omar E. Pol, Dec 11 2016
Conjecture 3: a(n) is also the difference between the total number of partitions of all positive integers <= n into an odd number of consecutive parts, and the total number of partitions of all positive integers <= n into an even number of consecutive parts. - Omar E. Pol, Apr 28 2017
Conjecture 4: a(n) is also the total number of central subparts of all symmetric representations of sigma of all positive integers <= n. - Omar E. Pol, Apr 29 2017
a(n) is also the sum of the odd-indexed terms of the n-th row of the triangle A237591. - Omar E. Pol, Jun 20 2018
a(n) is the total number of middle divisors of all positive integers <= n (after Michel Marcus's conjecture in A237593). - Omar E. Pol, Aug 18 2021

Examples

			From _Omar E. Pol_, Dec 22 2020: (Start)
Illustration of initial terms in two ways in accordance with the sum of the odd-indexed terms of the rows of A237591:
.
n   a(n)                               _              _
1    1                               _|_|            |_|_
2    2                             _|_ _|            |_ _|
3    2                           _|_ _|              |_ _|_
4    3                         _|_ _ _|              |_ _ _|
5    3                       _|_ _ _|  _             |_ _ _|_ _
6    5                     _|_ _ _ _| |_|            |_ _ _ _|_|
7    5                   _|_ _ _ _|   |_|            |_ _ _ _|_|_
8    6                 _|_ _ _ _ _|  _|_|            |_ _ _ _ _|_|_
9    7               _|_ _ _ _ _|   |_ _|            |_ _ _ _ _|_ _|
10   7             _|_ _ _ _ _ _|   |_|              |_ _ _ _ _ _|_|
11   7           _|_ _ _ _ _ _|    _|_|              |_ _ _ _ _ _|_|_ _
12   9         _|_ _ _ _ _ _ _|   |_ _|              |_ _ _ _ _ _ _|_ _|
13   9       _|_ _ _ _ _ _ _|     |_ _|              |_ _ _ _ _ _ _|_ _|
14   9     _|_ _ _ _ _ _ _ _|    _|_|  _             |_ _ _ _ _ _ _ _|_|_ _
15  11   _|_ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _|_ _|_|_
16  12  |_ _ _ _ _ _ _ _ _|     |_ _| |_|            |_ _ _ _ _ _ _ _ _|_ _|_|
...
                  Figure 1.                                  Figure 2.
.
Figure 1 shows the illustration of initial terms taken from the isosceles triangle of A237593. For n = 16 there are (9 + 2 + 1) = 12 cells in the 16th row of the diagram, so a(16) = 12.
Figure 2 shows the illustration of initial terms taken from an octant of the pyramid described in A244050 and A245092. For n = 16 there are (9 + 2 + 1) = 12 cells in the 16th row of the diagram, so a(16) = 12.
Note that if we fold each level (or row) of that isosceles triangle of A237593 we essentially obtain the structure of the pyramid described in A245092 whose terraces at the n-th level have a total area equal to sigma(n) = A000203(n).
(End).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(k + 1) Ceiling[(n + 1)/k - (k + 1)/2], {k, 1, Floor[-1/2 + 1/2 Sqrt[8 n + 1]]}]; Table[a[n], {n, 40}]
  • PARI
    a(n) = sum(k=1, floor(-1/2 + 1/2*sqrt(8*n + 1)), (-1)^(k + 1)*ceil((n + 1)/k - (k + 1)/2)); \\ Indranil Ghosh, Apr 21 2017
    
  • Python
    from sympy import sqrt
    import math
    def a(n): return sum((-1)**(k + 1) * int(math.ceil((n + 1)/k - (k + 1)/2)) for k in range(1, int(math.floor(-1/2 + 1/2*sqrt(8*n + 1))) + 1))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 21 2017

Formula

a(n) = Sum_{k = 1..A003056(n)} (-1)^(k+1) A235791(n,k).
a(n) = A285901(n) - A285902(n), assuming the conjecture 3. - Omar E. Pol, Feb 15 2018
a(n) = n - A322141(n). - Omar E. Pol, Dec 22 2020

Extensions

More terms from Omar E. Pol, Apr 16 2014
Definition edited by N. J. A. Sloane, Dec 20 2020

A341971 Irregular triangle read by rows in which row n lists the values in row n of A235791 whose indices are in row n of A341970; a number is signed when its index is even.

Original entry on oeis.org

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

Views

Author

Hartmut F. W. Hoft, Feb 24 2021

Keywords

Comments

Row n has length A001227(n), the number of odd divisors of n, and also the number of entries in row n of A341970.
Let 1 <= n, 1 <= d <= A001227(n) and k = A341970(A060831(n-1) + d). Expression s(n, k) = r*n - r*(r+1)*(r+2)/6 + k with r = floor((sqrt(8*n + 1) - 1)/2) translates position (row n, column k) in the triangle of A235791 to its position in sequence A235791.
The absolute values in row n are the smallest parts of the partitions of n into consecutive parts (with the partitions ordered by increasing number of parts). - Omar E. Pol, Dec 31 2024

Examples

			Triangle begins:
   1
   2
   3  -1
   4
   5  -2
   6   1
   7  -3
   8
   9  -4   2
  10  -1
  11  -5
  12   3
  13  -6
  14  -2
  15  -7   4   1
  16
  17  -8
  18   5  -3
  19  -9
  20   2
  21 -10   6  -1
...
a(26)..a(29) = { 15, -7, 4, 1 } is row 15 in this sequence with corresponding row 15 { 1, 1, 1, 0, 1 } in A237048. The sum 15 - 7 = 8 represents the first (complete) part of the symmetric representation of sigma(15), while 4 gives to incomplete bottom subpart of the central part and 1 the complete subpart of the second layer on the diagonal of the central part. Because of the double counting on the diagonal the completed subparts of the symmetric central part have size 7 and 1 respectively, see A280851, so that the parts of the symmetric representation of sigma(15) are (8, 8, 8).
a(40)..a(43) = { 21, -10, 6, -1 } is row 21 in this sequence with corresponding row 21 { 1, 1, 1, 0, 0, 1 } in A237048. The sums 21 - 10 = 11 and 6 - 1 = 5 denote the sizes of the two (complete) parts of width 1 of the symmetric representation of sigma(21) up to the diagonal resulting in the four parts ( 11, 5, 5, 11 ).
		

Crossrefs

Programs

  • Mathematica
    (* Function a341970[ ] is defined in A341970 *)
    widthL[n_] := Rest[FoldList[#1+If[OddQ[#2], +1, -1]&, 0, a341970[n]]]
    sT[n_] := Map[(-1)^(#+1) Ceiling[(n+1)/# - (#+1)/2]&, a341970[n]]
    a341971[n_] := Flatten[Map[sT, Range[n]]]
    a341971[31] (* first 31 rows of table *)

Formula

a(A060831(n-1) + d) = T(n,d) = (-1)^(k+1)*A235791(s(n, k)).

A236630 Irregular triangle T(n,k) of alternating sums of squares of entries in the rows in the triangle of A235791, read by rows.

Original entry on oeis.org

1, 4, 9, 8, 16, 15, 25, 21, 36, 32, 33, 49, 40, 41, 64, 55, 56, 81, 65, 69, 100, 84, 88, 87, 121, 96, 100, 99, 144, 119, 128, 127, 169, 133, 142, 141, 196, 160, 169, 165, 225, 176, 192, 188, 189, 256, 207, 223, 219, 220, 289, 225, 241, 237, 238
Offset: 1

Views

Author

Omar E. Pol, Jan 29 2014

Keywords

Comments

The original name was: Number of "ON" cells at n-th stage in a cellular automaton (or pseudo cellular automaton) related to sigma (see Comments for precise definition).

Examples

			Triangle begins:
    1;
    4;
    9,   8;
   16,  15;
   25,  21;
   36,  32,  33;
   49,  40,  41;
   64,  55,  56;
   81,  65,  69;
  100,  84,  88,  87;
  121,  96, 100,  99;
  144, 119, 128, 127;
  169, 133, 142, 141;
  196, 160, 169, 165;
  225, 176, 192, 188, 189;
  256, 207, 223, 219, 220;
  289, 225, 241, 237, 238;
  ...
From _Omar E. Pol_, Apr 20 2024: (Start)
Illustration of the 6th row as the area of a polygon (or the number of cells) in the fourth quadrant:
.     _ _ _ _ _ _       _ _ _ _ _ _       _ _ _ _ _ _
.    |           |     |           |     |           |
.    |           |     |           |     |           |
.    |           |     |           |     |           |
.    |           |     |        _ _|     |          _|
.    |           |     |       |         |        _|
.    |_ _ _ _ _ _|     |_ _ _ _|         |_ _ _ _|
.
.          36           36 - 4 = 32     36 - 4 + 1 = 33
.
(End)
		

Crossrefs

Row n has length A003056(n).
The first element of column k is in row A000217(k).
Column 1 gives the positive terms of A000290.
Right border gives A024916.
Row n is the alternating sum of entries in row n of A236104.

Programs

  • Mathematica
    Map[Accumulate, Table[(-2 Boole[EvenQ[k]] + 1)*Ceiling[(n + 1)/k - (k + 1)/2]^2, {n, 20}, {k, Floor[(Sqrt[8*n + 1] - 1)/2]}]] // Flatten (* Michael De Vlieger, Apr 30 2024, after Hartmut F. W. Hoft at A235791 *)

Formula

From Hartmut F. W. Hoft, Apr 30 2024: (Start)
T(n, k) = Sum_{j = 1 .. k} (-1)^(j + 1) * S(n, j)^2, n >= 0, 1 <= k <= A003056(n), where S(n, j) is the j-th entry in the n-th row of the triangle of A235791.
T(n, k) = Sum_{j = 1 .. k} (-1)^(j+1) * S(n, j), n >= 0, 1 <= k <= A003056(n), where S(n, j) is the j-th entry in the n-th row of the triangle of A236104. (End)

Extensions

New name from Hartmut F. W. Hoft, Apr 27 2024
0 removed, offset changed and minor edits from Omar E. Pol, Apr 28 2024

A264116 Irregular triangle read by rows: T(n,k), n>=1, k>=1, of the alternating sum of entries 1 through k in the n-th row of A235791; the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 3, 6, 4, 5, 7, 4, 5, 8, 5, 6, 9, 5, 7, 10, 6, 8, 7, 11, 6, 8, 7, 12, 7, 10, 9, 13, 7, 10, 9, 14, 8, 11, 9, 15, 8, 12, 10, 11, 16, 9, 13, 11, 12, 17, 9, 13, 11, 12, 18, 10, 15, 12, 13, 19, 10, 15, 12, 13, 20, 11, 16, 13, 15, 21, 11, 17, 14, 16, 15, 22, 12, 18, 14, 16, 15
Offset: 1

Views

Author

Hartmut F. W. Hoft, Nov 03 2015

Keywords

Comments

The numbers in the n-th row of the triangle are the coordinates on the diagonal in the first quadrant of the polygons constructed by alternately adding and subtracting squares taken from the n-th row of A236104. The boundary from (0,n) to (n,0) of the final polygon is the Dyck path as defined in the n-th row of A237593. Therefore, using the arguments in A196020, A236104 and A071561, sigma(n) equals the area of its symmetric representation, for all n>=1.
The right border gives A240542.
For an image of the construction process of the Dyck path for sigma(15) see the image file in the Links section.
The length of the n-th row is A003056(n). - Omar E. Pol, Nov 03 2015

Examples

			The data in form of the irregular triangle T(n,k):
1;
2;
3,   2;
4,   3;
5,   3;
6,   4,  5;
7,   4,  5;
8,   5,  6;
9,   5,  7;
10,  6,  8,  7;
11,  6,  8,  7;
12,  7, 10,  9;
13,  7, 10,  9;
14,  8, 11,  9;
15,  8, 12, 10, 11;
16,  9, 13, 11, 12;
17,  9, 13, 11, 12;
18, 10, 15, 12, 13;
19, 10, 15, 12, 13;
20, 11, 16, 13, 15;
21, 11, 17, 14, 16, 15;
22, 12, 18, 14, 16, 15;
		

Crossrefs

Programs

  • Mathematica
    a264116[n_, k_] := Sum[(-1)^(i+1)*Ceiling[(n+1)/i - (i+1)/2], {i,k}]
    a264116[n_] := Map[a264116[n, #]&, Range[Floor[(Sqrt[8*n+1] - 1)/2]]]
    Flatten[Map[a264116,Range[22]]] (* data *)

Formula

T(n, k) = Sum_{i=1..k} (-1)^(i+1) A235791(n,i), for n>=1 and 1<=k<=floor((sqrt(8n+1) - 1)/2).

A339577 a(n) = product of nonzero entries in row n of A235791.

Original entry on oeis.org

1, 2, 3, 4, 10, 12, 21, 24, 72, 80, 110, 180, 234, 504, 840, 896, 1088, 2160, 2565, 5400, 7560, 10560, 12144, 14784, 25200, 32760, 84240, 87360, 97440, 181440, 200880, 207360, 380160, 456960, 1249500, 1413720, 1538460, 1805760, 2845440, 3502080, 3778560, 7076160, 7606872, 15567552
Offset: 1

Views

Author

N. J. A. Sloane, Dec 19 2020

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> mul(ceil((n+1)/k-(k+1)/2), k=1..floor((sqrt(8*n+1)-1)/2)):
    seq(a(n), n=1..60);

A348473 a(n) = Sum_{k=1..A003056(n)} 2^(T(n,k)-1), where T(n,k) = k-th term in row n of A235791.

Original entry on oeis.org

1, 2, 5, 9, 18, 35, 69, 133, 266, 523, 1043, 2069, 4133, 8230, 16459, 32843, 65675, 131221, 262421, 524566, 1049127, 2097707, 4195371, 8389707, 16779341, 33556565, 67113110, 134221975, 268443799, 536879403, 1073758507, 2147500331, 4295000621, 8589967949, 17179935318
Offset: 1

Views

Author

Michael De Vlieger, Oct 19 2021

Keywords

Comments

Decimal value of binary compactification of A235791.

Examples

			Row 3 of A235791 contains {3,1}, thus, a(3) = 2^(3-1) + 2(1-1)= 2^2 + 2^0 = 4+1 = 5.
Omar E. Pol's diagram of rows of A235791:
.                                    y         a(n)_2          a(n)
Row                                 _|    -------------------------
1                                 _|1| ->                1 =     1
2                               _|2 _| ->               10 =     2
3                             _|3  |1| ->              101 =     5
4                           _|4   _|1| ->             1001 =     9
5                         _|5    |2 _| ->            10010 =    18
6                       _|6     _|2|1| ->           100011 =    35
7                     _|7      |3  |1| ->          1000101 =    69
8                   _|8       _|3 _|1| ->         10000101 =   133
9                 _|9        |4  |2 _| ->        100001010 =   266
10              _|10        _|4  |2|1| ->       1000001011 =   523
11            _|11         |5   _|2|1| ->      10000010011 =  1043
12          _|12          _|5  |3  |1| ->     100000010101 =  2069
13        _|13           |6    |3 _|1| ->    1000000100101 =  4133
14      _|14            _|6   _|3|2 _| ->   10000000100110 =  8230
15    _|15             |7    |4  |2|1| ->  100000001001011 = 16459
16  _|16              _|7    |4  |2|1| -> 1000000001001011 = 32843
...
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Array[2^(-1 + Ceiling[(n + 1)/# - (# + 1)/2]) &, Floor[(Sqrt[8 n + 1] - 1)/2]], {n, 35}]
    (* Regenerate k rows of A235791 using the b-file *)
    With[{k = 120}, MapIndexed[1 + First[#2] - Position[IntegerDigits[#1, 2], 1][[All, 1]] &, Import["https://oeis.org/A348473/b348473.txt", "Data"][[1 ;; k, -1]]]] (* Michael De Vlieger, Oct 21 2021 *)

A348475 a(n) = Product_{k=1..A003056(n)} prime(T(n,k)), where T(n,k) = k-th term in row n of A235791.

Original entry on oeis.org

2, 3, 10, 14, 33, 78, 170, 190, 483, 1218, 2046, 4070, 5330, 8385, 33558, 37842, 47082, 127490, 169510, 269445, 825630, 1250886, 1404858, 1969926, 4270910, 6988190, 13239105, 27506490, 29387490, 61019322, 74958702, 77319606, 191617790, 254235170, 715103895, 1549364190
Offset: 1

Views

Author

Michael De Vlieger, Oct 19 2021

Keywords

Comments

Prime product compactification of A235791.
All terms are squarefree.

Examples

			Row 3 of A235791 contains {3,1}, thus, a(3) = prime(3)*prime(1) = 5*2 = 10.
Omar E. Pol's diagram of rows of A235791:
.                                    y    row a(n) of A067255*   a(n)
Row                                 _|    --------------------------
1                                 _|1| -> 1                 =      2
2                               _|2 _| -> .1                =      3
3                             _|3  |1| -> 1.1               =     10
4                           _|4   _|1| -> 1..1              =     14
5                         _|5    |2 _| -> .1..1             =     33
6                       _|6     _|2|1| -> 11...1            =     78
7                     _|7      |3  |1| -> 1.1...1           =    170
8                   _|8       _|3 _|1| -> 1.1....1          =    190
9                 _|9        |4  |2 _| -> .1.1....1         =    483
10              _|10        _|4  |2|1| -> 11.1.....1        =   1218
11            _|11         |5   _|2|1| -> 11..1.....1       =   2046
12          _|12          _|5  |3  |1| -> 1.1.1......1      =   4070
13        _|13           |6    |3 _|1| -> 1.1..1......1     =   5330
14      _|14            _|6   _|3|2 _| -> .11..1.......1    =   8385
15    _|15             |7    |4  |2|1| -> 11.1..1.......1   =  33558
16  _|16              _|7    |4  |2|1| -> 11.1..1........1  =  37842
...
* we replace 0 with "." for clarity.
		

Crossrefs

Programs

  • Mathematica
    Table[Times @@ Array[Prime@ Ceiling[(n + 1)/# - (# + 1)/2] &, Floor[(Sqrt[8 n + 1] - 1)/2]], {n, 35}]
    (* Use the b-file to generate k rows of A235791 *)
    With[{k = 120}, MapIndexed[Reverse[PrimePi /@ FactorInteger[#][[All, 1]]] &, Import["https://oeis.org/A348475/b348475.txt", "Data"][[1 ;; k, -1]]]] (* Michael De Vlieger, Oct 21 2021 *)

A237593 Triangle read by rows in which row n lists the elements of the n-th row of A237591 followed by the same elements in reverse order.

Original entry on oeis.org

1, 1, 2, 2, 2, 1, 1, 2, 3, 1, 1, 3, 3, 2, 2, 3, 4, 1, 1, 1, 1, 4, 4, 2, 1, 1, 2, 4, 5, 2, 1, 1, 2, 5, 5, 2, 2, 2, 2, 5, 6, 2, 1, 1, 1, 1, 2, 6, 6, 3, 1, 1, 1, 1, 3, 6, 7, 2, 2, 1, 1, 2, 2, 7, 7, 3, 2, 1, 1, 2, 3, 7, 8, 3, 1, 2, 2, 1, 3, 8, 8, 3, 2, 1, 1, 1, 1, 2, 3, 8
Offset: 1

Views

Author

Omar E. Pol, Feb 22 2014

Keywords

Comments

Row n is a palindromic composition of 2*n.
T(n,k) is also the length of the k-th segment in a Dyck path on the first quadrant of the square grid, connecting the x-axis with the y-axis, from (n, 0) to (0, n), starting with a segment in vertical direction, see example.
Conjecture 1: the area under the n-th Dyck path equals A024916(n), the sum of all divisors of all positive integers <= n.
If the conjecture is true then the n-th Dyck path represents the boundary segments after the alternating sum of the elements of the n-th row of A236104.
Conjecture 2: two adjacent Dyck paths never cross (checked by hand up to n = 128), hence the total area between the n-th Dyck path and the (n-1)-st Dyck path is equal to sigma(n) = A000203(n), the sum of divisors of n.
The connection between A196020 and A237271 is as follows: A196020 --> A236104 --> A235791 --> A237591 --> this sequence --> A239660 --> A237270 --> A237271.
PARI scripts area(n) and chkcross(n) have been written to check the 2 properties and have been run up to n=10000. - Michel Marcus, Mar 27 2014
Mathematica functions have been written that verified the 2 properties through n=30000. - Hartmut F. W. Hoft, Apr 07 2014
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)
The symmetric representation of sigma, so defined, is row n of A237270. - Peter Munn, Jan 06 2025
It appears that, for the n-th set, the number of cells lying on the first diagonal is equal to A067742(n), the number of middle divisors of n. - Michel Marcus, Jun 21 2014
Checked Michel Marcus's conjecture with two Mathematica functions up to n=100000, for more information see A240542. - Hartmut F. W. Hoft, Jul 17 2014
A003056(n) is also the number of peaks of the Dyck path related to the n-th row of triangle. - Omar E. Pol, Nov 03 2015
The number of peaks of the Dyck path associated to the row A000396(n) of this triangle equals the n-th Mersenne prime A000668(n), hence Mersenne primes are visible in two ways at the pyramid described in A245092. - Omar E. Pol, Dec 19 2016
The limit as n approaches infinity (area under the Dyck path described in the n-th row of triangle divided by n^2) equals Pi^2/12 = zeta(2)/2. (Cf. A072691.) - Omar E. Pol, Dec 18 2021
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - Omar E. Pol, Nov 09 2022

Examples

			Triangle begins:
   n
   1 |  1, 1;
   2 |  2, 2;
   3 |  2, 1, 1, 2;
   4 |  3, 1, 1, 3;
   5 |  3, 2, 2, 3;
   6 |  4, 1, 1, 1, 1, 4;
   7 |  4, 2, 1, 1, 2, 4;
   8 |  5, 2, 1, 1, 2, 5;
   9 |  5, 2, 2, 2, 2, 5;
  10 |  6, 2, 1, 1, 1, 1, 2, 6;
  11 |  6, 3, 1, 1, 1, 1, 3, 6;
  12 |  7, 2, 2, 1, 1, 2, 2, 7;
  13 |  7, 3, 2, 1, 1, 2, 3, 7;
  14 |  8, 3, 1, 2, 2, 1, 3, 8;
  15 |  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  16 |  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  17 |  9, 4, 2, 1, 1, 1, 1, 2, 4, 9;
  18 | 10, 3, 2, 2, 1, 1, 2, 2, 3, 10;
  19 | 10, 4, 2, 2, 1, 1, 2, 2, 4, 10;
  20 | 11, 4, 2, 1, 2, 2, 1, 2, 4, 11;
  21 | 11, 4, 3, 1, 1, 1, 1, 1, 1, 3, 4, 11;
  22 | 12, 4, 2, 2, 1, 1, 1, 1, 2, 2, 4, 12;
  23 | 12, 5, 2, 2, 1, 1, 1, 1, 2, 2, 5, 12;
  24 | 13, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 13;
  ...
Illustration of rows 8 and 9 interpreted as Dyck paths in the first quadrant and the illustration of the symmetric representation of sigma(9) = 5 + 3 + 5 = 13, see below:
.
y                       y
.                       .
.                       ._ _ _ _ _                _ _ _ _ _ 5
._ _ _ _ _              .         |              |_ _ _ _ _|
.         |             .         |_ _                     |_ _ 3
.         |_            .             |                    |_  |
.           |_ _        .             |_ _                   |_|_ _ 5
.               |       .                 |                      | |
.   Area = 56   |       .    Area = 69    |          Area = 13   | |
.               |       .                 |                      | |
.               |       .                 |                      | |
. . . . . . . . | . x   . . . . . . . . . | . x                  |_|
.
.    Fig. 1                    Fig. 2                  Fig. 3
.
Figure 1. For n = 8 the 8th row of triangle is [5, 2, 1, 1, 2, 5] and the area under the symmetric Dyck path is equal to A024916(8) = 56.
Figure 2. For n = 9 the 9th row of triangle is [5, 2, 2, 2, 2, 5] and the area under the symmetric Dyck path is equal to A024916(9) = 69.
Figure 3. The symmetric representation of sigma(9): between both symmetric Dyck paths there are three regions (or parts) of sizes [5, 3, 5].
The sum of divisors of 9 is 1 + 3 + 9 = A000203(9) = 13. On the other hand the difference between the areas under the Dyck paths equals the sum of the parts of the symmetric representation of sigma(9) = 69 - 56 = 5 + 3 + 5 = 13, equaling the sum of divisors of 9.
.
Illustration of initial terms as Dyck paths in the first quadrant:
(row n = 1..28)
.  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  |_ _ _ _ _ _ _ _ _ _ _ _ _ _  |
  |_ _ _ _ _ _ _ _ _ _ _ _ _ _| |
  |_ _ _ _ _ _ _ _ _ _ _ _ _  | |
  |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
  |_ _ _ _ _ _ _ _ _ _ _ _  | | |_ _ _
  |_ _ _ _ _ _ _ _ _ _ _ _| | |_ _ _  |
  |_ _ _ _ _ _ _ _ _ _ _  | | |_ _  | |_
  |_ _ _ _ _ _ _ _ _ _ _| | |_ _ _| |_  |_
  |_ _ _ _ _ _ _ _ _ _  | |       |_ _|   |_
  |_ _ _ _ _ _ _ _ _ _| | |_ _    |_  |_ _  |_ _
  |_ _ _ _ _ _ _ _ _  | |_ _ _|     |_  | |_ _  |
  |_ _ _ _ _ _ _ _ _| | |_ _  |_      |_|_ _  | |
  |_ _ _ _ _ _ _ _  | |_ _  |_ _|_        | | | |_ _ _ _ _
  |_ _ _ _ _ _ _ _| |     |     | |_ _    | |_|_ _ _ _ _  |
  |_ _ _ _ _ _ _  | |_ _  |_    |_  | |   |_ _ _ _ _  | | |
  |_ _ _ _ _ _ _| |_ _  |_  |_ _  | | |_ _ _ _ _  | | | | |
  |_ _ _ _ _ _  | |_  |_  |_    | |_|_ _ _ _  | | | | | | |
  |_ _ _ _ _ _| |_ _|   |_  |   |_ _ _ _  | | | | | | | | |
  |_ _ _ _ _  |     |_ _  | |_ _ _ _  | | | | | | | | | | |
  |_ _ _ _ _| |_      | |_|_ _ _  | | | | | | | | | | | | |
  |_ _ _ _  |_ _|_    |_ _ _  | | | | | | | | | | | | | | |
  |_ _ _ _| |_  | |_ _ _  | | | | | | | | | | | | | | | | |
  |_ _ _  |_  |_|_ _  | | | | | | | | | | | | | | | | | | |
  |_ _ _|   |_ _  | | | | | | | | | | | | | | | | | | | | |
  |_ _  |_ _  | | | | | | | | | | | | | | | | | | | | | | |
  |_ _|_  | | | | | | | | | | | | | | | | | | | | | | | | |
  |_  | | | | | | | | | | | | | | | | | | | | | | | | | | |
  |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
.
n: 1 2 3 4 5 6 7 8 9 10..12..14..16..18..20..22..24..26..28
.
It appears that the total area (also the total number of cells) in the first n set of symmetric regions of the diagram is equal to A024916(n), the sum of all divisors of all positive integers <= n.
It appears that the total area (also the total number of cells) in the n-th set of symmetric regions of the diagram is equal to sigma(n) = A000203(n) (checked by hand up n = 128).
From _Omar E. Pol_, Aug 18 2015: (Start)
The above diagram is also the top view of the stepped pyramid described in A245092 and it is also the top view of the staircase described in A244580, in both cases the figure represents the first 28 levels of the structure. Note that the diagram contains (and arises from) a hidden pattern which is shown below.
.
Illustration of initial terms as an isosceles triangle:
Row                                 _ _
1                                 _|1|1|_
2                               _|2 _|_ 2|_
3                             _|2  |1|1|  2|_
4                           _|3   _|1|1|_   3|_
5                         _|3    |2 _|_ 2|    3|_
6                       _|4     _|1|1|1|1|_     4|_
7                     _|4      |2  |1|1|  2|      4|_
8                   _|5       _|2 _|1|1|_ 2|_       5|_
9                 _|5        |2  |2 _|_ 2|  2|        5|_
10              _|6         _|2  |1|1|1|1|  2|_         6|_
11            _|6          |3   _|1|1|1|1|_   3|          6|_
12          _|7           _|2  |2  |1|1|  2|  2|_           7|_
13        _|7            |3    |2 _|1|1|_ 2|    3|            7|_
14      _|8             _|3   _|1|2 _|_ 2|1|_   3|_             8|_
15    _|8              |3    |2  |1|1|1|1|  2|    3|              8|_
16   |9                |3    |2  |1|1|1|1|  2|    3|                9|
...
This diagram is the simpler representation of the sequence.
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
Note that this symmetric pattern also emerges from the front view of the stepped pyramid described in A245092, which is related to sigma A000203, the sum-of-divisors function, and other related sequences. The diagram represents the first 16 levels of the pyramid. (End)
		

Crossrefs

Row n has length 2*A003056(n).
Row sums give A005843, n >= 1.
Column k starts in row A008805(k-1).
Column 1 = right border = A008619, n >= 1.
Bisections are in A259176, A259177.
For further information see A262626.

Programs

  • Mathematica
    row[n_]:=Floor[(Sqrt[8n+1]-1)/2]
    s[n_,k_]:=Ceiling[(n+1)/k-(k+1)/2]-Ceiling[(n+1)/(k+1)-(k+2)/2]
    f[n_,k_]:=If[k<=row[n],s[n,k],s[n,2 row[n]+1-k]]
    TableForm[Table[f[n,k],{n,1,50},{k,1,2 row[n]}]] (* Hartmut F. W. Hoft, Apr 08 2014 *)
  • PARI
    row(n) = {my(orow = row237591(n)); vector(2*#orow, i, if (i <= #orow, orow[i], orow[2*#orow-i+1]));}
    area(n) = {my(rown = row(n)); surf = 0; h = n; odd = 1; for (i=1, #row, if (odd, surf += h*rown[i], h -= rown[i];); odd = !odd;); surf;}
    heights(v, n) = {vh = vector(n); ivh = 1; h = n; odd = 1; for (i=1, #v, if (odd, for (j=1, v[i], vh[ivh] = h; ivh++), h -= v[i];); odd = !odd;); vh;}
    isabove(hb, ha) = {for (i=1, #hb, if (hb[i] < ha[i], return (0));); return (1);}
    chkcross(nn) = {hga = concat(heights(row(1), 1), 0); for (n=2, nn, hgb = heights(row(n), n); if (! isabove(hgb, hga), print("pb cross at n=", n)); hga = concat(hgb, 0););} \\ Michel Marcus, Mar 27 2014
    
  • Python
    from sympy import sqrt
    import math
    def row(n): return int(math.floor((sqrt(8*n + 1) - 1)/2))
    def s(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
    def T(n, k): return s(n, k) if k<=row(n) else s(n, 2*row(n) + 1 - k)
    for n in range(1, 11): print([T(n, k) for k in range(1, 2*row(n) + 1)]) # Indranil Ghosh, Apr 21 2017

Formula

Let j(n)= floor((sqrt(8n+1)-1)/2) then T(n,k) = A237591(n,k), if k <= j(n); otherwise T(n,k) = A237591(n,2*j(n)+1-k). - Hartmut F. W. Hoft, Apr 07 2014 (corrected by Omar E. Pol, May 31 2015)

Extensions

A minor edit to the definition. - N. J. A. Sloane, Jul 31 2025

A237270 Triangle read by rows in which row n lists the parts of the symmetric representation of sigma(n).

Original entry on oeis.org

1, 3, 2, 2, 7, 3, 3, 12, 4, 4, 15, 5, 3, 5, 9, 9, 6, 6, 28, 7, 7, 12, 12, 8, 8, 8, 31, 9, 9, 39, 10, 10, 42, 11, 5, 5, 11, 18, 18, 12, 12, 60, 13, 5, 13, 21, 21, 14, 6, 6, 14, 56, 15, 15, 72, 16, 16, 63, 17, 7, 7, 17, 27, 27, 18, 12, 18, 91, 19, 19, 30, 30, 20, 8, 8, 20, 90
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2014

Keywords

Comments

T(n,k) is the number of cells in the k-th region of the n-th set of regions in a diagram of the symmetry of sigma(n), see example.
Row n is a palindromic composition of sigma(n).
Row sums give A000203.
Row n has length A237271(n).
In the row 2n-1 of triangle both the first term and the last term are equal to n.
If n is an odd prime then row n is [m, m], where m = (1 + n)/2.
The connection with A196020 is as follows: A196020 --> A236104 --> A235791 --> A237591 --> A237593 --> A239660 --> this sequence.
For the boundary segments in an octant see A237591.
For the boundary segments in a quadrant see A237593.
For the boundary segments in the spiral see also A239660.
For the parts in every quadrant of the spiral see A239931, A239932, A239933, A239934.
We can find the spiral on the terraces of the stepped pyramid described in A244050. - Omar E. Pol, Dec 07 2016
T(n,k) is also the area of the k-th terrace, from left to right, at the n-th level, starting from the top, of the stepped pyramid described in A245092 (see Links section). - Omar E. Pol, Aug 14 2018

Examples

			Illustration of the first 27 terms as regions (or parts) of a spiral constructed with the first 15.5 rows of A239660:
.
.                  _ _ _ _ _ _ _ _
.                 |  _ _ _ _ _ _ _|_ _ _ _ _ _ _ 7
.                 | |             |_ _ _ _ _ _ _|
.             12 _| |                           |
.               |_ _|  _ _ _ _ _ _              |_ _
.         12 _ _|     |  _ _ _ _ _|_ _ _ _ _ 5      |_
.      _ _ _| |    9 _| |         |_ _ _ _ _|         |
.     |  _ _ _|  9 _|_ _|                   |_ _ 3    |_ _ _ 7
.     | |      _ _| |      _ _ _ _          |_  |         | |
.     | |     |  _ _| 12 _|  _ _ _|_ _ _ 3    |_|_ _ 5    | |
.     | |     | |      _|   |     |_ _ _|         | |     | |
.     | |     | |     |  _ _|           |_ _ 3    | |     | |
.     | |     | |     | |    3 _ _        | |     | |     | |
.     | |     | |     | |     |  _|_ 1    | |     | |     | |
.    _|_|    _|_|    _|_|    _|_| |_|    _|_|    _|_|    _|_|    _
.   | |     | |     | |     | |         | |     | |     | |     | |
.   | |     | |     | |     |_|_ _     _| |     | |     | |     | |
.   | |     | |     | |    2  |_ _|_ _|  _|     | |     | |     | |
.   | |     | |     |_|_     2    |_ _ _|7   _ _| |     | |     | |
.   | |     | |    4    |_                 _|  _ _|     | |     | |
.   | |     |_|_ _        |_ _ _ _        |  _|    _ _ _| |     | |
.   | |    6      |_      |_ _ _ _|_ _ _ _| | 15 _|    _ _|     | |
.   |_|_ _ _        |_   4        |_ _ _ _ _|  _|     |    _ _ _| |
.  8      | |_ _      |                       |      _|   |  _ _ _|
.         |_    |     |_ _ _ _ _ _            |  _ _|28  _| |
.           |_  |_    |_ _ _ _ _ _|_ _ _ _ _ _| |      _|  _|
.          8  |_ _|  6            |_ _ _ _ _ _ _|  _ _|  _|
.                 |                               |  _ _|  31
.                 |_ _ _ _ _ _ _ _                | |
.                 |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _| |
.                8                |_ _ _ _ _ _ _ _ _|
.
.
[For two other drawings of the spiral see the links. - _N. J. A. Sloane_, Nov 16 2020]
If the sequence does not contain negative terms then its terms can be represented in a quadrant. For the construction of the diagram we use the symmetric Dyck paths of A237593 as shown below:
---------------------------------------------------------------
Triangle         Diagram of the symmetry of sigma (n = 1..24)
---------------------------------------------------------------
.              _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1;            |_| | | | | | | | | | | | | | | | | | | | | | | |
3;            |_ _|_| | | | | | | | | | | | | | | | | | | | | |
2, 2;         |_ _|  _|_| | | | | | | | | | | | | | | | | | | |
7;            |_ _ _|    _|_| | | | | | | | | | | | | | | | | |
3, 3;         |_ _ _|  _|  _ _|_| | | | | | | | | | | | | | | |
12;           |_ _ _ _|  _| |  _ _|_| | | | | | | | | | | | | |
4, 4;         |_ _ _ _| |_ _|_|    _ _|_| | | | | | | | | | | |
15;           |_ _ _ _ _|  _|     |  _ _ _|_| | | | | | | | | |
5, 3, 5;      |_ _ _ _ _| |      _|_| |  _ _ _|_| | | | | | | |
9, 9;         |_ _ _ _ _ _|  _ _|    _| |    _ _ _|_| | | | | |
6, 6;         |_ _ _ _ _ _| |  _|  _|  _|   |  _ _ _ _|_| | | |
28;           |_ _ _ _ _ _ _| |_ _|  _|  _ _| | |  _ _ _ _|_| |
7, 7;         |_ _ _ _ _ _ _| |  _ _|  _|    _| | |    _ _ _ _|
12, 12;       |_ _ _ _ _ _ _ _| |     |     |  _|_|   |* * * *
8, 8, 8;      |_ _ _ _ _ _ _ _| |  _ _|  _ _|_|       |* * * *
31;           |_ _ _ _ _ _ _ _ _| |  _ _|  _|      _ _|* * * *
9, 9;         |_ _ _ _ _ _ _ _ _| | |_ _ _|      _|* * * * * *
39;           |_ _ _ _ _ _ _ _ _ _| |  _ _|    _|* * * * * * *
10, 10;       |_ _ _ _ _ _ _ _ _ _| | |       |* * * * * * * *
42;           |_ _ _ _ _ _ _ _ _ _ _| |  _ _ _|* * * * * * * *
11, 5, 5, 11; |_ _ _ _ _ _ _ _ _ _ _| | |* * * * * * * * * * *
18, 18;       |_ _ _ _ _ _ _ _ _ _ _ _| |* * * * * * * * * * *
12, 12;       |_ _ _ _ _ _ _ _ _ _ _ _| |* * * * * * * * * * *
60;           |_ _ _ _ _ _ _ _ _ _ _ _ _|* * * * * * * * * * *
...
The total number of cells in the first n set of symmetric regions of the diagram equals A024916(n), the sum of all divisors of all positive integers <= n, hence the total number of cells in the n-th set of symmetric regions of the diagram equals sigma(n) = A000203(n).
For n = 9 the 9th row of A237593 is [5, 2, 2, 2, 2, 5] and the 8th row of A237593 is [5, 2, 1, 1, 2, 5] therefore between both symmetric Dyck paths there are three regions (or parts) of sizes [5, 3, 5], so row 9 is [5, 3, 5].
The sum of divisors of 9 is 1 + 3 + 9 = A000203(9) = 13. On the other hand the sum of the parts of the symmetric representation of sigma(9) is 5 + 3 + 5 = 13, equaling the sum of divisors of 9.
For n = 24 the 24th row of A237593 is [13, 4, 3, 2, 1, 1, 1, 1, 2, 3, 4, 13] and the 23rd row of A237593 is [12, 5, 2, 2, 1, 1, 1, 1, 2, 2, 5, 12] therefore between both symmetric Dyck paths there are only one region (or part) of size 60, so row 24 is 60.
The sum of divisors of 24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 = A000203(24) = 60. On the other hand the sum of the parts of the symmetric representation of sigma(24) is 60, equaling the sum of divisors of 24.
Note that the number of *'s in the diagram is 24^2 - A024916(24) = 576 - 491 = A004125(24) = 85.
From _Omar E. Pol_, Nov 22 2020: (Start)
Also consider the infinite double-staircases diagram defined in A335616 (see the theorem).
For n = 15 the diagram with first 15 levels looks like this:
.
Level                         "Double-staircases" diagram
.                                          _
1                                        _|1|_
2                                      _|1 _ 1|_
3                                    _|1  |1|  1|_
4                                  _|1   _| |_   1|_
5                                _|1    |1 _ 1|    1|_
6                              _|1     _| |1| |_     1|_
7                            _|1      |1  | |  1|      1|_
8                          _|1       _|  _| |_  |_       1|_
9                        _|1        |1  |1 _ 1|  1|        1|_
10                     _|1         _|   | |1| |   |_         1|_
11                   _|1          |1   _| | | |_   1|          1|_
12                 _|1           _|   |1  | |  1|   |_           1|_
13               _|1            |1    |  _| |_  |    1|            1|_
14             _|1             _|    _| |1 _ 1| |_    |_             1|_
15            |1              |1    |1  | |1| |  1|    1|              1|
.
Starting from A196020 and after the algorithm described in A280850 and A296508 applied to the above diagram we have a new diagram as shown below:
.
Level                             "Ziggurat" diagram
.                                          _
6                                         |1|
7                            _            | |            _
8                          _|1|          _| |_          |1|_
9                        _|1  |         |1   1|         |  1|_
10                     _|1    |         |     |         |    1|_
11                   _|1      |        _|     |_        |      1|_
12                 _|1        |       |1       1|       |        1|_
13               _|1          |       |         |       |          1|_
14             _|1            |      _|    _    |_      |            1|_
15            |1              |     |1    |1|    1|     |              1|
.
The 15th row
of A249351 :  [1,1,1,1,1,1,1,1,0,0,0,1,1,1,2,1,1,1,0,0,0,1,1,1,1,1,1,1,1]
The 15th row
of triangle:  [              8,            8,            8              ]
The 15th row
of A296508:   [              8,      7,    1,    0,      8              ]
The 15th row
of A280851    [              8,      7,    1,            8              ]
.
More generally, for n >= 1, it appears there is the same correspondence between the original diagram of the symmetric representation of sigma(n) and the "Ziggurat" diagram of n.
For the definition of subparts see A239387 and also A296508, A280851. (End)
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_] := Ceiling[(n + 1)/k - (k + 1)/2] (* from A235791 *)
    path[n_] := Module[{c = Floor[(Sqrt[8n + 1] - 1)/2], h, r, d, rd, k, p = {{0, n}}}, h = Map[T[n, #] - T[n, # + 1] &, Range[c]]; r = Join[h, Reverse[h]]; d = Flatten[Table[{{1, 0}, {0, -1}}, {c}], 1];
    rd = Transpose[{r, d}]; For[k = 1, k <= 2c, k++, p = Join[p, Map[Last[p] + rd[[k, 2]] * # &, Range[rd[[k, 1]]]]]]; p]
    segments[n_] := SplitBy[Map[Min, Drop[Drop[path[n], 1], -1] - path[n - 1]], # == 0 &]
    a237270[n_] := Select[Map[Apply[Plus, #] &, segments[n]], # != 0 &]
    Flatten[Map[a237270, Range[40]]] (* data *)
    (* Hartmut F. W. Hoft, Jun 23 2014 *)

Formula

T(n, k) = (A384149(n, k) + A384149(n, m+1-k))/2, where m = A237271(n) is the row length. (conjectured) - Peter Munn, Jun 01 2025

Extensions

Drawing of the spiral extended by Omar E. Pol, Nov 22 2020

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
Showing 1-10 of 254 results. Next