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.

A191907 Square array read by antidiagonals up: T(n,k) = -(n-1) if n divides k, else 1.

Original entry on oeis.org

0, 1, 0, 1, -1, 0, 1, 1, 1, 0, 1, 1, -2, -1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, -3, 1, -1, 0, 1, 1, 1, 1, 1, -2, 1, 0, 1, 1, 1, 1, -4, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -5, 1, -3, -2, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, -6, 1, 1, 1, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -4, 1, -2, 1, 0, 1, 1, 1, 1, 1, 1, 1, -7, 1, 1, 1, -3, 1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Mats Granvik, Jun 19 2011

Keywords

Comments

Apart from the top row, the same as A177121.
Sum_{k>=1} T(n,k)/k = log(n); this has been pointed out by Jaume Oliver Lafont in A061347 and A002162.

Examples

			Table starts:
0..0..0..0..0..0..0..0..0...
1.-1..1.-1..1.-1..1.-1..1...
1..1.-2..1..1.-2..1..1.-2...
1..1..1.-3..1..1..1.-3..1...
1..1..1..1.-4..1..1..1..1...
1..1..1..1..1.-5..1..1..1...
1..1..1..1..1..1.-6..1..1...
1..1..1..1..1..1..1.-7..1...
1..1..1..1..1..1..1..1.-8...
		

Crossrefs

Programs

  • Mathematica
    Clear[t, n, k];
    nn = 30;
    t[n_, k_] := t[n, k] = If[Mod[n, k] == 0, -(k - 1), 1]
    MatrixForm[Transpose[Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]]
  • PARI
    N=20; M=matrix(N,N,n,k, if(n%k==0,1-k,1))~

Formula

If n divides k then T(n,k) = -(n-1) else 1.