login
A376832
Irregular triangle read by rows: the n-th row gives the number of points of an n X n square lattice that lie above or to the left of a line of increasing slope that passes through two lattice points one of which is the bottom-left corner of the lattice, (0, 0).
2
2, 1, 0, 6, 5, 3, 2, 0, 12, 11, 10, 9, 6, 5, 4, 3, 0, 20, 19, 18, 17, 16, 15, 14, 10, 9, 8, 7, 6, 5, 4, 0, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 0, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 0
OFFSET
2,1
COMMENTS
The increasing slopes of the line are given by the Farey series of order n - 1. Specifically, they are given by the fractions A006842(n-1)/A006843(n-1) followed by their reciprocals A006843(n-1)/A006842(n-1) in reverse order, with the fraction 1/1 included only once.
LINKS
Stefano Spezia, Table of n, a(n) for n = 2..9081 (first 30 rows of the irregular triangle)
FORMULA
T(n, k) = n*(n - 1) - k + 1 for 1 <= k < (A118403(n)+1)/2.
T(n, k) = n*(n - 1)/2 - k + (A118403(n)+1)/2 for (A118403(n)+1)/2 <= k < A118403(n).
T(n, A118403(n)) = 0.
EXAMPLE
The irregular triangle begins as:
2, 1, 0;
6, 5, 3, 2, 0;
12, 11, 10, 9, 6, 5, 4, 3, 0;
20, 19, 18, 17, 16, 15, 14, 10, 9, 8, 7, 6, 5, 4, 0;
...
MATHEMATICA
A118403[n_]:=SeriesCoefficient[(1-2*x+2*x^2)*(1+x^2)/(1-x)^3, {x, 0, n}]; T[n_, k_]:=If[1<=k<(A118403[n]+1)/2, n(n-1)-k+1, If[(A118403[n]+1)/2<=k<A118403[n], n(n-1)/2-k+(A118403[n]+1)/2, 0]]; Table[T[n, k], {n, 2, 7}, {k, A118403[n]}]//Flatten
CROSSREFS
Cf. A002378, A006842, A006843, A118403 (row lengths), A161680, A379540 (row sums).
Sequence in context: A358694 A047922 A276891 * A021830 A247686 A352369
KEYWORD
nonn,look,tabf
AUTHOR
Stefano Spezia, Dec 22 2024
STATUS
approved