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.

A174557 Triangle T(n, k) = -floor(n/k) with T(n, n) = 1, read by rows.

Original entry on oeis.org

1, -2, 1, -3, -1, 1, -4, -2, -1, 1, -5, -2, -1, -1, 1, -6, -3, -2, -1, -1, 1, -7, -3, -2, -1, -1, -1, 1, -8, -4, -2, -2, -1, -1, -1, 1, -9, -4, -3, -2, -1, -1, -1, -1, 1, -10, -5, -3, -2, -2, -1, -1, -1, -1, 1, -11, -5, -3, -2, -2, -1, -1, -1, -1, -1, 1, -12, -6, -4, -3, -2, -2, -1, -1, -1, -1, -1, 1
Offset: 1

Views

Author

Mats Granvik, Paul D. Hanna, Mar 22 2010

Keywords

Examples

			Table begins:
    1;
   -2,  1;
   -3, -1,  1;
   -4, -2, -1,  1;
   -5, -2, -1, -1,  1;
   -6, -3, -2, -1, -1,  1;
   -7, -3, -2, -1, -1, -1,  1;
   -8, -4, -2, -2, -1, -1, -1,  1;
   -9, -4, -3, -2, -1, -1, -1, -1,  1;
  -10, -5, -3, -2, -2, -1, -1, -1, -1, 1;
		

Crossrefs

Programs

  • Magma
    [k eq n select 1 else -Floor(n/k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 06 2021
  • Mathematica
    Table[If[k==n, 1, -Floor[n/k]], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Mar 06 2021 *)
  • Sage
    flatten([[1 if k==n else -(n//k) for k in [1..n]] for n in [1..12]]) # G. C. Greubel, Mar 06 2021
    

Formula

T(n, k) = A010766(n, k)*A154990(n, k).
T(n, k) = -floor(n/k) with T(n, n) = 1. - G. C. Greubel, Mar 06 2021