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 11-17 of 17 results.

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

Original entry on oeis.org

4, 12, 20, 4, 28, 0, 36, 12, 44, 0, 4, 52, 20, 0, 60, 0, 0, 68, 28, 12, 76, 0, 0, 4, 84, 36, 0, 0, 92, 0, 20, 0, 100, 44, 0, 0, 108, 0, 0, 12, 116, 52, 28, 0, 4, 124, 0, 0, 0, 0, 132, 60, 0, 0, 0, 140, 0, 36, 20, 0, 148, 68, 0, 0, 0, 156, 0, 0, 0, 12, 164, 76, 44, 0, 0, 4, 172, 0, 0, 28, 0, 0, 180, 84, 0, 0, 0, 0, 188, 0, 52, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Mar 30 2014

Keywords

Comments

Gives an identity for A239050. Alternating sum of row n equals A239050(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = 4*A000203(n) = 2*A074400(n) = A239050(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Note that if T(n,k) = 12 then T(n+1,k+1) = 4, the first element of the column k+1.
The number of positive terms in row n is A001227(n).
For more information see A196020.
Column 1 is A017113. - Omar E. Pol, Apr 17 2016

Examples

			Triangle begins:
  4;
  12;
  20,   4;
  28,   0;
  36,  12;
  44,   0,  4;
  52,  20,  0;
  60,   0,  0;
  68,  28, 12;
  76,   0,  0,  4;
  84,  36,  0,  0;
  92,   0, 20,  0;
  100, 44,  0,  0;
  108,  0,  0, 12;
  116, 52, 28,  0,  4;
  124,  0,  0,  0,  0;
  132, 60,  0,  0,  0;
  140,  0, 36, 20,  0;
  148, 68,  0,  0,  0;
  156,  0,  0,  0, 12;
  164, 76, 44,  0,  0,  4;
  172,  0,  0, 28,  0,  0;
  180, 84,  0,  0,  0,  0;
  188,  0, 52,  0,  0,  0;
  ...
For n = 9, the 9th row of triangle is [68, 28, 12], therefore the alternating row sum is 68 - 28 + 12 = 52. On the other hand we have that 4*A000203(9) = 2*A074400(9) = A239050(9) = 4*13 = 2*26 = 52, equaling the alternating sum of the 9th row of the triangle.
		

Crossrefs

Formula

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

A235799 a(n) = n^2 - sigma(n).

Original entry on oeis.org

0, 1, 5, 9, 19, 24, 41, 49, 68, 82, 109, 116, 155, 172, 201, 225, 271, 285, 341, 358, 409, 448, 505, 516, 594, 634, 689, 728, 811, 828, 929, 961, 1041, 1102, 1177, 1205, 1331, 1384, 1465, 1510, 1639, 1668, 1805, 1852, 1947, 2044, 2161, 2180, 2344, 2407
Offset: 1

Views

Author

Omar E. Pol, Jan 24 2014

Keywords

Comments

From Omar E. Pol, Apr 11 2021: (Start)
If n is prime (A000040) then a(n) = n^2 - n - 1.
If n is a power of 2 (A000079) then a(n) = (n-1)^2.
If n is a perfect number (A000396) then a(n) = (n-1)^2 - 1, assuming there are no odd perfect numbers.
In order to construct the diagram of the symmetric representation of a(n) 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. The area of the region that is below the symmetric representation of sigma(n) equals A024916(n-1).
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 turn OFF the cells of the symmetric representation of sigma(n). Then we turn ON the rest of the cells that are in the square n X n. The result is that the ON cell form the diagram of the symmetric representation of a(n). See the Example section. (End)

Examples

			From _Omar E. Pol, Apr 04 2021: (Start)
Illustration of initial terms in the first quadrant for n = 1..6:
.
.                                                             y|        _ _
.                                              y|      _ _     |_ _ _  |_  |
.                                 y|      _     |_ _ _|   |    |     |   |_|
.                      y|    _     |_ _  |_|    |        _|    |     |_ _
.             y|        |_ _|_|    |   |_       |       |      |         |
.      y|      |_       |   |      |     |      |       |      |         |
.       |_ _   |_|_ _   |_ _|_ _   |_ _ _|_ _   |_ _ _ _|_ _   |_ _ _ _ _|_ _
.          x        x          x            x              x                x
.
n:        1       2         3           4             5               6
a(n):     0       1         5           9            19              24
.
Illustration of initial terms in the first quadrant for n = 7..9:
.                                                y|          _ _ _ _
.                          y|          _ _ _      |_ _ _ _ _|       |
.      y|        _ _ _      |_ _ _ _  |     |     |          _ _    |
.       |_ _ _ _|     |     |       | |_    |     |         |_  |   |
.       |             |     |       |_  |_ _|     |           |_|  _|
.       |            _|     |         |_ _        |               |
.       |           |       |             |       |               |
.       |           |       |             |       |               |
.       |           |       |             |       |               |
.       |_ _ _ _ _ _|_ _    |_ _ _ _ _ _ _|_ _    |_ _ _ _ _ _ _ _|_ _
.                      x                     x                       x
.
n:              7                    8                      9
a(n):          41                   49                     68
.
For n = 9 the figures 1, 2 and 3 below show respectively the three stages described in the Comments section as follows:
.
.   y|_ _ _ _ _ 5            y|_ _ _ _ _ _ _ _ _      y|          _ _ _ _
.    |_ _ _ _ _|              |_ _ _ _ _|       |      |_ _ _ _ _|       |
.    |         |_ _ 3         |         |_ _ R  |      |          _ _    |
.    |         |_  |          |         |_  |   |      |         |_  |   |
.    |           |_|_ _ 5     |           |_|_ _|      |           |_|  _|
.    |               | |      |               | |      |               |
.    |      Q        | |      |       Q       | |      |               |
.    |               | |      |               | |      |               |
.    |               | |      |               | |      |               |
.    |_ _ _ _ _ _ _ _|_|_     |_ _ _ _ _ _ _ _|_|_     |_ _ _ _ _ _ _ _|_ _
.                       x                        x                        x
.         Figure 1.                Figure 2.                Figure 3.
.         Symmetric                Symmetric                Symmetric
.       representation           representation           representation
.         of sigma(9)              of sigma(9)             of a(9) = 68
.       A000203(9) = 13          A000203(9) = 13
.           and of                   and of
.     Q = A024916(8) = 56      R = A004125(9) = 12
.                              Q = A024916(8) = 56
.
Note that the symmetric representation of a(9) contains a hole formed by three cells because these three cells were the central part of the symmetric representation of sigma(9). (End)
		

Crossrefs

Programs

  • Magma
    [n^2 - DivisorSigma(1,n): n in [1..50]]; // G. C. Greubel, Oct 31 2018
  • Mathematica
    Table[n^2-DivisorSigma[1,n],{n,50}] (* Harvey P. Dale, Sep 02 2016 *)
  • PARI
    vector(50, n, n^2 - sigma(n)) \\ G. C. Greubel, Oct 31 2018
    

Formula

a(n) = A000290(n) - A000203(n).
a(n) = A024916(n-1) + A004125(n), n > 1.
G.f.: x*(1 + x)/(1 - x)^3 - Sum_{k>=1} x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Mar 17 2017
From Omar E. Pol, Apr 10 2021: (Start)
a(n) = A024816(n) + A000217(n-1).
a(n) = A067436(n) + A153485(n) + A244048(n). (End)

A236540 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, except the first column which lists the triangular numbers, and the first element of column k is in row k(k+1)/2.

Original entry on oeis.org

0, 1, 3, 1, 6, 1, 10, 4, 15, 4, 1, 21, 9, 1, 28, 9, 1, 36, 16, 4, 45, 16, 4, 1, 55, 25, 4, 1, 66, 25, 9, 1, 78, 36, 9, 1, 91, 36, 9, 4, 105, 49, 16, 4, 1, 120, 49, 16, 4, 1, 136, 64, 16, 4, 1, 153, 64, 25, 9, 1, 171, 81, 25, 9, 1, 190, 81, 25, 9, 4, 210, 100, 36, 9, 4, 1
Offset: 1

Views

Author

Omar E. Pol, Jan 28 2014

Keywords

Comments

Gives an identity for the sum of all aliquot divisors of all positive integers <= n.
Alternating sum of row n equals A153485(n), i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A153485(n).
Row n has length A003056(n) hence the first element of column k is in row A000217(k).
Column 1 is A000217. Columns 2-3 are A008794, A211547, but without the zeros.
Column k lists the partial sums of the k-th column of triangle A231347 which gives an identity for the sum of aliquot divisors of n. - Omar E. Pol, Nov 11 2014

Examples

			Triangle begins:
    0;
    1;
    3,   1;
    6,   1;
   10,   4;
   15,   4,   1;
   21,   9,   1;
   28,   9,   1;
   36,  16,   4;
   45,  16,   4,   1;
   55,  25,   4,   1;
   66,  25,   9,   1;
   78,  36,   9,   1;
   91,  36,   9,   4;
  105,  49,  16,   4,  1;
  120,  49,  16,   4,  1;
  136,  64,  16,   4,  1;
  153,  64,  25,   9,  1;
  171,  81,  25,   9,  1;
  190,  81,  25,   9,  4;
  210, 100,  36,   9,  4,  1;
  231, 100,  36,  16,  4,  1;
  253, 121,  36,  16,  4,  1;
  276, 121,  49,  16,  4,  1;
  ...
For n = 6 the divisors of all positive integers <= 6 are [1], [1, 2], [1, 3], [1, 2, 4], [1, 5], [1, 2, 3, 6] hence the sum of all aliquot divisors is [0] + [1] + [1] + [1+2] + [1] + [1+2+3] = 0 + 1 + 1 + 3 + 1 + 6 = 12. On the other hand the 6th row of triangle is 15, 4, 1, therefore the alternating row sum is 15 - 4 + 1 = 12, equaling the sum of all aliquot divisors of all positive integers <= 6.
		

Crossrefs

A239446 Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the elements of A004273 interleaved with k zeros, and the first element of column k is in row k*(k+1)/2.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 7, 3, 0, 0, 0, 1, 0, 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, 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, 0, 7, 0, 0, 0, 21, 0
Offset: 1

Views

Author

Omar E. Pol, Mar 20 2014

Keywords

Comments

Alternating sum of row n equals A235796(n), i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A235796(n).
Row n has length A003056(n) hence column k starts in row A000217(k).
Column k starts with k+1 zeros and then lists the odd numbers interleaved with k zeros.
It appears that row n lists all zeros iff n is a power of 2.

Examples

			Triangle begins:
0;
0;
1,  0;
0,  0;
3,  0;
0,  1,  0;
5,  0,  0;
0,  0,  0;
7,  3,  0;
0,  0,  1,  0;
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,  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,  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 = 15 the 15th row of triangle is 13, 7, 0, 1, and the alternating sum is 13 - 7 + 0 - 1 = A235796(15) = 5.
		

Crossrefs

A256532 Product of n and the sum of remainders of n mod k, for k = 1, 2, 3, ..., n.

Original entry on oeis.org

0, 0, 3, 4, 20, 18, 56, 64, 108, 130, 242, 204, 364, 434, 540, 576, 867, 846, 1216, 1220, 1470, 1694, 2254, 2040, 2575, 2912, 3375, 3472, 4379, 4140, 5177, 5344, 6072, 6698, 7630, 7128, 8621, 9424, 10491, 10320, 12177, 11928, 13975, 14432, 15255, 16468, 18941, 17952, 20286, 21000, 22899, 23608, 26765, 26568, 29095
Offset: 1

Views

Author

Omar E. Pol, May 03 2015

Keywords

Comments

a(n) is also the volume (or the total number of unit cubes) of a polycube which is a right prism whose base is the symmetric representation of A004125(n).
Note that the union of this right prism and the irregular staircase after n-th stage described in A244580 and the irregular stepped pyramid after (n-1)-th stage described in A245092, form a hexahedron (or cube) of side length n. This comment is represented by the third formula.

Examples

			a(5) = 20 because 5 * (0 + 1 + 2 + 1) = 5 * 4 = 20.
a(6) = 18 because 6 * (0 + 0 + 0 + 2 + 1) = 6 * 3 = 18.
a(7) = 56 because 7 * (0 + 1 + 1 + 3 + 2 + 1) = 7 * 8 = 56.
		

Crossrefs

Programs

  • Mathematica
    Table[n*Sum[Mod[n,i],{i,2,n-1}],{n,55}] (* Ivan N. Ianakiev, May 04 2015 *)
  • PARI
    vector(50, n, n*sum(k=1, n, n % k)) \\ Michel Marcus, May 05 2015
    
  • Python
    def A256532(n):
        s=0
        for k in range(1,n+1):
            s+=n%k
        return s*n # Indranil Ghosh, Feb 13 2017
    
  • Python
    from math import isqrt
    def A256532(n): return n**3+n*((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 22 2023

Formula

a(n) = n * A004125(n).
a(n) = n^3 - A256533(n).
a(n) = n^3 - A143128(n) - A175254(n-1), n > 1.

A239313 Triangle read by rows: T(n,k), n>=1, k>=1, in which column k lists the odd numbers interleaved with k-1 zeros, except the first column which lists 0 together with the nonnegative integers, and the first element of column k is in row k*(k+1)/2.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Mar 15 2014

Keywords

Comments

Alternating row sums give the Chowla's function, i.e., sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A048050(n).
Row n has length A003056(n) hence column k starts in row A000217(k).
Column 1 gives 0 together with A001477.
Column 2 is A193356.
The number of positive terms in row n is A001227(n), if n >= 3. - Omar E. Pol, Apr 18 2016

Examples

			Triangle begins (row n = 1..24):
0;
0;
1,   1;
2,   0;
3,   3;
4,   0,  1;
5,   5,  0;
6,   0,  0;
7,   7,  3;
8,   0,  0,  1;
9,   9,  0,  0;
10,  0,  5,  0;
11, 11,  0,  0;
12,  0,  0,  3;
13, 13,  7,  0,  1;
14,  0,  0,  0,  0;
15, 15,  0,  0,  0;
16,  0,  9,  5,  0;
17, 17,  0,  0,  0;
18,  0,  0,  0,  3;
19, 19, 11,  0,  0,  1;
20,  0,  0,  7,  0,  0;
21, 21,  0,  0,  0,  0;
22,  0, 13,  0,  0,  0;
...
For n = 15 the divisors of 15 are 1, 3, 5, 15 therefore the sum of divisors of 15 except 1 and 15 is 3 + 5 = 8. On the other hand the 15th row of triangle is 13, 13, 7, 0, 1, hence the alternating row sum is 13 - 13 + 7 - 0 + 1 = 8, equalling the sum of divisors of 15 except 1 and 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, except 1 and n. Example: the sum of divisors of 24 except 1 and 24 is 2 + 3 + 4 + 6 + 8 + 12 = 35, and the alternating sum of the 24th row of triangle is 22 - 0 + 13 - 0 + 0 - 0 = 35.
		

Crossrefs

Formula

T(n,k) = A196020(n,k), if k >= 2. - Omar E. Pol, Apr 18 2016

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).
Previous Showing 11-17 of 17 results.