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.

Previous Showing 31-35 of 35 results.

A360461 T(n,k) is the sum of all the k-th smallest divisors of all positive integers <= n. Irregular triangle read by rows (n>=1, k>=1).

Original entry on oeis.org

1, 2, 2, 3, 5, 4, 7, 4, 5, 12, 4, 6, 14, 7, 6, 7, 21, 7, 6, 8, 23, 11, 14, 9, 26, 20, 14, 10, 28, 25, 24, 11, 39, 25, 24, 12, 41, 28, 28, 6, 12, 13, 54, 28, 28, 6, 12, 14, 56, 35, 42, 6, 12, 15, 59, 40, 57, 6, 12, 16, 61, 44, 65, 22, 12, 17, 78, 44, 65, 22, 12, 18, 80, 47, 71, 31, 30, 19, 99, 47, 71, 31, 30
Offset: 1

Views

Author

Omar E. Pol, Feb 07 2023

Keywords

Comments

Also, looking at all the partitions into equal-sized parts of all positive integers <= n, T(n,k) is the total number of parts in the partitions with the k-th largest parts.
Column k lists the partial sums of the column k of A027750.
The rows where the length row increases to a record gives A002182.

Examples

			Triangle begins:
   1;
   2,   2;
   3,   5;
   4,   7,  4;
   5,  12,  4;
   6,  14,  7,   6;
   7,  21,  7,   6;
   8,  23, 11,  14;
   9,  26, 20,  14;
  10,  28, 25,  24;
  11,  39, 25,  24;
  12,  41, 28,  28,  6, 12;
  ...
For n = 6 the divisors, in increasing order, of all positive integers <= 6 are as follows:
  -----------------------------
  n\k |    1     2     3     4
  -----------------------------
  1   |    1
  2   |    1,    2
  3   |    1,    3
  4   |    1,    2,    4
  5   |    1,    5
  6   |    1,    2,    3,    6
.
The sum of the first divisors (k = 1) is equal to 1+1+1+1+1+1 = 6, so T(6,1) = 6.
The sum of the second divisors (k = 2) is equal to 2+3+2+5+2 = 14, so T(6,2) = 14.
The sum of the third divisors (k = 3) is equal to 4+3 = 7, so T(6,3) = 7.
The sum of the fourth divisors (k = 4) is equal to 6, so T(6,4) = 6.
So the 6th row of the triangle is [6, 14, 7, 6].
Also, for n = 6 the partitions into equal parts, with the sizes of the parts in decreasing order, of all positive integers <= 6 are as follows:
  ----------------------------------------------------
  n\k |     1      2              3           4
  ----------------------------------------------------
  1   |    [1]
  2   |    [2],  [1,1]
  3   |    [3],  [1,1,1]
  4   |    [4],  [2,2],       [1,1,1,1]
  5   |    [5],  [1,1,1,1,1]
  6   |    [6],  [3,3],       [2,2,2],   [1,1,1,1,1,1]
.
The total number of parts in the 1st partitions (k = 1) is 6, so T(6,1) = 6.
The total number of parts in the 2nd partitions (k = 2) is 14, so T(6,2) = 14.
The total number of parts in the 3rd partitions (k = 3) is 7, so T(6,3) = 7.
The total number of parts in the 4th partitions (k = 4) is 6, so T(6,4) = 6.
So the 6th row of the triangle is [6, 14, 7, 6].
		

Crossrefs

Row sums give A024916.
Row lengths give A070319.
Column 1 gives A000027.
Column 2 gives A088821.
The sum of the first n rows gives A175254.
Main sequences: A027750 and A244051.

Programs

A367379 a(n) = Sum_{j=1..n} Sum_{i=1..n} (j mod i).

Original entry on oeis.org

0, 1, 5, 12, 26, 44, 73, 109, 157, 215, 292, 375, 481, 603, 744, 900, 1087, 1287, 1522, 1773, 2053, 2361, 2712, 3073, 3476, 3913, 4389, 4891, 5448, 6021, 6653, 7316, 8028, 8786, 9599, 10427, 11326, 12277, 13287, 14325, 15442, 16587, 17815, 19089, 20418, 21811
Offset: 1

Views

Author

DarĂ­o Clavijo, Nov 15 2023

Keywords

Comments

