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.

A056230 Construct difference array so that (1) first row begins with 1, (2) every row is monotonic increasing, (3) no number appears more than once, (4) smallest number not yet used begins a new row. Sequence gives array read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 7, 11, 17, 26, 12, 19, 30, 47, 73, 13, 25, 44, 74, 121, 194, 14, 27, 52, 96, 170, 291, 485, 15, 29, 56, 108, 204, 374, 665, 1150, 16, 31, 60, 116, 224, 428, 802, 1467, 2617, 18, 34, 65, 125, 241, 465, 893, 1695, 3162, 5779, 20, 38, 72, 137, 262
Offset: 1

Views

Author

Jonas Wallgren, Jul 30 2000

Keywords

Examples

			Array begins
1 3 9 26 73 194 ...
.2 6 17 47 121 ...
. 4 11 30 74 ...
.. 7 19 44 ...
... 12 25 ...
.... 13 ...
		

Crossrefs

Cf. A057153 (first row), A200379 (second row), A052474 (main diagonal), A057154 (numbers not used), A056231, A056232, A056233, A056234.

Programs

  • Haskell
    import Data.List (intersect, union, (\\))
    a056230 n k = a056230_tabl !! (n-1) !! (k-1)
    a056230_tabl = [1] : f [1] [2..] [1] where
       f adiag (a:as) us | null (adiag' `intersect` us) =
                           adiag' : f adiag' (as \\ adiag') (us `union` adiag')
                         | otherwise = f adiag as us
                         where adiag' = scanl (+) a adiag
    -- Reinhard Zumkeller, Nov 19 2011