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

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

A153485 Sum of all aliquot divisors of all positive integers <= n.

Original entry on oeis.org

0, 1, 2, 5, 6, 12, 13, 20, 24, 32, 33, 49, 50, 60, 69, 84, 85, 106, 107, 129, 140, 154, 155, 191, 197, 213, 226, 254, 255, 297, 298, 329, 344, 364, 377, 432, 433, 455, 472, 522, 523, 577, 578, 618, 651, 677, 678, 754, 762, 805, 826
Offset: 1

Views

Author

Omar E. Pol, Dec 27 2008

Keywords

Comments

a(n) is also the sum of first n terms of A000203, minus n-th triangular number.
n is prime if and only if a(n) - a(n-1) = 1. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236540. - Omar E. Pol, Jun 23 2014
Sum of the areas of all x X z rectangles with x and y integers, x + y = n, x <= y and z = floor(y/x). - Wesley Ivan Hurt, Dec 21 2020
Apart from the symmetric representation of a(n) given in the Example section we have that a(n) can be represented with an arrowhead-shaped polygon formed by two zig-zag paths and the Dyck path described in the n-th row of A237593 as shown in the Links section. - Omar E. Pol, Jun 13 2022

Examples

			Assuming that a(1) = 0, for n = 6 the aliquot divisors of the first six positive integers are [0], [1], [1], [1, 2], [1], [1, 2, 3], so a(6) = 0 + 1 + 1 + 1 + 2 + 1 + 1 + 2 + 3 = 12.
