|
|
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.
|
|
9
|
|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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, (\\))
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|