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

A271343 Triangle read by rows: T(n,k) = A196020(n,k) - A266537(n,k), n>=1, k>=1.

Original entry on oeis.org

1, 1, 5, 1, 1, 0, 9, 3, 1, -2, 1, 13, 5, 0, 1, 0, 0, 17, 7, 3, 1, -6, 0, 1, 21, 9, 0, 0, 1, 0, 3, 0, 25, 11, 0, 0, 1, -10, 0, 3, 29, 13, 7, 0, 1, 1, 0, 0, 0, 0, 33, 15, 0, 0, 0, 1, -14, 3, 5, 0, 37, 17, 0, 0, 0, 1, 0, 0, -2, 3, 41, 19, 11, 0, 0, 1, 1, -18, 0, 7, 0, 0, 45, 21, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Apr 06 2016

Keywords

Comments

Gives an identity for A000593. Alternating sum of row n equals the sum of odd divisors of n, i.e., Sum_{k=1..A003056(n)} (-1)^(k-1)*T(n,k) = A000593(n).
Row n has length A003056(n) hence the column k starts in row A000217(k).
Since the odd-indexed rows of the triangle A266537 contain all zeros then odd-indexed rows of this triangle are the same as the odd-indexed rows of the triangle A196020.
If T(n,k) is the second odd number in the column k then T(n+1,k+1) = 1 is the first element in the column k+1.
Alternating row sums of A196020 give A000203.
Alternating row sums of A266537 give A146076.

Examples

			Triangle begins:
1;
1;
5,   1;
1,   0;
9,   3;
1,  -2,  1;
13,  5,  0;
1,   0,  0;
17,  7,  3;
1,  -6,  0,  1;
21,  9,  0,  0;
1,   0,  3,  0;
25, 11,  0,  0;
1, -10,  0,  3;
29, 13,  7,  0,  1;
1,   0,  0,  0,  0;
33, 15,  0,  0,  0;
1, -14,  3,  5,  0;
37, 17,  0,  0,  0;
1,   0,  0, -2,  3;
41, 19, 11,  0,  0,  1;
1, -18,  0,  7,  0,  0;
45, 21,  0,  0,  0,  0;
1,   0,  3,  0,  0,  0;
49, 23,  0,  0,  5,  0;
1, -22,  0,  9,  0,  0;
53, 25, 15,  0,  0,  3;
1,   0,  0, -6,  0,  0,  1;
...
For n = 18 the divisors of 18 are 1, 2, 3, 6, 9, 18 and the sum of odd divisors of 18 is 1 + 3 + 9 = 13. On the other hand, the 18th row of the triangle is 1, -14, 3, 5, 0, so the alternating row sum is 1 -(-14) + 3 - 5 + 0 = 13, equaling the sum of odd divisors of 18.
		

Crossrefs

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