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

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

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

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 23 2014

Keywords

Comments

The alternating sum of the squares of the elements of the n-th row equals the sum of all divisors of all positive integers <= n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*(T(n,k))^2 = A024916(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
For more information see A236104.
The sum of row n gives A060831(n), the sum of the number of odd divisors of all positive integers <= n. - Omar E. Pol, Mar 01 2014. [An equivalent assertion is that the sum of row n of A237048 is the number of odd divisors of n, and this was proved by Hartmut F. W. Hoft in a comment in A237048. - N. J. A. Sloane, Dec 07 2020]
Comments from Franklin T. Adams-Watters on sequences related to the "symmetric representation of sigma" in A235791 and related sequences, Mar 31 2014: (Start)
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
From Hartmut F. W. Hoft, Apr 07 2014: (Start)
Mathematica function has been written to check the first property up to n = 20000.
T(n,(sqrt(8n+1)-1)/2+1) = 0 for all n >= 1, which is useful for formulas for A237591 and A237593. (End)
Alternating row sums give A240542. - Omar E. Pol, Apr 16 2014
Conjecture: T(n,k) is also the total number of partitions of all positive integers <= n into exactly k consecutive parts, i.e., the partial column sum of A285898, or in accordance with the triangles of the same family: the partial column sum of A237048. - Omar E. Pol, Apr 28 2017, Nov 24 2020
The above conjecture is true. The proof will be added soon (it uses the generating function for the columns). - N. J. A. Sloane, Nov 24 2020
T(n,k) is also the total length of all line segments between the k-th vertex and the central vertex of the largest Dyck path of the symmetric representation of sigma(n). In other words: T(n,k) is the sum of the last (A003056(n)-k+1) terms of the n-th row of A237591. - Omar E. Pol, Sep 07 2021
T(n,k) is also the Manhattan distance between the k-th vertex and the central vertex of the Dyck path described in the n-th row of the triangle A237593. - Omar E. Pol, Jan 11 2023

Examples

			Triangle begins:
   1;
   2;
   3,  1;
   4,  1;
   5,  2;
   6,  2,  1;
   7,  3,  1;
   8,  3,  1;
   9,  4,  2;
  10,  4,  2,  1;
  11,  5,  2,  1;
  12,  5,  3,  1;
  13,  6,  3,  1;
  14,  6,  3,  2;
  15,  7,  4,  2,  1;
  16,  7,  4,  2,  1;
  17,  8,  4,  2,  1;
  18,  8,  5,  3,  1;
  19,  9,  5,  3,  1;
  20,  9,  5,  3,  2;
  21, 10,  6,  3,  2,  1;
  22, 10,  6,  4,  2,  1;
  23, 11,  6,  4,  2,  1;
  24, 11,  7,  4,  2,  1;
  25, 12,  7,  4,  3,  1;
  26, 12,  7,  5,  3,  1;
  27, 13,  8,  5,  3,  2;
  28, 13,  8,  5,  3,  2,  1;
  ...
For n = 10 the 10th row of triangle is 10, 4, 2, 1, so we have that 10^2 - 4^2 + 2^2 - 1^2 = 100 - 16 + 4 - 1 = 87, the same as A024916(10) = 87, the sum of all divisors of all positive integers <= 10.
From _Omar E. Pol_, Nov 19 2015: (Start)
Illustration of initial terms in the third quadrant:
.                                                            y
Row                                                         _|
1                                                         _|1|
2                                                       _|2 _|
3                                                     _|3  |1|
4                                                   _|4   _|1|
5                                                 _|5    |2 _|
6                                               _|6     _|2|1|
7                                             _|7      |3  |1|
8                                           _|8       _|3 _|1|
9                                         _|9        |4  |2 _|
10                                      _|10        _|4  |2|1|
11                                    _|11         |5   _|2|1|
12                                  _|12          _|5  |3  |1|
13                                _|13           |6    |3 _|1|
14                              _|14            _|6   _|3|2 _|
15                            _|15             |7    |4  |2|1|
16                          _|16              _|7    |4  |2|1|
17                        _|17               |8     _|4 _|2|1|
18                      _|18                _|8    |5  |3  |1|
19                    _|19                 |9      |5  |3 _|1|
20                  _|20                  _|9     _|5  |3|2 _|
21                _|21                   |10     |6   _|3|2|1|
22              _|22                    _|10     |6  |4  |2|1|
23            _|23                     |11      _|6  |4  |2|1|
24          _|24                      _|11     |7    |4 _|2|1|
25        _|25                       |12       |7   _|4|3  |1|
26      _|26                        _|12      _|7  |5  |3 _|1|
27    _|27                         |13       |8    |5  |3|2 _|
28   |28                           |13       |8    |5  |3|2|1|
...
T(n,k) is also the number of cells between the k-th vertical line segment (from left to right) and the y-axis in the n-th row of the structure.
Note that the number of horizontal line segments in the n-th row of the structure equals A001227(n), the number of odd divisors of n.
Also the diagram represents the left part of the front view of the pyramid described in A245092. (End)
For more information about the diagram see A286001. - _Omar E. Pol_, Dec 19 2020
From _Omar E. Pol_, Sep 08 2021: (Start)
For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below:
                            _
                           | |
                           | |
                           | |
                           | |
                           | |
                      _ _ _| |
                    _|    _ _|
                  _|     |
                 |      _|
                 |  _ _|
      _ _ _ _ _ _| |3   1
     |_ _ _ _ _ _ _|
    12              5
.
For n = 12 and k = 1 the total length of all line segments between the first vertex and the central vertex of the largest Dyck path is equal to 12, so T(12,1) = 12.
For n = 12 and k = 2 the total length of all line segments between the second vertex and the central vertex of the largest Dyck path is equal to 5, so T(12,2) = 5.
For n = 12 and k = 3 the total length of all line segments between the third vertex and the central vertex of the largest Dyck path is equal to 3, so T(12,3) = 3.
For n = 12 and k = 4 the total length of all line segments between the fourth vertex and the central vertex of the largest Dyck path is equal to 1, so T(12,4) = 1.
Hence the 12th row of triangle is [12, 5, 3, 1]. (End)
		

Crossrefs

Columns 1..3: A000027, A008619, A008620.
Operations on rows: A003056 (number of terms), A237591 (differences between terms), A060831 (sums), A339577 (products), A240542 (alternating sums), A236104 (squares), A339576 (sums of squares), A024916 (alternating sums of squares), A237048 (differences between rows), A042974 (right border).

Programs

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

Formula

T(n,k) = ceiling((n+1)/k - (k+1)/2) for 1 <= n, 1 <= k <= floor((sqrt(8n+1)-1)/2) = A003056(n). - Hartmut F. W. Hoft, Apr 07 2014
G.f. for column k (k >= 1): x^(k*(k+1)/2)/( (1-x)*(1-x^k) ). - N. J. A. Sloane, Nov 24 2020
T(n,k) = Sum_{j=1..n} A237048(j,k). - Omar E. Pol, May 18 2017
T(n,k) = sqrt(A236104(n,k)). - Omar E. Pol, Feb 14 2018
Sigma(n) = Sum_{k=1..A003056(n)} (-1)^(k-1) * (T(n,k)^2 - T(n-1,k)^2), assuming that T(k*(k+1)/2-1,k) = 0. - Omar E. Pol, Oct 10 2018
a(s(n,k)) = T(n,k), n >= 1, 1 <= k <= r = floor((sqrt(8*n + 1) - 1)/2), where s(n,k) = r*n - r*(r+1)*(r+2)/6 + k translates position (row n, column k) in the triangle of this sequence to its position in the sequence. - Hartmut F. W. Hoft, Feb 24 2021

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

A004125 Sum of remainders of n mod k, for k = 1, 2, 3, ..., n.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 8, 8, 12, 13, 22, 17, 28, 31, 36, 36, 51, 47, 64, 61, 70, 77, 98, 85, 103, 112, 125, 124, 151, 138, 167, 167, 184, 197, 218, 198, 233, 248, 269, 258, 297, 284, 325, 328, 339, 358, 403, 374, 414, 420, 449, 454, 505, 492, 529, 520, 553, 578, 635, 586, 645, 672
Offset: 1

Views

Author

Keywords

Comments

Row sums of A051778, A048158. Antidiagonal sums of A051127. - L. Edson Jeffery, Mar 03 2012
Let u_m(n) = Sum_{k=1..n} (n^m mod k^m) with m integer. As n-->+oo, u_m(n) ~ (n^(m+1))*(1-(1/(m+1))*Zeta(1+1/m)). Proof: using Riemann sums, we have u_m(n) ~ (n^(m+1))*int(((1/x)[nonascii character here])*(1-floor(x^m)/(x^m)),x=1..+oo) and the result follows. - Yalcin Aktar, Jul 30 2008 [x is the real variable of integration. The nonascii character (which was illegible in the original message) is probably some form of multiplication sign. I suggest that we leave it the way it is for now. - N. J. A. Sloane, Dec 07 2014]
Also the alternating row sums of A236112. - Omar E. Pol, Jan 26 2014
If n is prime then a(n) = a(n-1) + n - 2. - Omar E. Pol, Mar 19 2014
If n is a power of 2 greater than 1, then a(n) = a(n-1). - David Morales Marciel, Oct 21 2015
It appears that if n is an even perfect number, then a(n) = a(n-1) - 1. - Omar E. Pol, Oct 21 2015
Partial sums of A235796. - Omar E. Pol, Jun 26 2016
Aside from a(n) = a(n-1) for n = 2^m, the only values appearing more than once among the first 6*10^8 terms are those at n = 38184 +- 1, 458010 +- 1, 776112 +- 1, 65675408 +- 1, and 113393280 +- 2. - Trevor Cappallo, Jun 07 2021
The off-by-1 terms in the comment above are the terms of A068077. Proof: If a(n-1) = a(n+1), then (n-1)^2 - Sum_{k=1..n-1} sigma(k) = (n+1)^2 - Sum_{k=1..n+1} sigma(k) via the formula; rearranging terms gives sigma(n)+sigma(n+1)=4n. - Lewis Chen, Sep 24 2021

Examples

			a(5) = 4. The remainder when 5 is divided by 2,3,4 respectively is 1,2,1 and their sum = 4.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000290, A006218, A023196, A048158, A050482, A051778, A120444 (first differences).

Programs

  • GAP
    List([1..70],n->n^2-Sum([1..n],k->Sigma(k))); # Muniru A Asiru, Mar 28 2018
    
  • Haskell
    a004125 n = sum $ map (mod n) [1..n]
    -- Reinhard Zumkeller, Jan 28 2011
    
  • Magma
    [&+[n mod r: r in [1..n]]: n in [1..70]]; // Bruno Berselli, Jul 06 2014
    
  • Maple
    A004125 := n -> add( modp(n,k), k=2..n); /* much faster and unambiguous; "a mod b" may be mods(a,b) */ # M. F. Hasler, Nov 22 2007
  • Mathematica
    Table[Sum[Mod[n,k],{k,2,n-1}],{n,70}] (* Harvey P. Dale, Nov 23 2011 *)
    Accumulate[Table[2n-1-DivisorSigma[1,n],{n,70}]] (* Harvey P. Dale, Jul 11 2014 *)
  • PARI
    A004125(n)=sum(k=2,n,n%k) \\ M. F. Hasler, Nov 22 2007
    
  • Python
    def a(n): return sum(n%k for k in range(1, n))
    print([a(n) for n in range(1, 63)]) # Michael S. Branicky, Jun 08 2021
    
  • Python
    from math import isqrt
    def A004125(n): return n**2+((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
    
  • SageMath
    def a(n): return sum(n.mod(k) for k in (1..n))
    print([a(n) for n in (1..62)])  # Peter Luschny, May 12 2025

Formula

a(n) = n^2 - Sum_{k=1..n} sigma(k) = A000290(n) - A024916(n), hence asymptotically a(n) = n^2*(1-Pi^2/12) + O(n*log(n)^(2/3)). - Benoit Cloitre, Apr 28 2002. Asymptotics corrected/improved by Charles R Greathouse IV, Feb 22 2015
a(n) = A008805(n-3) + A049798(n-1), for n > 2. - Carl Najafi, Jan 31 2013
a(n) = A000217(n-1) - A153485(n). - Omar E. Pol, Jan 28 2014
G.f.: x^2/(1-x)^3 - (1-x)^(-1) * Sum_{k>=1} k*x^(2*k)/(1-x^k). - Robert Israel, Aug 13 2015
a(n) = Sum_{i=1..n} (n mod i). - Wesley Ivan Hurt, Sep 15 2017
From Ridouane Oudra, May 12 2025: (Start)
a(n) = A067439(n) + A072514(n).
a(n) = Sum_{d|n} d*A067439(n/d).
a(p) = A067439(p), for p prime.
a(p^k) = A072514(p^(k+1))/p, for p prime and k >= 0. (End)
a(n) = A111490(n) - n. - Peter Luschny, May 12 2025

Extensions

Edited by M. F. Hasler, Apr 18 2015

A261699 Triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists positive terms interleaved with k-1 zeros, starting in row k(k+1)/2. If k is odd the positive terms of column k are k's, otherwise if k is even the positive terms of column k are the odd numbers greater than k in increasing order.

Original entry on oeis.org

1, 1, 1, 3, 1, 0, 1, 5, 1, 0, 3, 1, 7, 0, 1, 0, 0, 1, 9, 3, 1, 0, 0, 5, 1, 11, 0, 0, 1, 0, 3, 0, 1, 13, 0, 0, 1, 0, 0, 7, 1, 15, 3, 0, 5, 1, 0, 0, 0, 0, 1, 17, 0, 0, 0, 1, 0, 3, 9, 0, 1, 19, 0, 0, 0, 1, 0, 0, 0, 5, 1, 21, 3, 0, 0, 7, 1, 0, 0, 11, 0, 0, 1, 23, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 25, 0, 0, 5, 0, 1, 0, 0, 13, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Sep 20 2015

Keywords

Comments

Conjecture: the positive terms in row n are the odd divisors of n.
Note that the elements appear with an unusual ordering, for example; row 45 is 1, 45, 3, 0, 5, 15, 0, 0, 9.
The positive terms give A261697.
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 sum of row n is A000593(n).
The connection with the symmetric representation of sigma is as follows: A237048 --> A235791 --> A237591 --> A237593.
Proof of the conjecture: let n = 2^m*s*t with s and t odd. The property stated in A237048 verifies the conjecture with odd divisor k <= A003056(n) of n in position k and odd divisor t > A003056(n) in position 2^(m+1)*s. Therefore reading in row n the nonzero odd positions from left to right and then the nonzero even positions from right to left gives all odd divisors of n in increasing order. - Hartmut F. W. Hoft, Oct 25 2015
A237048 gives the signum function (A057427) of this sequence. - Omar E. Pol, Nov 14 2016
From Peter Munn, Jul 30 2017: (Start)
Each odd divisor d of n corresponds to n written as a sum of consecutive integers (n/d - (d-1)/2) .. (n/d + (d-1)/2). After canceling any corresponding negative and positive terms and deleting any zero term, the lower bound becomes abs(n/d - d/2) + 1/2, leaving k terms where k = n/d + d/2 - abs(n/d - d/2). It can be shown T(n,k) = d.
This sequence thereby defines a one to one relationship between odd divisors of n and partitions of n into k consecutive parts.
The relationship is expressed below using 4 sequences (with matching row lengths), starting with this one:
A261699(n,k) = d, the odd divisor.
A211343(n,k) = abs(n/d - d/2) + 1/2, smallest part.
A285914(n,k) = k, number of parts.
A286013(n,k) = n/d + (d-1)/2, largest part.
If no partition of n into k consecutive parts exists, the corresponding sequence terms are 0.
(End)

Examples

			Triangle begins:
1;
1;
1,  3;
1,  0;
1,  5;
1,  0,  3;
1,  7,  0;
1,  0,  0;
1,  9,  3;
1,  0,  0,  5;
1, 11,  0,  0;
1,  0,  3,  0;
1, 13,  0,  0;
1,  0,  0,  7;
1, 15,  3,  0,  5;
1,  0,  0,  0,  0;
1, 17,  0,  0,  0;
1,  0,  3,  9,  0;
1, 19,  0,  0,  0;
1,  0,  0,  0,  5;
1, 21,  3,  0,  0,  7;
1,  0,  0, 11,  0,  0;
1, 23,  0,  0,  0,  0;
1,  0,  3,  0,  0,  0;
1, 25,  0,  0,  5,  0;
1,  0,  0, 13,  0,  0;
1, 27,  3,  0,  0,  9;
1,  0,  0,  0,  0,  0,  7;
...
From _Omar E. Pol_, Dec 19 2016: (Start)
Illustration of initial terms in a right triangle whose structure is the same as the structure of A237591:
Row                                                         _
1                                                         _|1|
2                                                       _|1 _|
3                                                     _|1  |3|
4                                                   _|1   _|0|
5                                                 _|1    |5 _|
6                                               _|1     _|0|3|
7                                             _|1      |7  |0|
8                                           _|1       _|0 _|0|
9                                         _|1        |9  |3 _|
10                                      _|1         _|0  |0|5|
11                                    _|1          |11  _|0|0|
12                                  _|1           _|0  |3  |0|
13                                _|1            |13   |0 _|0|
14                              _|1             _|0   _|0|7 _|
15                            _|1              |15   |3  |0|5|
16                          _|1               _|0    |0  |0|0|
17                        _|1                |17    _|0 _|0|0|
18                      _|1                 _|0    |3  |9  |0|
19                    _|1                  |19     |0  |0 _|0|
20                  _|1                   _|0     _|0  |0|5 _|
21                _|1                    |21     |3   _|0|0|7|
22              _|1                     _|0      |0  |11 |0|0|
23            _|1                      |23      _|0  |0  |0|0|
24          _|1                       _|0      |3    |0 _|0|0|
25        _|1                        |25       |0   _|0|5  |0|
26      _|1                         _|0       _|0  |13 |0 _|0|
27    _|1                          |27       |3    |0  |0|9 _|
28   |1                            |0        |0    |0  |0|0|7|
... (End)
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_?OddQ] /; n == k (k + 1)/2 := k; T[n_, k_?OddQ] /; Mod[n - k (k + 1)/2, k] == 0 := k; T[n_, k_?EvenQ] /; n == k (k + 1)/2 := k + 1; T[n_, k_?EvenQ] /; Mod[n - k (k + 1)/2, k] == 0 := T[n - k, k] + 2; T[, ] = 0; Table[T[n, k], {n, 1, 26}, {k, 1, Floor[(Sqrt[1 + 8 n] - 1)/2]}] // Flatten (* Jean-François Alcover, Sep 21 2015 *)
    (* alternate definition using function a237048 *)
    T[n_, k_] := If[a237048[n, k] == 1, If[OddQ[k], k, 2n/k], 0] (* Hartmut F. W. Hoft, Oct 25 2015 *)

Formula

From Hartmut F. W. Hoft, Oct 25 2015: (Start)
T(n, k) = 2n/k, if A237048(n, k) = 1 and k even,
and in accordance with the definition:
T(n, k) = k, if A237048(n, k) = 1 and k odd,
T(n, k) = 0 otherwise; for k <= A003056(n).
(End)
For m >= 1, d >= 1 and odd, T(m*d, m + d/2 - abs(m - d/2)) = d. - Peter Munn, Jul 24 2017

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

Original entry on oeis.org

2, 6, 10, 2, 14, 0, 18, 6, 22, 0, 2, 26, 10, 0, 30, 0, 0, 34, 14, 6, 38, 0, 0, 2, 42, 18, 0, 0, 46, 0, 10, 0, 50, 22, 0, 0, 54, 0, 0, 6, 58, 26, 14, 0, 2, 62, 0, 0, 0, 0, 66, 30, 0, 0, 0, 70, 0, 18, 10, 0, 74, 34, 0, 0, 0, 78, 0, 0, 0, 6, 82, 38, 22, 0, 0, 2
Offset: 1

Views

Author

Omar E. Pol, Jan 23 2014

Keywords

Comments

Gives an identity for the twice sigma function (A074400), the sum of the even divisors of 2n.
Alternating sum of row n equals A074400(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = 2*A000203(n) = A074400(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
The number of positive terms in row n is A001227(n).
For more information see A196020.

Examples

			Triangle begins:
  2;
  6;
  10,  2;
  14,  0;
  18,  6;
  22,  0,  2;
  26, 10,  0;
  30,  0,  0;
  34, 14,  6;
  38,  0,  0,  2;
  42, 18,  0,  0;
  46,  0, 10,  0;
  50, 22,  0,  0;
  54,  0,  0,  6;
  58, 26, 14,  0,  2;
  62,  0,  0,  0,  0;
  66, 30,  0,  0,  0;
  70,  0, 18, 10,  0;
  74, 34,  0,  0,  0;
  78,  0,  0,  0,  6;
  82, 38, 22,  0,  0,  2;
  86,  0,  0, 14,  0,  0;
  90, 42,  0,  0,  0,  0;
  94,  0, 26,  0,  0,  0;
  ...
For n = 9 the divisors of 2*9 = 18 are 1, 2, 3, 6, 9, 18, therefore the sum of the even divisors of 18 is 2 + 6 + 18 = 26. On the other hand the 9th row of triangle is 34, 14, 6, therefore the alternating row sum is 34 - 14 + 6 = 26, equaling the sum of the even divisors of 18.
If n is even then the alternating sum of the n-th row of triangle is simpler than the sum of the even divisors of 2n. Example: for n = 12 the sum of the even divisors of 2*12 = 24 is 2 + 4 + 6 + 8 + 12 + 24 = 56, and the alternating sum of the 12th row of triangle is 46 - 0 + 10 - 0 = 56.
		

Crossrefs

Formula

T(n,k) = 2*A196020(n,k).

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

Original entry on oeis.org

-1, -1, -1, 1, -1, 0, -1, 3, -1, 0, 1, -1, 5, 0, -1, 0, 0, -1, 7, 3, -1, 0, 0, 1, -1, 9, 0, 0, -1, 0, 5, 0, -1, 11, 0, 0, -1, 0, 0, 3, -1, 13, 7, 0, 1, -1, 0, 0, 0, 0, -1, 15, 0, 0, 0, -1, 0, 9, 5, 0, -1, 17, 0, 0, 0, -1, 0, 0, 0, 3, -1, 19, 11, 0, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Dec 26 2013

Keywords

Comments

Gives an identity for the abundance of n. Alternating sum of row n equals the abundance of n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A033880(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).

Examples

			Triangle begins:
  -1;
  -1;
  -1,  1;
  -1,  0;
  -1,  3;
  -1,  0,  1;
  -1,  5,  0;
  -1,  0,  0;
  -1,  7,  3;
  -1,  0,  0,  1;
  -1,  9,  0,  0;
  -1,  0,  5,  0;
  -1, 11,  0,  0;
  -1,  0,  0,  3;
  -1, 13,  7,  0,  1;
  -1,  0,  0,  0,  0;
  -1, 15,  0,  0,  0;
  -1,  0,  9,  5,  0;
  -1, 17,  0,  0,  0;
  -1,  0,  0,  0,  3;
  -1, 19, 11,  0,  0,  1;
  -1,  0,  0,  7,  0,  0;
  -1, 21,  0,  0,  0,  0;
  -1,  0, 13,  0,  0,  0;
  ...
For n = 15 the divisors of 15 are 1, 3, 5, 15 hence the abundance of 15 is 1 + 3 + 5 + 15 - 2*15 = 1 + 3 + 5 - 15 = -6. On the other hand the 15th row of triangle is -1, 13, 7, 0, 1, hence the alternating row sum is -1 - 13 + 7 - 0 + 1 = -6, equalling the abundance of 15.
If n is even then the alternating sum of the n-th row of triangle is simpler than the sum of divisors of n minus 2*n. Example: the sum of divisors of 24 minus 2*24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 + 24 - 2*24 = 60 - 48 = 12, and the alternating sum of the 24th row of triangle is -1 - 0 + 13 - 0 + 0 - 0 = 12.
		

Crossrefs

Formula

T(n,1) = -1; T(n,k) = A196020(n,k), for k >= 2.

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

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Dec 28 2013

Keywords

Comments

Alternating sum of row n equals the sum of aliquot divisors of n, i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A001065(n).
Row n has length A003056(n).
Column k starts in row A000217(k).
The number of positive terms in row n is A001227(n), for n >= 2.
If n = 2^j then the only positive integer in row n is T(n,1) = n - 1, for j >= 1.
If n is an odd prime then the only two positive integers in row n are T(n,1) = n - 1 and T(n,2) = n - 2.

Examples

			Triangle begins:
  0;
  1;
  2,   1;
  3,   0;
  4,   3;
  5,   0,  1;
  6,   5,  0;
  7,   0,  0;
  8,   7,  3;
  9,   0,  0,  1;
  10,  9,  0,  0;
  11,  0,  5,  0;
  12, 11,  0,  0;
  13,  0,  0,  3;
  14, 13,  7,  0,  1;
  15,  0,  0,  0,  0;
  16, 15,  0,  0,  0;
  17,  0,  9,  5,  0;
  18, 17,  0,  0,  0;
  19,  0,  0,  0,  3;
  20, 19, 11,  0,  0,  1;
  21,  0,  0,  7,  0,  0;
  22, 21,  0,  0,  0,  0;
  23,  0, 13,  0,  0,  0;
  ...
For n = 15 the aliquot divisors of 15 are 1, 3, 5, therefore the sum of aliquot divisors of 15 is 1 + 3 + 5 = 9. On the other hand the 15th row of triangle is 14, 13, 7, 0, 1, hence the alternating row sum is 14 - 13 + 7 - 0 + 1 = 9, equalling the sum of aliquot divisors of 15.
If n is even then the alternating sum of the n-th row of triangle is simpler than the sum of aliquot divisors of n. Example: the sum of aliquot divisors of 24 is 1 + 2 + 3 + 4 + 6 + 8 + 12 = 36, and the alternating sum of the 24th row of triangle is 23 - 0 + 13 - 0 + 0 - 0 = 36.
		

Crossrefs

Formula

T(n,1) = n - 1.
T(n,k) = A196020(n,k), for k >= 2.

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

Original entry on oeis.org

0, 1, 0, 0, 3, 0, 0, 1, 5, 0, 0, 0, 0, 0, 7, 3, 0, 0, 0, 1, 9, 0, 0, 0, 0, 5, 0, 0, 11, 0, 0, 0, 0, 0, 3, 0, 13, 7, 0, 1, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 9, 5, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 3, 0, 19, 11, 0, 0, 1, 0, 0, 7, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Jan 23 2014

Keywords

Comments

It appears that the alternating row sums give A120444, the first differences of A004125, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A120444(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).

Examples

			Triangle begins:
  0;
  1;
  0,  0;
  3,  0;
  0,  1;
  5,  0,  0;
  0,  0,  0;
  7,  3,  0;
  0,  0,  1;
  9,  0,  0,  0;
  0,  5,  0,  0;
  11, 0,  0,  0;
  0,  0,  3,  0;
  13, 7,  0,  1;
  0,  0,  0,  0,  0;
  15, 0,  0,  0,  0;
  0,  9,  5,  0,  0;
  17, 0,  0,  0,  0;
  0,  0,  0,  3,  0;
  19, 11, 0,  0,  1;
  0,  0,  7,  0,  0,  0;
  21, 0,  0,  0,  0,  0;
  0,  13, 0,  0,  0,  0;
  23, 0,  0,  5,  0,  0;
  ...
For n = 14 the 14th row of triangle is 13, 7, 0, 1, and the alternating sum is 13 - 7 + 0 - 1 = 5, the same as A120444(14) = 5.
		

Crossrefs

Showing 1-10 of 17 results. Next