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.

A057154 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 numbers not used.

Original entry on oeis.org

5, 8, 10, 24, 28, 33, 37, 40, 46, 63, 69, 70, 83, 85, 94, 95, 102, 105, 106, 112, 113, 114, 119, 131, 145, 147, 148, 152, 161, 165, 166, 175, 181, 197, 203, 207, 215, 221, 235, 236, 239, 247, 253, 254, 267, 270, 276, 286, 289, 290, 296, 307, 309, 315, 317, 322
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), A052474 (main diagonal), A056230 (array), A056231, A056232, A056233, A056234.

Programs

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

Extensions

More terms from Rob Speer (rob(AT)twcny.rr.com) and Loren Merritt, Aug 14 2000
Further terms from Larry Reeves (larryr(AT)acm.org), May 09 2001