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

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

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

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.

A175254 a(n) = Sum_{k<=n} A000203(k)*(n-k+1), where A000203(m) is the sum of divisors of m.

Original entry on oeis.org

1, 5, 13, 28, 49, 82, 123, 179, 248, 335, 434, 561, 702, 867, 1056, 1276, 1514, 1791, 2088, 2427, 2798, 3205, 3636, 4127, 4649, 5213, 5817, 6477, 7167, 7929, 8723, 9580, 10485, 11444, 12451, 13549, 14685, 15881, 17133, 18475, 19859, 21339, 22863, 24471, 26157
Offset: 1

Views

Author

Jaroslav Krizek, Mar 14 2010

Keywords

Comments

Partial sums of A024916. - Omar E. Pol, Jul 03 2014
a(n) is also the volume of the stepped pyramid with n levels described in A245092. - Omar E. Pol, Aug 12 2015
Also the alternating row sums of A262612. - Omar E. Pol, Nov 23 2015
From Omar E. Pol, Jan 20 2021: (Start)
Convolution of A000203 and A000027.
Convolution of A340793 and the nonzero terms of A000217.
Antidiagonal sums of A319073.
Row sums of A274824. (End)
Row sums of A345272. - Omar E. Pol, Jun 14 2021
Also the alternating row sums of A353690. - Omar E. Pol, Jun 05 2022

