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.

A277647 Triangle T(n,k) = floor(n/sqrt(k)) for 1 <= k <= n^2, read by rows.

Original entry on oeis.org

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

Views

Author

Jason Kimberley, Nov 09 2016

Keywords

Examples

			The first five rows of the triangle are:
1;
2, 1, 1, 1;
3, 2, 1, 1, 1, 1, 1, 1, 1;
4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
5, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

The 1000th row is A033432.

Programs

  • Magma
    A277647:=func;
    [A277647(n,k):k in[1..n^2],n in[1..7]];
    
  • Mathematica
    Table[Floor[n/Sqrt@ k], {n, 7}, {k, n^2}] // Flatten (* Michael De Vlieger, Nov 24 2016 *)
  • PARI
    row(n) = for(k=1, n^2, print1(floor(n/sqrt(k)), ", ")); print("")
    trianglerows(n) = for(k=1, n, row(k))
    /* Print initial five rows of triangle as follows: */
    trianglerows(5) \\ Felix Fröhlich, Nov 12 2016

Formula

T(n,k) = A000196(A277646(n,k)).
T(n,k)sqrt(k) <= n < (T(n,k)+1)sqrt(k).