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

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

A236104 Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists k copies of the positive squares in nondecreasing order, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

1, 4, 9, 1, 16, 1, 25, 4, 36, 4, 1, 49, 9, 1, 64, 9, 1, 81, 16, 4, 100, 16, 4, 1, 121, 25, 4, 1, 144, 25, 9, 1, 169, 36, 9, 1, 196, 36, 9, 4, 225, 49, 16, 4, 1, 256, 49, 16, 4, 1, 289, 64, 16, 4, 1, 324, 64, 25, 9, 1, 361, 81, 25, 9, 1, 400, 81, 25, 9, 4
Offset: 1

Views

Author

Omar E. Pol, Jan 23 2014

Keywords

Comments

These are the squares of the entries of the triangle in A235791: T(n,k) = (A235791(n,k))^2.
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Columns 1-3 (including the initial zeros) are A000290, A008794, A211547.
Also column k lists the partial sums of the k-th column of triangle A196020 which gives an identity for sigma.
Since all the elements of this sequence are squares, we can draw an illustration of the alternating sum of row n step by step, and a symmetric diagram for A000203, A024916, A004125; see example.
For more information about the diagram see A237593.

Examples

			Triangle begins:
    1;
    4;
    9,   1;
   16,   1;
   25,   4;
   36,   4,   1;
   49,   9,   1;
   64,   9,   1;
   81,  16,   4;
  100,  16,   4,   1;
  121,  25,   4,   1;
  144,  25,   9,   1;
  169,  36,   9,   1;
  196,  36,   9,   4;
  225,  49,  16,   4,   1;
  256,  49,  16,   4,   1;
  289,  64,  16,   4,   1;
  324,  64,  25,   9,   1;
  361,  81,  25,   9,   1;
  400,  81,  25,   9,   4;
  441, 100,  36,   9,   4,   1;
  484, 100,  36,  16,   4,   1;
  529, 121,  36,  16,   4,   1;
  576, 121,  49,  16,   4,   1;
  ...
For n = 6 the sum of all divisors of all positive integers <= 6 is [1] + [1+2] + [1+3] + [1+2+4] + [1+5] + [1+2+3+6] = 1 + 3 + 4 + 7 + 6 + 12 = 33. On the other hand the 6th row of triangle is 36, 4, 1, therefore the alternating row sum is 36 - 4 + 1 = 33, equaling the sum of all divisors of all positive integers <= 6.
Illustration of the alternating sum of the 6th row as the area of a polygon (or the number of cells), step by step, in the fourth quadrant:
.     _ _ _ _ _ _       _ _ _ _ _ _       _ _ _ _ _ _
.    |           |     |           |     |           |
.    |           |     |           |     |           |
.    |           |     |           |     |           |
.    |           |     |        _ _|     |          _|
.    |           |     |       |         |        _|
.    |_ _ _ _ _ _|     |_ _ _ _|         |_ _ _ _|
.
.          36           36 - 4 = 32     36 - 4 + 1 = 33
.
Then using this method we can draw a symmetric diagram for A000203, A024916, A004125, as shown below:
--------------------------------------------------
n     A000203  A024916            Diagram
--------------------------------------------------
.                         _ _ _ _ _ _ _ _ _ _ _ _
1        1        1      |_| | | | | | | | | | | |
2        3        4      |_ _|_| | | | | | | | | |
3        4        8      |_ _|  _|_| | | | | | | |
4        7       15      |_ _ _|    _|_| | | | | |
5        6       21      |_ _ _|  _|  _ _|_| | | |
6       12       33      |_ _ _ _|  _| |  _ _|_| |
7        8       41      |_ _ _ _| |_ _|_|    _ _|
8       15       56      |_ _ _ _ _|  _|     |* *
9       13       69      |_ _ _ _ _| |      _|* *
10      18       87      |_ _ _ _ _ _|  _ _|* * *
11      12       99      |_ _ _ _ _ _| |* * * * *
12      28      127      |_ _ _ _ _ _ _|* * * * *
.
The total number of cells in the first n set of symmetric regions of the diagram equals A024916(n). It appears that the total number of cells in the n-th set of symmetric regions of the diagram equals sigma(n) = A000203(n). Example: for n = 12 the 12th row of triangle is 144, 25, 9, 1, hence the alternating sums is 144 - 25 + 9 - 1 = 127. On the other hand we have that A000290(12) - A004125(12) = 144 - 17 = A024916(12) = 127, equaling the total number of cells in the diagram after 12 stages. The number of cells in the 12th set of symmetric regions of the diagram is sigma(12) = A000203(12) = 28. Note that in this case there is only one region. Finally, the number of *'s is A004125(12) = 17.
Note that the diagram is also the top view of the stepped pyramid described in A245092. - _Omar E. Pol_, Feb 12 2018
		

Crossrefs

