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.

A334710 Array read by antidiagonals: T(n,k) (n>=1, k>=1) = number of ways to select four points from an n X k grid so that three of them form a triangle of nonzero area and the extra point is on one of the edges of the triangle.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 32, 48, 32, 0, 0, 100, 168, 168, 100, 0, 0, 240, 456, 532, 456, 240, 0, 0, 490, 990, 1312, 1312, 990, 490, 0, 0, 896, 1920, 2652, 3088, 2652, 1920, 896, 0, 0, 1512, 3360, 4972, 5964, 5964, 4972, 3360, 1512, 0, 0, 2400, 5520, 8420, 10816, 11340, 10816, 8420, 5520, 2400, 0
Offset: 1

Views

Author

N. J. A. Sloane, Jun 15 2020

Keywords

Comments

Computed by Tom Duff, Jun 15 2020

Examples

			The initial rows of the array are:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0, 0, 6, 32, 100, 240, 490, 896, 1512, 2400, 3630, 5280, ...
0, 6, 48, 168, 456, 990, 1920, 3360, 5520, 8550, 12720, 18216, ...
0, 32, 168, 532, 1312, 2652, 4972, 8420, 13452, 20480, 29980, 42288, ...
0, 100, 456, 1312, 3088, 5964, 10816, 17768, 27840, 41652, 60040, 83448, ...
0, 240, 990, 2652, 5964, 11340, 20142, 32436, 50004, 73704, 105282, 144936, ...
0, 490, 1920, 4972, 10816, 20142, 35264, 55916, 84960, 123690, 174976, 238512, ...
0, 896, 3360, 8420, 17768, 32436, 55916, 88088, 132708, 191588, 268972, 363876, ...
0, 1512, 5520, 13452, 27840, 50004, 84960, 132708, 198912, 285312, 397968, 534888, ...
0, 2400, 8550, 20480, 41652, 73704, 123690, 191588, 285312, 407744, 566046, 757008, ...
...
The initial antidiagonals are:
0
0, 0
0, 0, 0
0, 6, 6, 0
0, 32, 48, 32, 0
0, 100, 168, 168, 100, 0
0, 240, 456, 532, 456, 240, 0
0, 490, 990, 1312, 1312, 990, 490, 0
0, 896, 1920, 2652, 3088, 2652, 1920, 896, 0
0, 1512, 3360, 4972, 5964, 5964, 4972, 3360, 1512, 0
0, 2400, 5520, 8420, 10816, 11340, 10816, 8420, 5520, 2400, 0
0, 3630, 8550, 13452, 17768, 20142, 20142, 17768, 13452, 8550, 3630, 0
...
		

Crossrefs

The main diagonal is A334713.
Triangles A334708, A334709, A334710, A334711 give the counts for the four possible arrangements of four points.
For three points there are just two possible arrangements: see A334704 and A334705.

A372915 a(n) is the number of distinct triangles with area n whose vertices are points of an n X n grid.

Original entry on oeis.org

0, 0, 2, 4, 9, 10, 25, 22, 38, 49, 56, 56, 111, 71, 119, 141, 153, 126, 249, 166, 244, 299, 279, 244, 463, 288, 361, 489, 517, 373, 677, 436, 626, 719, 620, 665, 1078, 604, 811, 936, 1000, 749, 1444, 842, 1221, 1384, 1173, 1016, 1871, 1261, 1393, 1597, 1566, 1259
Offset: 0

Views

Author

Felix Huber, Jun 02 2024

Keywords

Examples

			See the linked illustration for the term a(4) = 9.
		

Crossrefs

Programs

  • Maple
    A372915:=proc(n)
      local p,q,g,h,u,v,x,y,L,M;
      L:=[];
      for g from 2 to n do
        h:=2*n/g;
        if type(h,integer) then
          for x to n do
            M:=[g,sqrt(x^2+h^2),sqrt((g-x)^2+h^2)];
            M:=sort(M);
            if not member(M,L) then
              L:=[op(L),M];
            fi;
          od;
        fi;
      od;
      for p to n do
        for q from 1 to p do
          g:=sqrt(p^2+q^2);
          h:=2*n/g;
          u:=h/g*q;
          v:=q+h/g*p;
          for x from max(1,ceil(p/q*(v-n)+u)) to min(n,floor(p/q*v+u)) do
            y:=q/p*(u-x)+v;
            if type(y,integer) and x <> p and y <> q then
              M:=[g,sqrt(x^2+(y-q)^2),sqrt((x-p)^2+y^2)];
              M:=sort(M);
              if not member(M,L) then
                L:=[op(L),M];
              fi;
            fi;
          od;
        od;
      od;
      return numelems(L);
    end proc;
    seq(A372915(n),n=0..53);
Showing 1-2 of 2 results.