OFFSET
1,3
COMMENTS
An addition triangle has any finite sequence of positive numbers as base; other rows are formed by adding pairs of adjacent numbers.
If the bottom row is strongly increasing, then every row is strongly increasing.
8
3<5
1<2<3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..500
EXAMPLE
For n = 5:
5 5
1,4 2,3 5
For n = 6:
6 6
1,5 2,4 6
For n = 7:
7 7 7
1,6 2,5 3,4 7
For n = 8:
8
3,5 8 8 8
1,2,3 1,7 2,6 3,5 8
For n = 9:
9
3,6 9 9 9 9
1,2,4 1,8 2,7 3,6 4,5 9
PROG
(Ruby)
def A(n)
f_ary = [[n]]
cnt = 1
while f_ary.size > 0
b_ary = []
f_ary.each{|i|
s = i.size
(1..i[0] - 1).each{|j|
a = [j]
(0..s - 1).each{|k|
num = i[k] - a[k]
if num > 0
a << num
else
break
end
}
b_ary << a if a.size == s + 1 && a == a.uniq.sort
}
}
f_ary = b_ary
cnt += f_ary.size
end
cnt
end
def A337766(n)
(1..n).map{|i| A(i)}
end
p A337766(50)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 19 2020
STATUS
approved