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.

A155029 Complement to A051731 with the identity matrix A023531 included.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Mats Granvik, Jan 19 2009

Keywords

Examples

			Table begins:
  1;
  0, 1;
  0, 1, 1;
  0, 0, 1, 1;
  0, 1, 1, 1, 1;
  0, 0, 0, 1, 1, 1;
  0, 1, 1, 1, 1, 1, 1;
  0, 0, 1, 0, 1, 1, 1, 1;
  0, 1, 0, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Magma
    [k eq n select 1 else (k eq 0 or n mod k eq 0) select 0 else 1: k in [1..n], n in [1..20]]; // G. C. Greubel, Mar 07 2021
  • Mathematica
    Table[If[k==n, 1, If[k==0, 0, If[Mod[n, k]==0, 0, 1]]], {n, 20}, {k, n}]//Flatten (* G. C. Greubel, Mar 07 2021 *)
  • Sage
    flatten([[1 if k==n else 0 if (k==0 or n%k==0) else 1 for k in [1..n]] for n in [1..20]]) # G. C. Greubel, Mar 07 2021
    

Formula

T(n, k) = 0 if n==0 (mod k) otherwise 1 with T(n, n) = 1 and T(n, 1) = 0. - G. C. Greubel, Mar 07 2021