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.

A331762 Triangle read by rows: T(n,k) (1 <= k <= n) = Sum_{i=1..n, j=1..k, gcd(i,j)=2} (n+1-i)*(k+1-j).

Original entry on oeis.org

0, 0, 1, 0, 2, 4, 0, 4, 8, 15, 0, 6, 12, 22, 32, 0, 9, 18, 33, 48, 71, 0, 12, 24, 44, 64, 94, 124, 0, 16, 32, 58, 84, 123, 162, 211, 0, 20, 40, 72, 104, 152, 200, 260, 320, 0, 25, 50, 90, 130, 190, 250, 325, 400, 499
Offset: 1

Views

Author

N. J. A. Sloane, Feb 04 2020

Keywords

Examples

			Triangle begins:
  0;
  0,  1;
  0,  2,  4;
  0,  4,  8,  15;
  0,  6, 12,  22,  32;
  0,  9, 18,  33,  48,  71;
  0, 12, 24,  44,  64,  94, 124;
  0, 16, 32,  58,  84, 123, 162, 211;
  0, 20, 40,  72, 104, 152, 200, 260, 320;
  0, 25, 50,  90, 130, 190, 250, 325, 400, 499;
  0, 30, 60, 108, 156, 228, 300, 390, 480, 598, 716;
  ...
		

Crossrefs

The main diagonal is A331761.
See A335683 for another version.

Programs

  • Maple
    V := proc(m,n,q) local a,i,j; a:=0;
    for i from 1 to m do for j from 1 to n do
    if gcd(i,j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end;
    for m from 1 to 12 do
    lprint([seq(V(m,n,2),n=1..m)]); od:
  • Mathematica
    Table[Sum[Boole[GCD[i, j] == 2] (n + 1 - i) (k + 1 - j), {i, n}, {j, k}], {n, 11}, {k, n}] // Flatten (* Michael De Vlieger, Feb 04 2020 *)
Showing 1-1 of 1 results.