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.

A049615 Array T by antidiagonals; T(i,j) = number of lattice points (x,y) hidden from (i,j), where 0<=x<=i, 0<=y<=j; (x,y) is hidden if there is a lattice point (h,k) collinear with and between (x,y) and (i,j).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Robert Israel, Jun 25 2015: (Start)
T(i,j) = number of (x,y) with 1 <= x <= i, 1 <= y <= j and gcd(x,y) > 1.
T(n,n) - T(n-1,n) = A062830(n) for x >= 2.
T(m+1,n+1) - T(m+1,n) - T(m,n+1) + T(m,n) = 1 if gcd(m+1,n+1) > 1, 0 otherwise. (End)

Examples

			Antidiagonals (each starting on row 0):
  {0};
  {0,0};
  {1,0,1};
  ...
Array begins:
  0  0  1  2  3  4  5
  0  0  1  2  3  4  5
  1  1  3  4  6  7  9
  2  2  4  6  8  9 12
  3  3  6  8 11 12 16
  4  4  7  9 12 14 18
  5  5  9 12 16 18 23
  ...
		

Crossrefs

Programs

  • Maple
    N := 20: # to get the first N*(N+1)/2 terms
    T:= Array(1..N+1,1..N+1):
    B:= Array(1..N+1,1..N+1, (i,j) -> `if`(igcd(i-1,j-1)>1,1,0)):
    T[1,1..N+1]:= Statistics:-CumulativeSum(B[1,1..N+1]):
    for i from 2 to N+1 do
       T[i,1..N+1]:= T[i-1,1..N+1] + Statistics:-CumulativeSum(B[i,1..N+1])
    od:
    seq(seq(round(T[i+1,t-i+1]),i=0..t),t=0..N); # Robert Israel, Jun 25 2015
    # alternative program R. J. Mathar, Oct 26 2015
    A049615 := proc(n,k)
        local a,x,y;
        a := 0 ;
        for x from 0 to n do
        for y from 0 to k do
            if igcd(x,y) > 1 then
                a := a+1 ;
            end if;
        end do:
        end do:
        a;
    end proc:
    seq(seq(A049615(d-k,k),k=0..d),d=0..10) ;
  • Mathematica
    Table[Length[Select[Flatten[Table[{x, y}, {x, 0, n - k}, {y, 0, k}], 1], GCD @@ # > 1 &]], {n, 0, 11}, {k, 0, n}] // Flatten (* Ivan Neretin, Jun 25 2015 *)
  • PARI
    T(n,k) = sum(i=0, n, sum(j=0, k, gcd(i,j)>1));
    tabl(7, 7, n, k, T(n-1, k-1)) \\ Michel Marcus, Aug 06 2021