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.

A258318 Number of distinct numbers in rows 0 through n of triangle A258197.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 9, 12, 16, 20, 24, 29, 34, 41, 44, 50, 57, 66, 74, 83, 91, 102, 112, 124, 135, 148, 161, 174, 187, 201, 214, 230, 246, 263, 279, 296, 313, 331, 349, 369, 388, 408, 428, 450, 471, 494, 516, 540, 563, 588, 612, 637, 662, 689, 715, 741, 769
Offset: 0

Views

Author

Reinhard Zumkeller, May 26 2015

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, insert, size)
    a258318 n = a258318_list !! n
    a258318_list = f 2 a258197_tabl $ singleton 0 where
       f k (xs:xss) zs = g (take (div k 2) xs) zs where
         g []     ys = size ys : f (k + 1) xss ys
         g (x:xs) ys = g xs (insert x ys)