|
|
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.
|
|
8
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
Array begins
1 3 9 26 73 194 ...
.2 6 17 47 121 ...
. 4 11 30 74 ...
.. 7 19 44 ...
... 12 25 ...
.... 13 ...
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn,easy
|
|
AUTHOR
|
|
|
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
|
|
STATUS
|
approved
|
|
|
|