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.

A224841 Triangle T(n,k) read by rows: Substring of k digits of sequence A007376, ending at position n, 1 <= k <= n.

Original entry on oeis.org

1, 2, 12, 3, 23, 123, 4, 34, 234, 1234, 5, 45, 345, 2345, 12345, 6, 56, 456, 3456, 23456, 123456, 7, 67, 567, 4567, 34567, 234567, 1234567, 8, 78, 678, 5678, 45678, 345678, 2345678, 12345678, 9, 89, 789, 6789, 56789, 456789, 3456789, 23456789, 123456789
Offset: 1

Views

Author

M. F. Hasler, Jul 22 2013

Keywords

Comments

In contrast to sequence A162711, this sequence contains each substring without leading zero of A007376 at least once.

Programs

  • Haskell
    import Data.List (inits, tails)
    a224841 n k = a224841_tabl !! (n-1) !! (k-1)
    a224841_row n = a224841_tabl !! (n-1)
    a224841_tabl = map
       (reverse . map (read . concatMap show) . init . tails) $
       tail $ inits a007376_list :: [[Integer]]
    -- Reinhard Zumkeller, Nov 11 2013
  • PARI
    for(i=1,9,for(j=1,i,for(k=i-j+1,i,print1(k));print1(",")))