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.

A245717 Triangle read by rows: T(n,k) = gcd(n,k^2), 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 30 2014

Keywords

Examples

			First rows and their sums (A078430):
.    1:   1                                           1
.    2:   1, 2                                        3
.    3:   1, 1, 3                                     5
.    4:   1, 4, 1, 4                                 10
.    5:   1, 1, 1, 1, 5                               9
.    6:   1, 2, 3, 2, 1,  6                          15
.    7:   1, 1, 1, 1, 1,  1, 7                       13
.    8:   1, 4, 1, 8, 1,  4, 1, 8                    28
.    9:   1, 1, 9, 1, 1,  9, 1, 1, 9                 33
.   10:   1, 2, 1, 2, 5,  2, 1, 2, 1, 10             27
.   11:   1, 1, 1, 1, 1,  1, 1, 1, 1,  1, 11         21
.   12:   1, 4, 3, 4, 1, 12, 1, 4, 3,  4,  1, 12     50
		

Crossrefs

Cf. A050873, A002024, A133819, A078430 (row sums).

Programs

  • Haskell
    a245717 n k = a245717_tabl !! (n-1) !! (k-1)
    a245717_row n = a245717_tabl !! (n-1)
    a245717_tabl = zipWith (zipWith gcd) a002024_tabl a133819_tabl
    
  • Mathematica
    Table[GCD[n,k^2],{n,15},{k,n}]//Flatten (* Harvey P. Dale, Nov 05 2022 *)
  • PARI
    row(n) = vector(n, k, gcd(n, k^2)); \\ Michel Marcus, Jan 24 2022