Partial sums of A049766.

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    S:= [seq(NumberTheory:-SumOfDivisors(i,1),i=1..N+1)]:
    SS:= ListTools:-PartialSums(S):
    S2:= [seq(i*S[i],i=1..N+1)]:
    SS2:= ListTools:-PartialSums(S2):
    f:= n -> 1/2*n^2*(n+1) - (n+1)*SS[n+1]+SS2[n+1]:
    map(f, [$1..N]); # Robert Israel, Dec 20 2023
  • Mathematica
    a[n_]:=n^2(n+1)/2-Sum[DivisorSigma[1,i](n-i+1),{i,n+1}]; Array[a,47,0] (* Stefano Spezia, Nov 17 2023 *)
  • PARI
    a(n) = sum(j=1, n, sum(i=1, n, j % i)); \\ Michel Marcus, Nov 16 2023
  • Python
    from sympy import divisor_sigma
    A002411 = lambda n: ((n*n)*(n+1))>>1
    A175254 = lambda n: sum(divisor_sigma(i) * (n-i+1) for i in range(1,n+1))
    a = lambda n: A002411(n) - A175254(n)
    print([a(n) for n in range(1, 53)])
    
  • Python
    from math import isqrt
    def A367379(n): return (n**2*(n+1)>>1)-(((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, Dec 20 2023
    

Formula

a(n) = A072481(n) + A000292(n-1).
a(n) = A002411(n) - A175254(n).

A272120 Square array T(n,k), n>=1, k>=1, read by antidiagonals downwards in which column k lists the alternating row sums of the first k columns of the triangle A196020.

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 1, 3, 4, 7, 1, 3, 4, 7, 9, 1, 3, 4, 7, 6, 11, 1, 3, 4, 7, 6, 11, 13, 1, 3, 4, 7, 6, 12, 8, 15, 1, 3, 4, 7, 6, 12, 8, 15, 17, 1, 3, 4, 7, 6, 12, 8, 15, 10, 19, 1, 3, 4, 7, 6, 12, 8, 15, 13, 19, 21, 1, 3, 4, 7, 6, 12, 8, 15, 13, 19, 12, 23, 1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 23, 25, 1, 3, 4, 7
Offset: 1

Views

Author

Omar E. Pol, Apr 20 2016

Keywords

Comments

Every column of this square array is associated to an isosceles triangle and to a stepped pyramid in the same way as the sequence A196020 is associated to the isosceles triangle of A237593 and to the pyramid described in A245092. Hence there are infinitely many isosceles triangles and infinitely many pyramids that are associated to this sequence.
In the Example section appears the triangles and the top views of the pyramids associated to the columns 1 and 2.
The sequence A196020 is associated to the isosceles triangle of A237593 as follows: A196020 --> A236104 --> A235791 --> A237591 --> A237593. Then the structure of the pyramid described in A245092 arises after the 90-degree-zig-zag folding of every row of the isosceles triangle of A237593.
Note that the first m terms of column k are also the first m terms of A000203, where m = A000217(k) + k = A000217(k+1) - 1 = A000096(k).

Examples

			The corner of the square array begins:
1,   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1...
3,   3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3...
5,   4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4...
7,   7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7,  7...
9,   6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6...
11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12...
13,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8...
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15...
17, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13...
19, 19, 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18...
21, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12...
23, 23, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28...
25, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14...
27, 27, 27, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24...
29, 16, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24...
...
For k = 1 the first two terms of column k are also the first two terms of A000203, i.e., [1, 3].
For k = 2 the first five terms of column k are also the first five terms of A000203, i.e., [1, 3, 4, 7, 6].
For k = 3 the first nine terms of column k are also the first nine terms of A000203, i.e., [1, 3, 4, 7, 6, 12, 8, 15, 13].
More generally, the first A000096(k) terms of column k are also the first A000096(k) terms of A000203.
.
Illustration of initial terms of the column 1:
.
.                   2D                                3D
.           Isosceles triangle             Top view of the pyramid
.             before folding                    after folding
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
n                  _|_                   T(n,1) _ _ _ _ _ _ _ _ _ x
1                _|_|_|_                    1  |_| | | | | | | |
2        y     _|_ _|_ _|_     x            3  |_ _| | | | | | |
3            _|_ _ _|_ _ _|_                5  |_ _ _| | | | | |
4          _|_ _ _ _|_ _ _ _|_              7  |_ _ _ _| | | | |
5        _|_ _ _ _ _|_ _ _ _ _|_            9  |_ _ _ _ _| | | |
6      _|_ _ _ _ _ _|_ _ _ _ _ _|_         11  |_ _ _ _ _ _| | |
7    _|_ _ _ _ _ _ _|_ _ _ _ _ _ _|_       13  |_ _ _ _ _ _ _| |
8   |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _|      15  |_ _ _ _ _ _ _ _|
.                                              |
.                                              y
.
Illustration of initial terms of the column 2:
.
.                   2D                                3D
.           Isosceles triangle             Top view of the pyramid
.             before folding                    after folding
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
n                  _|_                   T(n,2) _ _ _ _ _ _ _ _ _ x
1                _|_|_|_                    1  |_| | | | | | | |
2        y     _|_ _|_ _|_     x            3  |_ _|_| | | | | |
3            _|_ _|_|_|_ _|_                4  |_ _|  _|_| | | |
4          _|_ _ _|_|_|_ _ _|_              7  |_ _ _|  _ _|_| |
5        _|_ _ _|_ _|_ _|_ _ _|_            6  |_ _ _| |  _ _ _|
6      _|_ _ _ _|_ _|_ _|_ _ _ _|_         11  |_ _ _ _| |
7    _|_ _ _ _|_ _ _|_ _ _|_ _ _ _|_        8  |_ _ _ _| |
8   |_ _ _ _ _|_ _ _|_ _ _|_ _ _ _ _|      15  |_ _ _ _ _|
.                                              |
.                                              y
.
Illustration of initial terms of the column 3:
.
.                   2D                                3D
.           Isosceles triangle             Top view of the pyramid
.             before folding                    after folding
.    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
n                  _|_                   T(n,3) _ _ _ _ _ _ _ _ _ x
1                _|_|_|_                    1  |_| | | | | | | |
2        y     _|_ _|_ _|_     x            3  |_ _|_| | | | | |
3            _|_ _|_|_|_ _|_                4  |_ _|  _|_| | | |
4          _|_ _ _|_|_|_ _ _|_              7  |_ _ _|    _|_| |
5        _|_ _ _|_ _|_ _|_ _ _|_            6  |_ _ _|  _|  _ _|
6      _|_ _ _ _|_|_|_|_|_ _ _ _|_         12  |_ _ _ _|  _|
7    _|_ _ _ _|_ _|_|_|_ _|_ _ _ _|_        8  |_ _ _ _| |
8   |_ _ _ _ _|_ _|_|_|_ _|_ _ _ _ _|      15  |_ _ _ _ _|
.                                              |
.                                              y
.
		

Crossrefs

Column 1 is A005408.
Every diagonal starting with 1 gives A000203.
Columns converge to A000203.
Compare A245093.

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).

A380573 Number of distinct free polyominoes that are terraces in the first n levels of the stepped pyramid described in A245092.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29, 31, 32, 33, 34, 35, 36
Offset: 1

Views

Author

Omar E. Pol, Mar 15 2025

Keywords

Comments

Consider here that the stepped pyramid is an infinite polycube.
a(n) is also the number of distinct free polyominoes that are parts of the symmetric representations of sigma of the first n positive integers.
Conjecture: the polyomino "I" of width 1 and length k appears for the first time in the level 2*k - 1 starting from the top of the stepped pyramid, k >= 1. In other words: that polyomino appears for the first time in the symmetric representation of sigma(2*k-1).

Examples

			For n = 15 there are 16 distinct free polyominoes that are terraces of the stepped pyramid with 15 levels as shown below, so a(15) = 16.
   _
  |_|  _
     _|_|
    |_|_|      _
       _ _    |_|
      |_|_|  _|_|      _
         _ _|_|_|     |_|
        |_|_|_|       |_|      _
           _ _ _   _ _|_|     |_|
          |_|_|_| |_|_|_|     |_|
             _ _ _|_|_|       |_|
            |_|_|_|_|      _ _|_|              _
               _ _ _ _   _|_|_|_|             |_|
              |_|_|_|_| |_|_|                 |_|
                 _ _ _ _|_|                   |_|
                |_|_|_|_|_|                   |_|
                   _ _ _ _ _   _ _            |_|
                  |_|_|_|_|_| |_|_|      _ _ _|_|
                     _ _ _ _ _|_|      _|_|_|_|_|
                    |_|_|_|_|_|_|    _|_|_|_|
                       _ _ _ _ _ _  |_|_|_|_|
                      |_|_|_|_|_|_| |_|_|_|
                         _ _ _ _ _ _|_|              _
                        |_|_|_|_|_|_|_|    _ _   _ _|_|
                           _ _ _ _ _ _ _  |_|_| |_|_|_|
                          |_|_|_|_|_|_|_| |_|  _|_|_|
                             _ _ _ _ _ _ _|_| |_|_|
                            |_|_|_|_|_|_|_|_|
                               _ _ _ _ _ _ _ _
                              |_|_|_|_|_|_|_|_|
.
Compare with the diagram of A245092.
		

Crossrefs

Previous Showing 31-35 of 35 results.