Programs

  • Mathematica
    Table[Ceiling[(n + 1)/k - (k + 1)/2]^2, {n, 20}, {k, Floor[(Sqrt[8 n + 1] - 1)/2]}] // Flatten (* Michael De Vlieger, Feb 10 2018, after Hartmut F. W. Hoft at A235791 *)
  • Python
    from sympy import sqrt
    import math
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2))
    for n in range(1, 21): print([T(n, k)**2 for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # Indranil Ghosh, Apr 25 2017

Formula

Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A024916(n). [Although this was stated as a fact, as far as I can tell, no proof was known. However, Don Reble has recently found a proof, which will be added here soon. - N. J. A. Sloane, Nov 23 2020]
A000203(n) = Sum_{k=1..A003056(n)} (-1)^(k-1) * (T(n,k) - T(n-1,k)), assuming that T(k*(k+1)/2-1,k) = 0. - Omar E. Pol, Oct 10 2018

A196020 Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists the odd numbers interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

1, 3, 5, 1, 7, 0, 9, 3, 11, 0, 1, 13, 5, 0, 15, 0, 0, 17, 7, 3, 19, 0, 0, 1, 21, 9, 0, 0, 23, 0, 5, 0, 25, 11, 0, 0, 27, 0, 0, 3, 29, 13, 7, 0, 1, 31, 0, 0, 0, 0, 33, 15, 0, 0, 0, 35, 0, 9, 5, 0, 37, 17, 0, 0, 0, 39, 0, 0, 0, 3, 41, 19, 11, 0, 0, 1, 43, 0, 0, 7, 0, 0, 45, 21, 0, 0, 0, 0, 47, 0, 13, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Feb 02 2013

Keywords

Comments

Gives an identity for sigma(n): alternating sum of row n equals the sum of divisors of n. For proof see Max Alekseyev link.
Row n has length A003056(n) hence column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), the number of odd divisors of n.
If n = 2^j then the only positive integer in row n is T(n,1) = 2^(j+1) - 1.
If n is an odd prime then the only two positive integers in row n are T(n,1) = 2n - 1 and T(n,2) = n - 2.
If T(n,k) = 3 then T(n+1,k+1) = 1, the first element of the column k+1.
The partial sums of column k give the column k of A236104.
The connection with the symmetric representation of sigma is as follows: A236104 --> A235791 --> A237591 --> A237593 --> A239660 --> A237270.
Alternating sum of row n equals the number of units cubes that protrude from the n-th level of the stepped pyramid described in A245092. - Omar E. Pol, Oct 28 2015
Conjecture: T(n,k) is the difference between the square of the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the square of the total number of partitions of all positive integers < n into exactly k consecutive parts. - Omar E. Pol, Feb 14 2018
From Omar E. Pol, Nov 24 2020: (Start)
T(n,k) is also the number of steps in the first n levels of the k-th double-staircase that has at least one step in the n-th level of the "Double- staircases" diagram, otherwise T(n,k) = 0, (see the Example section).
For the connection with A280851 see also the algorithm of A280850 and the conjecture of A296508. (End)
The number of zeros in the n-th row equals A238005(n). - Omar E. Pol, Sep 11 2021
Apart from the alternating row sums and the sum of divisors function A000203 another connection with Euler's pentagonal theorem is that in the irregular triangle of A238442 the k-th column starts in the row that is the k-th generalized pentagonal number A001318(k) while here the k-th column starts in the row that is the k-th generalized hexagonal number A000217(k). Both A001318 and A000217 are successive members of the same family: the generalized polygonal numbers. - Omar E. Pol, Sep 23 2021
Other triangle with the same row lengths and alternating row sums equals sigma(n) is A252117. - Omar E. Pol, May 03 2022

Examples

			Triangle begins:
   1;
   3;
   5,  1;
   7,  0;
   9,  3;
  11,  0,  1;
  13,  5,  0;
  15,  0,  0;
  17,  7,  3;
  19,  0,  0,  1;
  21,  9,  0,  0;
  23,  0,  5,  0;
  25, 11,  0,  0;
  27,  0,  0,  3;
  29, 13,  7,  0,  1;
  31,  0,  0,  0,  0;
  33, 15,  0,  0,  0;
  35,  0,  9,  5,  0;
  37, 17,  0,  0,  0;
  39,  0,  0,  0,  3;
  41, 19, 11,  0,  0,  1;
  43,  0,  0,  7,  0,  0;
  45, 21,  0,  0,  0,  0;
  47,  0, 13,  0,  0,  0;
  49, 23,  0,  0,  5,  0;
  51,  0,  0,  9,  0,  0;
  53, 25, 15,  0,  0,  3;
  55,  0,  0,  0,  0,  0,  1;
  ...
For n = 15 the divisors of 15 are 1, 3, 5, 15, so the sum of divisors of 15 is 1 + 3 + 5 + 15 = 24. On the other hand, the 15th row of the triangle is 29, 13, 7, 0, 1, so the alternating row sum is 29 - 13 + 7 - 0 + 1 = 24, equaling the sum of divisors of 15.
If n is even then the alternating sum of the n-th row is simpler to evaluate than the sum of divisors of n. For example the sum of divisors of 24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 = 60, and the alternating sum of the 24th row of triangle is 47 - 0 + 13 - 0 + 0 - 0 = 60.
From _Omar E. Pol_, Nov 24 2020: (Start)
For an illustration of the rows of triangle consider the infinite "double-staircases" diagram defined in A335616 (see also the theorem there).
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|
.
The first largest double-staircase has 29 horizontal steps, the second double-staircase has 13 steps, the third double-staircase has 7 steps, and the fifth double-staircases has only one step. Note that the fourth double-staircase does not count because it does not have horizontal steps in the 15th level, so the 15th row of triangle is [29, 13, 7, 0, 1].
For a connection with the "Ziggurat" diagram and the parts and subparts of the symmetric representation of sigma(15) see also A237270. (End)
		

Crossrefs

Programs

  • Maple
    T_row := proc(n) local T;
    T := (n, k) -> if modp(n-k/2, k) = 0 and n >= k*(k+1)/2 then 2*n/k-k else 0 fi;
    seq(T(n,k), k=1..floor((sqrt(8*n+1)-1)/2)) end:
    seq(print(T_row(n)),n=1..24); # Peter Luschny, Oct 27 2015
  • Mathematica
    T[n_, k_] := If[Mod[n - k*(k+1)/2, k] == 0 ,2*n/k - k, 0]
    row[n_] := Floor[(Sqrt[8n+1]-1)/2]
    line[n_] := Map[T[n, #]&, Range[row[n]]]
    a196020[m_, n_] := Map[line, Range[m, n]]
    Flatten[a196020[1,22]] (* data *)
    (* Hartmut F. W. Hoft, Oct 26 2015 *)
    A196020row = Function[n,Table[If[Divisible[Numerator[n-k/2],k] && CoprimeQ[ Denominator[n- k/2], k],2*n/k-k,0],{k,1,Floor[(Sqrt[8 n+1]-1)/2]}]]
    Flatten[Table[A196020row[n], {n,1,24}]] (* Peter Luschny, Oct 28 2015 *)
  • Sage
    def T(n,k):
        q = (2*n-k)/2
        b = k.divides(q.numerator()) and gcd(k,q.denominator()) == 1
        return 2*n/k - k if b else 0
    for n in (1..24): [T(n, k) for k in (1..floor((sqrt(8*n+1)-1)/2))] # Peter Luschny, Oct 28 2015

Formula

A000203(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k).
T(n,k) = 2*A211343(n,k) - 1, if A211343(n,k) >= 1 otherwise T(n,k) = 0.
If n==k/2 (mod k) and n>=k(k+1)/2, then T(n,k) = 2*n/k - k; otherwise T(n,k) = 0. - Max Alekseyev, Nov 18 2013
T(n,k) = A236104(n,k) - A236104(n-1,k), assuming that A236104(k*(k+1)/2-1,k) = 0. - Omar E. Pol, Oct 14 2018
T(n,k) = A237048(n,k)*A338721(n,k). - Omar E. Pol, Feb 22 2022

A237271 Number of parts in the symmetric representation of sigma(n).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 1, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 1, 3, 2, 4, 1, 2, 1, 2, 1, 4, 2, 3, 1, 2, 2, 4, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 3, 4, 2, 2, 1, 4, 1, 4, 2, 2, 1, 2, 2, 5, 1, 4, 1, 2, 2, 4, 3, 2, 1, 2, 2, 4, 2, 3, 2, 2, 1, 5, 2, 2, 1, 4, 2, 4, 1, 2, 1
Offset: 1

Views

Author

Omar E. Pol, Feb 25 2014

Keywords

Comments

The diagram of the symmetry of sigma has been via A196020 --> A236104 --> A235791 --> A237591 --> A237593.
For more information see A237270.
a(n) is also the number of terraces at n-th level (starting from the top) of the stepped pyramid described in A245092. - Omar E. Pol, Apr 20 2016
a(n) is also the number of subparts in the first layer of the symmetric representation of sigma(n). For the definion of "subpart" see A279387. - Omar E. Pol, Dec 08 2016
Note that the number of subparts in the symmetric representation of sigma(n) equals A001227(n), the number of odd divisors of n. (See the second example). - Omar E. Pol, Dec 20 2016
From Hartmut F. W. Hoft, Dec 26 2016: (Start)
Using odd prime number 3, observe that the 1's in the 3^k-th row of the irregular triangle of A237048 are at index positions
3^0 < 2*3^0 < 3^1 < 2*3^1 < ... < 2*3^((k-1)/2) < 3^(k/2) < ...
the last being 2*3^((k-1)/2) when k is odd and 3^(k/2) when k is even. Since odd and even index positions alternate, each pair (3^i, 2*3^i) specifies one part in the symmetric representation with a center part present when k is even. A straightforward count establishes that the symmetric representation of 3^k, k>=0, has k+1 parts. Since this argument is valid for any odd prime, every positive integer occurs infinitely many times in the sequence. (End)
a(n) = number of runs of consecutive nonzero terms in row n of A262045. - N. J. A. Sloane, Jan 18 2021
Indices of odd terms give A071562. Indices of even terms give A071561. - Omar E. Pol, Feb 01 2021
a(n) is also the number of prisms in the three-dimensional version of the symmetric representation of k*sigma(n) where k is the height of the prisms, with k >= 1. - Omar E. Pol, Jul 01 2021
With a(1) = 0; a(n) is also the number of parts in the symmetric representation of A001065(n), the sum of aliquot parts of n. - Omar E. Pol, Aug 04 2021
The parity of this sequence is also the characteristic function of numbers that have middle divisors. - Omar E. Pol, Sep 30 2021
a(n) is also the number of polycubes in the 3D-version of the ziggurat of order n described in A347186. - Omar E. Pol, Jun 11 2024
Conjecture 1: a(n) is the number of odd divisors of n except the "e" odd divisors described in A005279. Thus a(n) is the length of the n-th row of A379288. - Omar E. Pol, Dec 21 2024
The conjecture 1 was checked up n = 10000 by Amiram Eldar. - Omar E. Pol, Dec 22 2024
The conjecture 1 is true. For a proof see A379288. - Hartmut F. W. Hoft, Jan 21 2025
From Omar E. Pol, Jul 31 2025: (Start)
Conjecture 2: a(n) is the number of 2-dense sublists of divisors of n.
We call "2-dense sublists of divisors of n" to the maximal sublists of divisors of n whose terms increase by a factor of at most 2.
In a 2-dense sublist of divisors of n the terms are in increasing order and two adjacent terms are the same two adjacent terms in the list of divisors of n.
Example: for n = 10 the list of divisors of 10 is [1, 2, 5, 10]. There are two 2-dense sublists of divisors of 10, they are [1, 2], [5, 10], so a(10) = 2.
The conjecture 2 is essentially the same as the second conjecture in the Comments of A384149. See also Peter Munn's formula in A237270.
The indices where a(n) = 1 give A174973 (2-dense numbers). See the proof there. (End)
Conjecture 3: a(n) is the number of divisors p of n such that p is greater than twice the adjacent previous divisor of n. The divisors p give the n-th row of A379288. - Omar E. Pol, Aug 02 2025

Examples

			Illustration of initial terms (n = 1..12):
---------------------------------------------------------
n   A000203  A237270    a(n)            Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|    _|_| | | | | |
5       6      3+3       2     |_ _ _|  _|  _ _|_| | | |
6      12      12        1     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|    _ _|
8      15      15        1     |_ _ _ _ _|  _|     |
9      13      5+3+5     3     |_ _ _ _ _| |      _|
10     18      9+9       2     |_ _ _ _ _ _|  _ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      28        1     |_ _ _ _ _ _ _|
...
For n = 9 the sum of divisors of 9 is 1+3+9 = A000203(9) = 13. On the other hand the 9th set of symmetric regions of the diagram is formed by three regions (or parts) with 5, 3 and 5 cells, so the total number of cells is 5+3+5 = 13, equaling the sum of divisors of 9. There are three parts: [5, 3, 5], so a(9) = 3.
From _Omar E. Pol_, Dec 21 2016: (Start)
Illustration of the diagram of subparts (n = 1..12):
---------------------------------------------------------
n   A000203  A279391  A001227           Diagram
---------------------------------------------------------
.                               _ _ _ _ _ _ _ _ _ _ _ _
1       1      1         1     |_| | | | | | | | | | | |
2       3      3         1     |_ _|_| | | | | | | | | |
3       4      2+2       2     |_ _|  _|_| | | | | | | |
4       7      7         1     |_ _ _|  _ _|_| | | | | |
5       6      3+3       2     |_ _ _| |_|  _ _|_| | | |
6      12      11+1      2     |_ _ _ _|  _| |  _ _|_| |
7       8      4+4       2     |_ _ _ _| |_ _|_|  _ _ _|
8      15      15        1     |_ _ _ _ _|  _|  _| |
9      13      5+3+5     3     |_ _ _ _ _| |  _|  _|
10     18      9+9       2     |_ _ _ _ _ _| |_ _|
11     12      6+6       2     |_ _ _ _ _ _| |
12     28      23+5      2     |_ _ _ _ _ _ _|
...
For n = 6 the symmetric representation of sigma(6) has two subparts: [11, 1], so A000203(6) = 12 and A001227(6) = 2.
For n = 12 the symmetric representation of sigma(12) has two subparts: [23, 5], so A000203(12) = 28 and A001227(12) = 2. (End)
From _Hartmut F. W. Hoft_, Dec 26 2016: (Start)
Two examples of the general argument in the Comments section:
Rows 27 in A237048 and A249223 (4 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12
27: 1  1 1 0 0 1                           1's in A237048 for odd divisors
    1 27 3     9                           odd divisors represented
27: 1  0 1 1 1 0 0 1 1 1 0 1               blocks forming parts in A249223
Rows 81 in A237048 and A249223 (5 parts)
i:  1  2 3 4 5 6 7 8 9 . . 12. . . 16. . . 20. . . 24
81: 1  1 1 0 0 1 0 0 1 0 0 0                          1's in A237048 f.o.d
    1 81 3    27     9                                odd div. represented
81: 1  0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1  blocks fp in A249223
(End)
		

Crossrefs

Programs

  • Mathematica
    a237271[n_] := Length[a237270[n]] (* code defined in A237270 *)
    Map[a237271, Range[90]] (* data *)
    (* Hartmut F. W. Hoft, Jun 23 2014 *)
    a[n_] := Module[{d = Partition[Divisors[n], 2, 1]}, 1 + Count[d, ?(OddQ[#[[2]]] && #[[2]] >= 2*#[[1]] &)]]; Array[a, 100] (* _Amiram Eldar,  Dec 22 2024 *)
  • PARI
    fill(vcells, hga, hgb) = {ic = 1; for (i=1, #hgb, if (hga[i] < hgb[i], for (j=hga[i], hgb[i]-1, cell = vector(4); cell[1] = i - 1; cell[2] = j; vcells[ic] = cell; ic ++;););); vcells;}
    findfree(vcells) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findxy(vcells, x, y) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[1]==x) && (vcelli[2]==y) && (vcelli[3] == 0) && (vcelli[4] == 0), return (i));); return (0);}
    findtodo(vcells, iz) = {for (i=1, #vcells, vcelli = vcells[i]; if ((vcelli[3] == iz) && (vcelli[4] == 0), return (i)); ); return (0);}
    zcount(vcells) = {nbz = 0; for (i=1, #vcells, nbz = max(nbz, vcells[i][3]);); nbz;}
    docell(vcells, ic, iz) = {x = vcells[ic][1]; y = vcells[ic][2]; if (icdo = findxy(vcells, x-1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x+1, y), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y-1), vcells[icdo][3] = iz); if (icdo = findxy(vcells, x, y+1), vcells[icdo][3] = iz); vcells[ic][4] = 1; vcells;}
    docells(vcells, ic, iz) = {vcells[ic][3] = iz; while (ic, vcells = docell(vcells, ic, iz); ic = findtodo(vcells, iz);); vcells;}
    nbzb(n, hga, hgb) = {vcells = vector(sigma(n)); vcells = fill(vcells, hga, hgb); iz = 1; while (ic = findfree(vcells), vcells = docells(vcells, ic, iz); iz++;); zcount(vcells);}
    lista(nn) = {hga = concat(heights(row237593(0), 0), 0); for (n=1, nn, hgb = heights(row237593(n), n); nbz = nbzb(n, hga, hgb); print1(nbz, ", "); hga = concat(hgb, 0););} \\ with heights() also defined in A237593; \\ Michel Marcus, Mar 28 2014
    
  • Python
    from sympy import divisors
    def a(n: int) -> int:
        divs = list(divisors(n))
        d = [divs[i:i+2] for i in range(len(divs) - 1)]
        s = sum(1 for pair in d if len(pair) == 2 and pair[1] % 2 == 1 and pair[1] >= 2 * pair[0])
        return s + 1
    print([a(n) for n in range(1, 80)])  # Peter Luschny, Aug 05 2025

Formula

a(n) = A001227(n) - A239657(n). - Omar E. Pol, Mar 23 2014
a(p^k) = k + 1, where p is an odd prime and k >= 0. - Hartmut F. W. Hoft, Dec 26 2016
Theorem: a(n) <= number of odd divisors of n (cf. A001227). The differences are in A239657. - N. J. A. Sloane, Jan 19 2021
a(n) = A340846(n) - A340833(n) + 1 (Euler's formula). - Omar E. Pol, Feb 01 2021
a(n) = A000005(n) - A243982(n). - Omar E. Pol, Aug 02 2025

A245092 The even numbers (A005843) and the values of sigma function (A000203) interleaved.

Original entry on oeis.org

0, 1, 2, 3, 4, 4, 6, 7, 8, 6, 10, 12, 12, 8, 14, 15, 16, 13, 18, 18, 20, 12, 22, 28, 24, 14, 26, 24, 28, 24, 30, 31, 32, 18, 34, 39, 36, 20, 38, 42, 40, 32, 42, 36, 44, 24, 46, 60, 48, 31, 50, 42, 52, 40, 54, 56, 56, 30, 58, 72, 60, 32, 62, 63, 64, 48
Offset: 0

Views

Author

Omar E. Pol, Jul 15 2014

Keywords

Comments

Consider an irregular stepped pyramid with n steps. The base of the pyramid is equal to the symmetric representation of A024916(n), the sum of all divisors of all positive integers <= n. Two of the faces of the pyramid are the same as the representation of the n-th triangular numbers as a staircase. The total area of the pyramid is equal to 2*A024916(n) + A046092(n). The volume is equal to A175254(n). By definition a(2n-1) is A000203(n), the sum of divisors of n. Starting from the top a(2n-1) is also the total area of the horizontal part of the n-th step of the pyramid. By definition, a(2n) = A005843(n) = 2n. Starting from the top, a(2n) is also the total area of the irregular vertical part of the n-th step of the pyramid.
On the other hand the sequence also has a symmetric representation in two dimensions, see Example.
From Omar E. Pol, Dec 31 2016: (Start)
We can find the pyramid after the following sequences: A196020 --> A236104 --> A235791 --> A237591 --> A237593.
The structure of this infinite pyramid arises after the 90-degree-zig-zag folding of the diagram of the isosceles triangle A237593 (see the links).
The terraces at the m-th level of the pyramid are also the parts of the symmetric representation of sigma(m), m >= 1, hence the sum of the areas of the terraces at the m-th level equals A000203(m).
Note that the stepped pyramid is also one of the 3D-quadrants of the stepped pyramid described in A244050.
For more information about the pyramid see A237593 and all its related sequences. (End)

Examples

			Illustration of initial terms:
----------------------------------------------------------------------
a(n)                             Diagram
----------------------------------------------------------------------
0    _
1   |_|\ _
2    \ _| |\ _
3     |_ _| | |\ _
4      \ _ _|_| | |\ _
4       |_ _|  _| | | |\ _
6        \ _ _|  _| | | | |\ _
7         |_ _ _|  _|_| | | | |\ _
8          \ _ _ _|  _ _| | | | | |\ _
6           |_ _ _| |    _| | | | | | |\ _
10           \ _ _ _|  _|  _|_| | | | | | |\ _
12            |_ _ _ _|  _|  _ _| | | | | | | |\ _
12             \ _ _ _ _|  _|  _ _| | | | | | | | |\ _
8               |_ _ _ _| |  _|  _ _|_| | | | | | | | |\ _
14               \ _ _ _ _| |  _| |  _ _| | | | | | | | | |\ _
15                |_ _ _ _ _| |_ _| |  _ _| | | | | | | | | | |\ _
16                 \ _ _ _ _ _|  _ _|_|  _ _|_| | | | | | | | | | |\
13                  |_ _ _ _ _| |  _|  _|  _ _ _| | | | | | | | | | |
18                   \ _ _ _ _ _| |  _|  _|    _ _| | | | | | | | | |
18                    |_ _ _ _ _ _| |  _|     |  _ _|_| | | | | | | |
20                     \ _ _ _ _ _ _| |      _| |  _ _ _| | | | | | |
12                      |_ _ _ _ _ _| |  _ _|  _| |  _ _ _| | | | | |
22                       \ _ _ _ _ _ _| |  _ _|  _|_|  _ _ _|_| | | |
28                        |_ _ _ _ _ _ _| |  _ _|  _ _| |  _ _ _| | |
24                         \ _ _ _ _ _ _ _| |  _| |    _| |  _ _ _| |
14                          |_ _ _ _ _ _ _| | |  _|  _|  _| |  _ _ _|
26                           \ _ _ _ _ _ _ _| | |_ _|  _|  _| |
24                            |_ _ _ _ _ _ _ _| |  _ _|  _|  _|
28                             \ _ _ _ _ _ _ _ _| |  _ _|  _|
24                              |_ _ _ _ _ _ _ _| | |  _ _|
30                               \ _ _ _ _ _ _ _ _| | |
31                                |_ _ _ _ _ _ _ _ _| |
32                                 \ _ _ _ _ _ _ _ _ _|
...
a(n) is the total area of the n-th set of symmetric regions in the diagram.
.
From _Omar E. Pol_, Aug 21 2015: (Start)
The above structure contains a hidden pattern, simpler, as shown below:
Level                              _ _
1                                _| | |_
2                              _|  _|_  |_
3                            _|   | | |   |_
4                          _|    _| | |_    |_
5                        _|     |  _|_  |     |_
6                      _|      _| | | | |_      |_
7                    _|       |   | | |   |       |_
8                  _|        _|  _| | |_  |_        |_
9                _|         |   |  _|_  |   |         |_
10             _|          _|   | | | | |   |_          |_
11           _|           |    _| | | | |_    |           |_
12         _|            _|   |   | | |   |   |_            |_
13       _|             |     |  _| | |_  |     |             |_
14     _|              _|    _| |  _|_  | |_    |_              |_
15   _|               |     |   | | | | |   |     |               |_
16  |                 |     |   | | | | |   |     |                 |
...
The symmetric pattern emerges from the front view of the stepped pyramid.
Note that starting from this diagram A000203 is obtained as follows:
In the pyramid the area of the k-th vertical region in the n-th level on the front view is equal to A237593(n,k), and the sum of all areas of the vertical regions in the n-th level on the front view is equal to 2n.
The area of the k-th horizontal region in the n-th level is equal to A237270(n,k), and the sum of all areas of the horizontal regions in the n-th level is equal to sigma(n) = A000203(n). (End)
From _Omar E. Pol_, Dec 31 2016: (Start)
Illustration of the top view of the pyramid with 16 levels:
.
n   A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1      1   =      1      |_| | | | | | | | | | | | | | | |
2      3   =      3      |_ _|_| | | | | | | | | | | | | |
3      4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
4      7   =      7      |_ _ _|    _|_| | | | | | | | | |
5      6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
6     12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
7      8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
8     15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
9     13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
16    31   =     31      |_ _ _ _ _ _ _ _ _|
... (End)
		

Crossrefs

Programs

  • Mathematica
    Table[If[EvenQ@ n, n, DivisorSigma[1, (n + 1)/2]], {n, 0, 65}] (* or *)
    Transpose@ {Range[0, #, 2], DivisorSigma[1, #] & /@ Range[#/2 + 1]} &@ 65 // Flatten (* Michael De Vlieger, Dec 31 2016 *)
    With[{nn=70},Riffle[Range[0,nn,2],DivisorSigma[1,Range[nn/2]]]] (* Harvey P. Dale, Aug 05 2024 *)

Formula

a(2*n-1) + a(2n) = A224880(n).

A262626 Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Sep 26 2015

Keywords

Comments

Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.

Examples

			Irregular triangle begins:
  1;
  1, 1;
  3;
  2, 2;
  2, 2;
  2, 1, 1, 2;
  7;
  3, 1, 1, 3;
  3, 3;
  3, 2, 2, 3;
  12;
  4, 1, 1, 1, 1, 4;
  4, 4;
  4, 2, 1, 1, 2, 4;
  15;
  5, 2, 1, 1, 2, 5;
  5, 3, 5;
  5, 2, 2, 2, 2, 5;
  9, 9;
  6, 2, 1, 1, 1, 1, 2, 6;
  6, 6;
  6, 3, 1, 1, 1, 1, 3, 6;
  28;
  7, 2, 2, 1, 1, 2, 2, 7;
  7, 7;
  7, 3, 2, 1, 1, 2, 3, 7;
  12, 12;
  8, 3, 1, 2, 2, 1, 3, 8;
  8, 8, 8;
  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  31;
  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  ...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
   n  A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   1     1   =      1      |_| | | | | | | | | | | | | | | |
   2     3   =      3      |_ _|_| | | | | | | | | | | | | |
   3     4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
   4     7   =      7      |_ _ _|    _|_| | | | | | | | | |
   5     6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
   6    12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
   7     8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
   8    15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
   9    13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
  10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
  11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
  12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
  13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
  14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
  15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
  16    31   =     31      |_ _ _ _ _ _ _ _ _|
  ...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
.                                 A237593
Level                               _ _
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|
...
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).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - _Omar E. Pol_, Aug 28 2018
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
		

Crossrefs

Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.

A279387 Irregular triangle read by rows: suppose the symmetric representation of sigma(n) consists of m = A250068(n) layers of width 1, arranged in increasing order; then T(n,k) (n >= 1, 1 <= k <= m) is the number of subparts in the k-th layer.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 1, 3, 2, 2, 1, 1, 2, 2, 3, 1, 1, 2, 1, 2, 2, 1, 1, 4, 2, 2, 1, 1, 3, 2, 4, 1, 1, 2, 1, 3, 2, 1, 4, 2, 3, 1, 1, 2, 2, 2, 4, 1, 1, 2, 1, 3, 2, 2, 3, 3, 2, 2, 1, 1, 3, 3, 4, 2, 2, 1, 3, 4, 1, 1, 4, 2, 2, 1, 1, 2, 2, 2, 5, 1, 1, 4, 1, 3, 2, 2, 4, 3, 1, 2, 1, 1, 1, 2, 2
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2016

Keywords

Comments

The "subparts" of the symmetric representation of sigma(n) are defined to be the regions that arise after the dissection of the symmetric representation of sigma(n) into successive layers of width 1.
The number of layers of width 1 in the symmetric representation of sigma(n) is given in A250068.
The number of subparts in the first layer of the symmetric representation of sigma(n) is equal to A237271(n).
We can find the symmetric representation of sigma(n) as the terraces at the n-th level (starting from the top) of the stepped pyramid described in A245092.
(All above comments are essentially the same as the comments dated Nov 05 2016 at the old version of A275601, which was the same as A001227).
The sum of row n equals the number of subparts in the symmetric representation of sigma(n).
Conjecture:
The number of subparts in the symmetric representation of sigma(n) equals A001227(n), the number of odd divisors of n.
From Hartmut F. W. Hoft, Dec 16 2016: (Start)
Proof:
Each row of the irregular triangle of A262045 can be interpreted as a step function of step sizes 1, 0, and -1. The numbers in row n are the widths of the segments in the parts of the symmetric representation of sigma(n). Each new subpart in a segment (in the left half) of row n starts at the same odd index that represents an odd divisor d of n in the irregular triangle of A237048. Either a subpart ends at an even index e, representing a second odd divisor, which satisfies d * e = oddpart(n), and thus the entire subpart is duplicated in the symmetric portion of the representation, or a subpart runs through the center and continues contiguously into the right half of the symmetric portion of the representation. In other words, the number of subparts in row n equals the number of odd divisors of n, i.e., the conjecture is true. (End)

Examples

			Triangle begins (first 18 rows):
1;
1;
2;
1;
2;
1, 1;
2;
1;
3;
2;
2;
1, 1;
2;
2;
3, 1;
1;
2;
1, 2;
...
For n = 12, the 11th row of triangle A237593 is [6, 3, 1, 1, 1, 1, 3, 6] and the 12th row of the same triangle is [7, 2, 2, 1, 1, 2, 2, 7], so the diagram of the symmetric representation of sigma(12) = 28 is constructed as shown below in Figure 1:
.                          _                                    _
.                         | |                                  | |
.                         | |                                  | |
.                         | |                                  | |
.                         | |                                  | |
.                         | |                                  | |
.                    _ _ _| |                             _ _ _| |
.                  _|    _ _|                           _|  _ _ _|
.                _|     |                             _|  _| |
.               |      _|                            |  _|  _|
.               |  _ _|                              | |_ _|
.    _ _ _ _ _ _| |    28                 _ _ _ _ _ _| |    5
.   |_ _ _ _ _ _ _|                      |_ _ _ _ _ _ _|
.                                                       23
.
.   Figure 1. The symmetric            Figure 2. After the dissection
.   representation of sigma(12)        of the symmetric representation
.   has only one part which            of sigma(12) into layers of
.   contains 28 cells, so              width 1 we can see two "subparts"
.   A237271(12) = 1.                   that contain 23 and 5 cells
.                                      respectively, so the 12th row of
.                                      this triangle is [1, 1], and the
.                                      row sum is A001227(12) = 2,
.                                      equaling the number of odd divisors
.                                      of 12.
.
For n = 15, the 14th row of triangle A237593 is [8, 3, 1, 2, 2, 1, 3, 8] and the 15th row of the same triangle is [8, 3, 2, 1, 1, 1, 1, 2, 3, 8], so the diagram of the symmetric representation of sigma(15) = 24 is constructed as shown below in Figure 3:
.                                _                                  _
.                               | |                                | |
.                               | |                                | |
.                               | |                                | |
.                               | |                                | |
.                               | |                                | |
.                               | |                                | |
.                               | |                                | |
.                          _ _ _|_|                           _ _ _|_|
.                      _ _| |      8                      _ _| |      8
.                     |    _|                            |  _ _|
.                    _|  _|                             _| |_|
.                   |_ _|  8                           |_ _|  1
.                   |                                  |    7
.    _ _ _ _ _ _ _ _|                   _ _ _ _ _ _ _ _|
.   |_ _ _ _ _ _ _ _|                  |_ _ _ _ _ _ _ _|
.                    8                                  8
.
.   Figure 3. The symmetric            Figure 4. After the dissection
.   representation of sigma(15)        of the symmetric representation
.   has three parts of size 8          of sigma(15) into layers of
.   because every part contains        width 1 we can see four "subparts".
.   8 cells, so A237271(15) = 3.       The first layer has three subparts:
.                                      [8, 7, 8]. The second layer has
.                                      only one subpart of size 1, so
.                                      the 15th row of this triangle is
.                                      [3, 1], and the row sum is
.                                      A001227(15) = 4, equaling the
.                                      number of odd divisors of 15.
.
For n = 360, the 359th row of triangle A237593 is [180, 61, 30, 19, 12, 9, 7, 6, 4, 4, 3, 3, 2, 3, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1] and the 360th row of the same triangle is [181, 60, 31, 18, 13, 9, 7, 5, 5, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1], so have that the symmetric representation of sigma(360) = 1170 has only one part, five layers, and six subparts: [(719), (237), (139), (71), (2, 2)], so the 360th row of this triangle is [1, 1, 1, 1, 2], and the row sum is A001227(360) = 6, equaling the number of odd divisors of 360 (the diagram is too large to include).
From _Hartmut F. W. Hoft_, Dec 16 2016: (Start)
45 has 6 subparts of which 2 have symmetric duplicates and 2 span the center. Row length is 18 and "|" indicates the center marker for a row.
1 2 3 4 5 6 7 8 9|9 8 7 6 5 4 3 2 1  : position indices
1 0 1 1 2 1 1 1 2|2 1 1 1 2 1 1 0 1  : row 45 of A262045
1   1 1 1 1 1 1 1|1 1 1 1 1 1 1   1  : layer 1
        1       1|1       1          : layer 2
1 1 1 0 1 1 0 0 1|                   : row 45 of A237048 (odd divisors)
+ - + . + - . . +|                   : change in level ("." no change)
90 has 6 subparts and 3 layers (row length is 24).
1 2 3 4 5 6 7 8..10..12|.14..16..18..20..22..24 : position indices
1 1 2 1 2 2 2 2 3 3 3 2|2 3 3 3 2 2 2 2 1 2 1 1 : row 90 of A262045
1 1 1 1 1 1 1 1 1 1 1 1|1 1 1 1 1 1 1 1 1 1 1 1 : layer 1
    1   1 1 1 1 1 1 1 1|1 1 1 1 1 1 1 1   1     : layer 2
                1 1 1  |  1 1 1                 : layer 3
1 0 1 1 1 0 0 0 1 0 0 1|                        : row 90 of A237048
+ . + - + . . . + . . -|                        : change in level ("." no change)
The process of successive levels provides two "default" dissections of the symmetric representation into subparts from the boundary at n towards the boundary at n-1 or in the reverse direction. (End)
From _Omar E. Pol_, Nov 24 2020: (Start)
For n = 18 we have that the 17th row of triangle A237593 is [9, 4, 2, 1, 1, 1, 1, 2, 4, 9] and the 18th row of the same triangle is [10, 3, 2, 2, 1, 1, 2, 2, 3, 10], so the diagram of the symmetric representation of sigma(18) = 39 is constructed as shown below in Figure 5:
.                                     _                                      _
.                                    | |                                    | |
.                                    | |                                    | |
._                                   | |                                    | |
.                                    | |                                    | |
.                                    | |                                    | |
.                                    | |                                    | |
.                                    | |                                    | |
.                                    | |                                    | |
.                             _ _ _ _| |                             _ _ _ _| |
.                            |    _ _ _|                            |  _ _ _ _|
.                           _|   |                                 _| | |
.                         _|  _ _|                               _|  _|_|
.                     _ _|  _|                               _ _|  _|    2
.                    |     |  39                            |  _ _|
.                    |  _ _|                                | |_ _|
.                    | |                                    | |    2
.   _ _ _ _ _ _ _ _ _| |                   _ _ _ _ _ _ _ _ _| |
.  |_ _ _ _ _ _ _ _ _ _|                  |_ _ _ _ _ _ _ _ _ _|
.                                                              35
.
.   Figure 5. The symmetric               Figure 6. After the dissection
.   representation of sigma(18)           of the symmetric representation
.   has one part of size 39, so           of sigma(18) into layers of
.   A237271(18) = 1.                      width 1 we can see three "subparts".
.                                         The first layer has one subpart of
.                                         size 35. The second layer has
.                                         two subparts of size 2, so
.                                         the 18th row of this triangle is
.                                         [1, 2], and the row sum is
.                                         A001227(18) = 3.
(End)
		

Crossrefs

The sum of row n equals A001227(n).
Hence, if n is odd, the sum of row n equals A000005(n).
Row n has length A250068(n).
Column 1 gives A237271.
For more information about "subparts" see A279388 and A279391.

Programs

  • Mathematica
    (* function a341969[ ] is defined in A341969 *)
    a279387[n_] := Module[{widthL=a341969[n], partL, cL, top, ft, sL}, partL=Select[SplitBy[widthL, #==0&], #!={0}&]; cL=Table[0, Max[widthL]]; While[partL!={}, top=Last[partL]; ft=First[top]; sL=Select[SplitBy[top, #==ft&], #!={ft}&];
    cL[[ft]]++; partL=Join[Most[partL], sL]]; cL]
    Flatten[a279387[74]] (* the first 74 rows of the table; Hartmut F. W. Hoft, Feb 24 2021 *)

Extensions

Definition edited by Omar E. Pol and N. J. A. Sloane, Nov 25 2020

A239660 Triangle read by rows in which row n lists two copies of the n-th row of triangle A237593.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Mar 24 2014

Keywords

Comments

For the construction of this sequence also we can start from A235791.
This sequence can be interpreted as an infinite Dyck path: UDUDUUDD...
Also we use this sequence for the construction of a spiral in which the arms in the quadrants give the symmetric representation of sigma, see example.
We can find the spiral (mentioned above) on the terraces of the stepped pyramid described in A244050. - Omar E. Pol, Dec 07 2016
The spiral has the property that the sum of the parts in the quadrants 1 and 3, divided by the sum of the parts in the quadrants 2 and 4, converges to 3/5. - Omar E. Pol, Jun 10 2019

Examples

			Triangle begins (first 15.5 rows):
1, 1, 1, 1;
2, 2, 2, 2;
2, 1, 1, 2, 2, 1, 1, 2;
3, 1, 1, 3, 3, 1, 1, 3;
3, 2, 2, 3, 3, 2, 2, 3;
4, 1, 1, 1, 1, 4, 4, 1, 1, 1, 1, 4;
4, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 4;
5, 2, 1, 1, 2, 5, 5, 2, 1, 1, 2, 5;
5, 2, 2, 2, 2, 5, 5, 2, 2, 2, 2, 5;
6, 2, 1, 1, 1, 1, 2, 6, 6, 2, 1, 1, 1, 1, 2, 6;
6, 3, 1, 1, 1, 1, 3, 6, 6, 3, 1, 1, 1, 1, 3, 6;
7, 2, 2, 1, 1, 2, 2, 7, 7, 2, 2, 1, 1, 2, 2, 7;
7, 3, 2, 1, 1, 2, 3, 7, 7, 3, 2, 1, 1, 2, 3, 7;
8, 3, 1, 2, 2, 1, 3, 8, 8, 3, 1, 2, 2, 1, 3, 8;
8, 3, 2, 1, 1, 1, 1, 2, 3, 8, 8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
9, 3, 2, 1, 1, 1, 1, 2, 3, 9, ...
.
Illustration of initial terms as an infinite Dyck path (row n = 1..4):
.
.                            /\/\    /\/\
.       /\  /\  /\/\  /\/\  /    \  /    \
.  /\/\/  \/  \/    \/    \/      \/      \
.
.
Illustration of initial terms for the construction of a spiral related to sigma:
.
.  row 1     row 2          row 3           row 4
.                                          _ _ _
.                                               |_
.             _ _                                 |
.   _ _      |                                    |
.  |   |     |                                    |
.            |         |           |              |
.            |_ _      |_         _|              |
.                        |_ _ _ _|               _|
.                                          _ _ _|
.
.[1,1,1,1] [2,2,2,2] [2,1,1,2,2,1,1,2] [3,1,1,3,3,1,1,3]
.
The first 2*A003056(n) terms of the n-th row are represented in the A010883(n-1) quadrant and the last 2*A003056(n) terms of the n-th row are represented in the A010883(n) quadrant.
.
Illustration of the spiral constructed with the first 15.5 rows of triangle:
.
.               12 _ _ _ _ _ _ _ _
.                 |  _ _ _ _ _ _ _|_ _ _ _ _ _ _ 7
.                 | |             |_ _ _ _ _ _ _|
.                _| |                           |
.               |_ _|9 _ _ _ _ _ _              |_ _
.         12 _ _|     |  _ _ _ _ _|_ _ _ _ _ 5      |_
.      _ _ _| |      _| |         |_ _ _ _ _|         |
.     |  _ _ _|  9 _|_ _|                   |_ _ 3    |_ _ _ 7
.     | |      _ _| |   12 _ _ _ _          |_  |         | |
.     | |     |  _ _|    _|  _ _ _|_ _ _ 3    |_|_ _ 5    | |
.     | |     | |      _|   |     |_ _ _|         | |     | |
.     | |     | |     |  _ _|           |_ _ 3    | |     | |
.     | |     | |     | |    3 _ _        | |     | |     | |
.     | |     | |     | |     |  _|_ 1    | |     | |     | |
.    _|_|    _|_|    _|_|    _|_| |_|    _|_|    _|_|    _|_|    _
.   | |     | |     | |     | |         | |     | |     | |     | |
.   | |     | |     | |     |_|_ _     _| |     | |     | |     | |
.   | |     | |     | |    2  |_ _|_ _|  _|     | |     | |     | |
.   | |     | |     |_|_     2    |_ _ _|    _ _| |     | |     | |
.   | |     | |    4    |_               7 _|  _ _|     | |     | |
.   | |     |_|_ _        |_ _ _ _        |  _|    _ _ _| |     | |
.   | |    6      |_      |_ _ _ _|_ _ _ _| |    _|    _ _|     | |
.   |_|_ _ _        |_   4        |_ _ _ _ _|  _|     |    _ _ _| |
.  8      | |_ _      |                     15|      _|   |  _ _ _|
.         |_    |     |_ _ _ _ _ _            |  _ _|    _| |
.        8  |_  |_    |_ _ _ _ _ _|_ _ _ _ _ _| |      _|  _|
.             |_ _|  6            |_ _ _ _ _ _ _|  _ _|  _|
.                 |                             28|  _ _|
.                 |_ _ _ _ _ _ _ _                | |
.                 |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _| |
.                8                |_ _ _ _ _ _ _ _ _|
.                                                    31
.
The diagram contains A237590(16) = 27 parts.
The total area (also the total number of cells) in the n-th arm of the spiral is equal to sigma(n) = A000203(n), considering every quadrant and the axes x and y. (checked by hand up to row n = 128). The parts of the spiral are in A237270: 1, 3, 2, 2, 7...
Diagram extended by _Omar E. Pol_, Aug 23 2018
		

Crossrefs

Row n has length 4*A003056(n).
The sum of row n is equal to 4*n = A008586(n).
Row n is a palindromic composition of 4*n = A008586(n).
Both column 1 and right border are A008619, n >= 1.
The connection between A196020 and A237270 is as follows: A196020 --> A236104 --> A235791 --> A237591 --> A237593 --> this sequence --> A237270.

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