Examples

			For n = 4: a(4) = sigma(1)*4 + sigma(2)*3 + sigma(3)*2 + sigma(4)*1 = 1*4 + 3*3 + 4*2 + 7*1 = 28.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<1, [0$2],
          (p-> p+[numtheory[sigma](n), p[1]])(b(n-1)))
        end:
    a:= n-> b(n+1)[2]:
    seq(a(n), n=1..45);  # Alois P. Heinz, Oct 07 2021
  • Mathematica
    Table[Sum[DivisorSigma[1, k] (n - k + 1), {k, n}], {n, 45}] (* Michael De Vlieger, Nov 24 2015 *)
  • PARI
    a(n) = sum(x=1, n, sigma(x)*(n-x+1)) \\ Michel Marcus, Mar 18 2013
    
  • Python
    from math import isqrt
    def A175254(n): return (((s:=isqrt(n))**2*(s+1)*((s+1)*(2*s+1)-6*(n+1))>>1) + sum((q:=n//k)*(-k*(q+1)*(3*k+2*q+1)+3*(n+1)*(2*k+q+1)) for k in range(1,s+1)))//6 # Chai Wah Wu, Oct 21 2023

Formula

Conjecture: a(n) = Sum_{k=0..n} A006218(n-k). - R. J. Mathar, Oct 17 2012
a(n) = A000330(n) - A072481(n). - Omar E. Pol, Aug 12 2015
a(n) ~ Pi^2*n^3/36. - Vaclav Kotesovec, Sep 25 2016
G.f.: (1/(1 - x)^2)*Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 03 2017
a(n) = Sum_{k=1..n} Sum_{i=1..k} k - (k mod i). - Wesley Ivan Hurt, Sep 13 2017
a(n) = A244050(n)/4. - Omar E. Pol, Jan 22 2021
a(n) = (n+1)*A024916(n) - A143128(n). - Vaclav Kotesovec, May 11 2022

Extensions

Corrected by Jaroslav Krizek, Mar 17 2010
More terms from Michel Marcus, Mar 18 2013

A274824 Triangle read by rows: T(n,k) = (n-k+1)*sigma(k), n>=1, 1<=k<=n.

Original entry on oeis.org

1, 2, 3, 3, 6, 4, 4, 9, 8, 7, 5, 12, 12, 14, 6, 6, 15, 16, 21, 12, 12, 7, 18, 20, 28, 18, 24, 8, 8, 21, 24, 35, 24, 36, 16, 15, 9, 24, 28, 42, 30, 48, 24, 30, 13, 10, 27, 32, 49, 36, 60, 32, 45, 26, 18, 11, 30, 36, 56, 42, 72, 40, 60, 39, 36, 12, 12, 33, 40, 63, 48, 84, 48, 75, 52, 54, 24, 28, 13, 36, 44, 70, 54, 96, 56, 90, 65, 72, 36, 56, 14
Offset: 1

Views

Author

Omar E. Pol, Oct 02 2016

Keywords

Comments

Theorem: for any sequence S the partial sums of the partial sums are also the antidiagonal sums of the square array in which the n-th row gives n times the sequence S. Therefore they are also the row sums of the triangular array in which the n-th diagonal gives n times the sequence S.
In this case the sequence S is A000203.
The n-th diagonal of this triangle gives n times A000203.
The row sums give A175254 which gives the partial sums of A024916 which gives the partial sums of A000203.
T(n,k) is also the total number of unit cubes that are exactly below the terraces of the k-th level (starting from the top) up the base of the stepped pyramid with n levels described in A245092. This fact is because the mentioned terraces have the same shape as the symmetric representation of sigma(k). For more information see A237593 and A237270.
In the definition of this sequence the value n-k+1 is also the height of the terraces associated to sigma(k) in the mentioned pyramid with n levels, or in other words, the distance between the mentioned terraces and the base of the pyramid.
The sum of the n-th row of triangle equals the volume (also the number of cubes) of the mentioned pyramid with n levels.
For an illustration of the pyramid, see the Links section.
The sum of the n-th row is also 1/4 of the volume of the stepped pyramid described in A244050 with n levels.
Column k lists the positive multiples of sigma(k).
The k-th term in the n-th diagonal is equal to n*sigma(k).
Note that this is also a square array read by antidiagonals upwards: T(i,j) = i*sigma(j), i>=1, j>=1. The first row of the array is A000203. So consider that the pyramid is upside down. The value of "i" is the distance between the base of the pyramid and the terraces associated to sigma(j). The antidiagonal sums give the partial sums of the partial sums of A000203.

Examples

			Triangle begins:
1;
2,  3;
3,  6,  4;
4,  9,  8,  7;
5,  12, 12, 14, 6;
6,  15, 16, 21, 12, 12;
7,  18, 20, 28, 18, 24,  8;
8,  21, 24, 35, 24, 36,  16, 15;
9,  24, 28, 42, 30, 48,  24, 30,  13;
10, 27, 32, 49, 36, 60,  32, 45,  26,  18;
11, 30, 36, 56, 42, 72,  40, 60,  39,  36,  12;
12, 33, 40, 63, 48, 84,  48, 75,  52,  54,  24, 28;
13, 36, 44, 70, 54, 96,  56, 90,  65,  72,  36, 56,  14;
14, 39, 48, 77, 60, 108, 64, 105, 78,  90,  48, 84,  28, 24;
15, 42, 52, 84, 66, 120, 72, 120, 91,  108, 60, 112, 42, 48, 24;
16, 45, 56, 91, 72, 132, 80, 135, 104, 126, 72, 140, 56, 72, 48, 31;
...
For n = 16 and k = 10 the sum of the divisors of 10 is 1 + 2 + 5 + 10 = 18, and 16 - 10 + 1 = 7, and 7*18 = 126, so T(16,10) = 126.
On the other hand, the symmetric representation of sigma(10) has two parts of 9 cells, giving a total of 18 cells. In the stepped pyramid described in A245092, with 16 levels, there are 16 - 10 + 1 = 7 cubes exactly below every cell of the symmetric representation of sigma(10) up the base of pyramid; hence the total numbers of cubes exactly below the terraces of the 10th level (starting from the top) up the base of the pyramid is equal to 7*18 = 126. So T(16,10) = 126.
The sum of the 16th row of the triangle is 16 + 45 + 56 + 91 + 72 + 132 + 80 + 135 + 104 + 126 + 72 + 140 + 56 + 72 + 48 + 31 = A175254(16) = 1276, equaling the volume (also the number of cubes) of the stepped pyramid with 16 levels described in A245092 (see Links section).
		

Crossrefs

Row sums of triangle give A175254.
Column 1 is A000027.
Initial zeros should be omitted in the following sequences related to the columns of triangle:
Columns 2-5: A008585, A008586, A008589, A008588.
Columns 6 and 11: A008594.
Columns 7-9: A008590, A008597, A008595.
Columns 10 and 17: A008600.
Columns 12-13: A135628, A008596.
Columns 14, 15 and 23: A008606.
Columns 16 and 25: A135631.
(There are many other OEIS sequences that are also columns of this triangle.)

Formula

T(n,k) = (n-k+1) * A000203(k).
T(n,k) = A004736(n,k) * A245093(n,k).

A353690 Irregular triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the numbers of A353689 multiplied by A000330(k), and the first element of column k is in row A000217(k).

Original entry on oeis.org

1, 5, 18, 5, 53, 25, 139, 90, 333, 265, 14, 748, 695, 70, 1592, 1665, 252, 3246, 3740, 742, 6379, 7960, 1946, 30, 12152, 16230, 4662, 150, 22524, 31895, 10472, 540, 40764, 60760, 22288, 1590, 72213, 112620, 45444, 4170, 125505, 203820, 89306, 9990, 55, 214378, 361065, 170128, 22440, 275
Offset: 1

Views

Author

Omar E. Pol, May 04 2022

Keywords

Comments

The alternating sum of the n-th row equals A175254(n), the volume of the stepped pyramid with n levels described in A245092, also the n-th term of the convolution of A000203 and A000027.
Column k is the partial sums of the k-th column of the triangle A249120.
Another triangle with the same row lengths and whose alternating row sums give A175254 is A262612.

Examples

			Triangle begins:
        1;
        5;
       18,       5;
       53,      25;
      139,      90;
      333,     265,      14;
      748,     695,      70;
     1592,    1665,     252;
     3246,    3740,     742;
     6379,    7960,    1946,     30;
    12152,   16230,    4662,    150;
    22524,   31895,   10472,    540;
    40764,   60760,   22288,   1590;
    72213,  112620,   45444,   4170;
   125505,  203820,   89306,   9990,    55;
   214378,  361065,  170128,  22440,   275;
   360473,  627525,  315336,  47760,   990;
   597450, 1071890,  570696,  97380,  2915;
   977196, 1802365, 1010982, 191370,  7645;
  1578852, 2987250, 1757070, 364560, 18315;
  2522157, 4885980, 3001292, 675720, 41140, 91;
  ...
For n = 6 we have that A175254(6) is equal to [1] + [1 + 3] + [1 + 3 + 4] + [1 + 3 + 4 + 7] + [1 + 3 + 4 + 7 + 6] + [1 + 3 + 4 + 7 + 6 + 12] = 1 + 4 + 8 + 15 + 21 + 33 = 82. On the other hand the alternating sum of the 6th row of the triangle is 333 - 265 + 14 = 82, equaling A175254(6).
		

Crossrefs

Column 1 is A353689.
Row n has length A003056(n).
Column k starts in row A000217(k).
The first element in column k is A000330(k).
Alternating row sums give A175254.

Formula

A175254(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k).

A328368 Irregular triangle read by rows: T(n,k) is the total number of parts in all partitions of all positive integers <= n into k consecutive parts.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 02 2019

Keywords

Comments

Column k lists k times every nonzero multiple of k in nondecreasing order.
Column k lists the partial sums of the k-th column of triangle A285914.

Examples

			Triangle begins:
   1;
   2;
   3,  2;
   4,  2;
   5,  4;
   6,  4,  3;
   7,  6,  3;
   8,  6,  3;
   9,  8,  6;
  10,  8,  6,  4;
  11, 10,  6,  4;
  12, 10,  9,  4;
  13, 12,  9,  4;
  14, 12,  9,  8;
  15, 14, 12,  8,  5;
  16, 14, 12,  8,  5;
  17, 16, 12,  8,  5;
  18, 16, 15, 12,  5;
  19, 18, 15, 12,  5;
  20, 18, 15, 12, 10;
  21, 20, 18, 12, 10,  6;
  22, 20, 18, 16, 10,  6;
  23, 22, 18, 16, 10,  6;
  24, 22, 21, 16, 10,  6;
  25, 24, 21, 16, 15,  6;
  26, 24, 21, 20, 15,  6;
  27, 26, 24, 20, 15, 12;
  28, 26, 24, 20, 15, 12, 7;
...
		

Crossrefs

Row sums give A285899.
Row n has length A003056(n).
Column 1 gives A000027.
Column k starts with k in the row A000217(k).

Programs

  • PARI
    tt(n, k) = k*(if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0)); \\ A285891
    t(n, k) = sum(j=k*(k+1)/2, n, tt(j, k));
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019

A328371 Irregular triangle read by rows: T(n,k) is the sum of all parts of all partitions of all positive integers <= n into k consecutive parts.

Original entry on oeis.org

1, 3, 6, 3, 10, 3, 15, 8, 21, 8, 6, 28, 15, 6, 36, 15, 6, 45, 24, 15, 55, 24, 15, 10, 66, 35, 15, 10, 78, 35, 27, 10, 91, 48, 27, 10, 105, 48, 27, 24, 120, 63, 42, 24, 15, 136, 63, 42, 24, 15, 153, 80, 42, 24, 15, 171, 80, 60, 42, 15, 190, 99, 60, 42, 15, 210, 99, 60, 42, 35, 231, 120, 81, 42, 35, 21
Offset: 1

Views

Author

Omar E. Pol, Nov 02 2019

Keywords

Comments

Column k lists the partial sums of the k-th column of triangle A285891.

Examples

			Triangle begins:
    1;
    3;
    6,   3;
   10,   3;
   15,   8;
   21,   8,   6;
   28,  15,   6;
   36,  15,   6;
   45,  24,  15;
   55,  24,  15, 10;
   66,  35,  15, 10;
   78,  35,  27, 10;
   91,  48,  27, 10;
  105,  48,  27, 24,
  120,  63,  42, 24, 15;
  136,  63,  42, 24, 15;
  153,  80,  42, 24, 15;
  171,  80,  60, 42, 15;
  190,  99,  60, 42, 15;
  210,  99,  60, 42, 35;
  231, 120,  81, 42, 35, 21;
  253, 120,  81, 64, 35, 21;
  276, 143,  81, 64, 35, 21;
  300, 143, 105, 64, 35, 21;
  325, 168, 105, 64, 60, 21;
  351, 168, 105, 90, 60, 21;
  378, 195, 132, 90, 60, 48;
  406, 195, 132, 90, 60, 48, 28;
...
		

Crossrefs

Row sums give A285900.
Row n has length A003056(n).
Column 1 gives the nonzero terms of A000217.
Column k starts with A000217(k) in the row A000217(k).

Programs

  • PARI
    tt(n, k) = n*(if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0)); \\ A285891
    t(n, k) = sum(j=k*(k+1)/2, n, tt(j, k));
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019

A380231 Alternating row sums of triangle A237591.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 17 2025

Keywords

Comments

Consider the symmetric Dyck path in the first quadrant of the square grid described in the n-th row of A237593. Let C = (A240542(n), A240542(n)) be the middle point of the Dyck path.
a(n) is also the coordinate on the x axis of the point (a(n),n) and also the coordinate on the y axis of the point (n,a(n)) such that the middle point of the line segment [(a(n),n),(n,a(n))] coincides with the middle point C of the symmetric Dyck path.
The three line segments [(a(n),n),C], [(n,a(n)),C] and [(n,n),C] have the same length.
For n > 2 the points (n,n), C and (a(n),n) are the vertices of a virtual isosceles right triangle.
For n > 2 the points (n,n), C and (n,a(n)) are the vertices of a virtual isosceles right triangle.
For n > 2 the points (a(n),n), (n,n) and (n,a(n)) are the vertices of a virtual isosceles right triangle.

Examples

			For n = 14 the 14th row of A237591 is [8, 3, 1, 2] hence the alternating row sum is 8 - 3 + 1 - 2 = 4, so a(14) = 4.
On the other hand the 14th row of A237593 is the 14th row of A237591 together with the 14 th row of A237591 in reverse order as follows: [8, 3, 1, 2, 2, 1, 3, 8].
Then with the terms of the 14th row of A237593 we can draw a Dyck path in the first quadrant of the square grid as shown below:
.
         (y axis)
          .
          .
          .    (4,14)              (14,14)
          ._ _ _ . _ _ _ _            .
          .               |
          .               |
          .               |_
          .                 |
          .                 |_ _
          .                C    |_ _ _
          .                           |
          .                           |
          .                           |
          .                           |
          .                           . (14,4)
          .                           |
          .                           |
          . . . . . . . . . . . . . . | . . . (x axis)
        (0,0)
.
In the example the point C is the point (9,9).
The three line segments [(4,14),(9,9)], [(14,4),(9,9)] and [(14,14),(9,9)] have the same length.
The points (14,14), (9,9) and (4,14) are the vertices of a virtual isosceles right triangle.
The points (14,14), (9,9) and (14,4) are the vertices of a virtual isosceles right triangle.
The points (4,14), (14,14) and (14,4) are the vertices of a virtual isosceles right triangle.
		

Crossrefs

Other alternating row sums (ARS) related to the Dyck paths of A237593 and the stepped pyramid described in A245092 are as follows:
ARS of A237593 give A000004.
ARS of A196020 give A000203.
ARS of A252117 give A000203.
ARS of A271343 give A000593.
ARS of A231347 give A001065.
ARS of A236112 give A004125.
ARS of A236104 give A024916.
ARS of A249120 give A024916.
ARS of A271344 give A033879.
ARS of A231345 give A033880.
ARS of A239313 give A048050.
ARS of A237048 give A067742.
ARS of A236106 give A074400.
ARS of A235794 give A120444.
ARS of A266537 give A146076.
ARS of A236540 give A153485.
ARS of A262612 give A175254.
ARS of A353690 give A175254.
ARS of A239446 give A235796.
ARS of A239662 give A239050.
ARS of A235791 give A240542.
ARS of A272026 give A272027.
ARS of A211343 give A336305.

Programs

  • PARI
    row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i);
    a(n) = my(orow = concat(row235791(n), 0)); vecsum(vector(#orow-1, i, (-1)^(i+1)*(orow[i] - orow[i+1]))); \\ Michel Marcus, Apr 13 2025

Formula

a(n) = 2*A240542(n) - n.
a(n) = n - 2*A322141(n).
a(n) = A240542(n) - A322141(n).
Showing 1-9 of 9 results.