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

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

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Dec 22 2024

Keywords

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.

Examples

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

Crossrefs

Cf. A002378, A006842, A006843, A118403 (row lengths), A161680, A379540 (row sums).

Programs

  • 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

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.
Showing 1-1 of 1 results.