From _Omar E. Pol_, Mar 27 2021: (Start)
The following diagrams show a square dissection into regions that are the symmetric representation of A000203, A004125, A244048 and this sequence.
In order to construct every diagram we use the following rules:
At stage 1 in the first quadrant of the square grid we draw the symmetric representation of sigma(n) using the two Dyck paths described in the rows n and n-1 of A237593.
At stage 2 we draw a pair of orthogonal line segments (if it's necessary) such that in the drawing appears totally formed a square n X n. The area of the region that is above the symmetric representation of sigma(n) equals A004125(n).
At stage 3 we draw a zig-zag path with line segments of length 1 from (0,n-1) to (n-1,0) such that appears a staircase with n-1 steps. The area of the region (or regions) that is below the symmetric representation of sigma(n) and above the staircase equals A244048(n).
At stage 4 we draw a copy of the symmetric representation of A004125(n) rotated 180 degrees such that one of its vertices is the point (0,0). a(n) is the area of the region (or regions) that is above of this region and below the staircase.
Illustration for n = 1..6:
.                                                                    _ _ _ _ _ _
.                                                     _ _ _ _ _     |_ _ _  |_ R|
.                                        _ _ _ _ R   |_ _S_|  R|    | |_T | S |_|
.                             _ _ _ R   |_ _  |_|    | |_  |_ _|    |   |_|_ _  |
.                    _ _     |_S_|_|    | |_|_S |    |_U_|_T | |    |_  U |_T | |
.             _ S   |_ S|   U|_|_|S|    |_ U|_| |    |   | |_|S|    | |_    |_| |
.            |_|    |_|_|    |_|_|_|    |_|_ _|_|    |_V_|_U_|_|    |_V_|_ _ _|_|
.                  U        V   U       V
.
n:            1       2         3           4             5               6
R: A004125    0       0         1           1             4               3
S: A000203    1       3         4           7             6              12
T: A244048    0       0         1           2             5               6
U: a(n)       0       1         2           5             6              12
V: A004125    0       0         1           1             4               3
.
Illustration for n = 7..9:
.                                                      _ _ _ _ _ _ _ _ _
.                                _ _ _ _ _ _ _ _      |_ _ _S_ _|       |
.            _ _ _ _ _ _ _      |_ _ _ _  |     |     | |_      |_ _ R  |
.           |_ _S_ _|     |     | |_    | |_ R  |     |   |_    |_ S|   |
.           | |_    |_ R  |     |   |_  |_S |_ _|     |     |_  T |_|_ _|
.           |   |_  T |_ _|     |     |_T |_ _  |     |_ _    |_      | |
.           |_ _  |_    | |     |_ _  U |_    | |     |   |  U  |_    | |
.           |   |_U |_  |S|     |   |_    |_  | |     |   |_ _    |_  |S|
.           |  V  |   |_| |     |  V  |     |_| |     |  V    |     |_| |
.           |_ _ _|_ _ _|_|     |_ _ _|_ _ _ _|_|     |_ _ _ _|_ _ _ _|_|
.
n:                 7                    8                      9
R: A004125         8                    8                     12
S: A000203         8                   15                     12
T: A244048        12                   13                     20
U: a(n)           13                   20                     24
V: A004125         8                    8                     12
.
Illustration for n = 10..12:
.                                                         _ _ _ _ _ _ _ _ _ _ _ _
.                              _ _ _ _ _ _ _ _ _ _ _     |_ _ _ _ _ _  |         |
.     _ _ _ _ _ _ _ _ _ _     |_ _ _S_ _ _|         |    | |_        | |_ _   R  |
.    |_ _ _S_ _  |       |    | |_        |      R  |    |   |_      |     |_    |
.    | |_      | |_  R   |    |   |_      |_        |    |     |_    |_  S   |   |
.    |   |_    |_ _|_    |    |     |_      |_      |    |       |_    |_    |_ _|
.    |     |_      | |_ _|    |       |_   T  |_ _ _|    |         |_ T  |_ _ _  |
.    |       |_ T  |_ _  |    |_ _ _    |_        | |    |_ _        |_        | |
.    |_ _      |_      | |    |     |_ U  |_      | |    |   |    U    |_      | |
.    |   |_ U    |_    |S|    |       |_    |_    |S|    |   |_          |_    | |
.    |     |_      |_  | |    |         |     |_  | |    |     |_ _        |_  | |
.    |  V    |       |_| |    |  V      |       |_| |    |  V      |         |_| |
.    |_ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _|_|    |_ _ _ _ _|_ _ _ _ _ _|_|
.
n:            10                         11                          12
R: A004125    13                         22                          17
S: A000203    18                         12                          28
T: A244048    24                         32                          33
U: a(n)       32                         33                          49
V: A004125    13                         22                          17
.
Note that in the diagrams the symmetric representation of A244048(n+1) is the same as the symmetric representation of a(n) rotated 180 degrees.
The diagrams for n = 11 and n = 12 both are copies from the diagrams that are in A244048 dated Jun 24 2014.
[Another way for the illustration of this sequence which is visible in the pyramid described in A245092 will be added soon.]
(End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[ DivisorSigma[1, m] - m, {m, n}]; Array[f, 60] (* Robert G. Wilson v, Jun 30 2014 *)
    Accumulate@ Table[DivisorSum[n, # &, # < n &], {n, 51}] (* or *)
    Table[Sum[k Floor[(n - k)/k], {k, n}], {n, 51}] (* Michael De Vlieger, Apr 02 2017 *)
  • PARI
    a(n) = sum(k=1, n, sigma(k)-k); \\ Michel Marcus, Jan 22 2017
    
  • Python
    from math import isqrt
    def A153485(n): return (-n*(n+1)-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 21 2023

Formula

a(n) = A024916(n) - A000217(n).
a(n) = A000217(n-1) - A004125(n). - Omar E. Pol, Jan 28 2014
a(n) = A000290(n) - A000203(n) - A024816(n) - A004125(n) = A024816(n+1) - A004125(n+1). - Omar E. Pol, Jun 23 2014
G.f.: (1/(1 - x))*Sum_{k>=1} k*x^(2*k)/(1 - x^k). - Ilya Gutkovskiy, Jan 22 2017
a(n) = Sum_{k=1..n} k * floor((n-k)/k). - Wesley Ivan Hurt, Apr 02 2017
a(n) ~ n^2 * (Pi^2/12 - 1/2). - Vaclav Kotesovec, Dec 21 2020
a(n) = A000290(n) - A000217(n) - A004125(n). - Omar E. Pol, Feb 26 2021
a(n) = A244048(n+1). - Omar E. Pol, Mar 28 2021

Extensions

Better name from Omar E. Pol, Jan 28 2014, Jun 23 2014

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