OFFSET
1,1
COMMENTS
Row sums (the primes) are in A075345. In case there is more than one way to write the given prime, e.g., A075345(3) = 3+5+9 = 3+6+8, the lexicographically smallest is to be chosen, here (3,5,9) rather than (3,6,8). - M. F. Hasler, Sep 26 2015
LINKS
FORMULA
T(n,1)=A075346(n); T(n,n)=A075347(n); A075344(n) = Sum_{k=1..n} T(n,k). - Reinhard Zumkeller, Sep 26 2015
EXAMPLE
Triangle starts:
2;
1, 4;
3, 5, 9;
6, 7, 8, 10;
11, 12, 13, 14, 17;
15, 16, 18, 19, 20, 21;
...
PROG
(Haskell)
import Data.List ((\\))
a075348 n k = a075348_tabl !! (n-1) !! (k-1)
a075348_row n = a075348_tabl !! (n-1)
a075348_tabl = f 0 [1..] where
f x zs = (us ++ [y]) : f (x + 1) (zs \\ (y : us)) where
y = g vs
g (w:ws) = if a010051' (sum us + w) == 1 then w else g ws
(us, vs) = splitAt x zs
a075348_list = concat a075348_tabl
-- Reinhard Zumkeller, Sep 26 2015
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Sep 19 2002
EXTENSIONS
Extended by Ray Chandler, Apr 09 2014
Name changed by M. F. Hasler, Sep 26 2015
STATUS
approved