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.
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
Examples
Array begins 1 3 9 26 73 194 ... .2 6 17 47 121 ... . 4 11 30 74 ... .. 7 19 44 ... ... 12 25 ... .... 13 ...
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..514
Crossrefs
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