cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337766 Number of addition triangles with apex n where all rows are strongly increasing.

This page as a plain text file.
%I A337766 #23 Nov 21 2021 08:13:57
%S A337766 1,1,2,2,3,3,4,5,6,6,8,9,10,11,13,14,16,17,19,22,24,25,28,31,33,35,39,
%T A337766 43,46,48,52,57,60,63,69,75,78,82,88,94,99,104,111,119,124,129,137,
%U A337766 147,153,160,169,179,187,194,204,216,224,233,246,259,267,277,292,308,318,329,343,361
%N A337766 Number of addition triangles with apex n where all rows are strongly increasing.
%C A337766 An addition triangle has any finite sequence of positive numbers as base; other rows are formed by adding pairs of adjacent numbers.
%C A337766 If the bottom row is strongly increasing, then every row is strongly increasing.
%C A337766     8
%C A337766    3<5
%C A337766   1<2<3
%H A337766 Seiichi Manyama, <a href="/A337766/b337766.txt">Table of n, a(n) for n = 1..500</a>
%e A337766 For n = 5:
%e A337766    5     5
%e A337766   1,4   2,3   5
%e A337766 For n = 6:
%e A337766    6     6
%e A337766   1,5   2,4   6
%e A337766 For n = 7:
%e A337766    7     7     7
%e A337766   1,6   2,5   3,4   7
%e A337766 For n = 8:
%e A337766     8
%e A337766    3,5     8     8     8
%e A337766   1,2,3   1,7   2,6   3,5   8
%e A337766 For n = 9:
%e A337766     9
%e A337766    3,6     9     9     9     9
%e A337766   1,2,4   1,8   2,7   3,6   4,5   9
%o A337766 (Ruby)
%o A337766 def A(n)
%o A337766   f_ary = [[n]]
%o A337766   cnt = 1
%o A337766   while f_ary.size > 0
%o A337766     b_ary = []
%o A337766     f_ary.each{|i|
%o A337766       s = i.size
%o A337766       (1..i[0] - 1).each{|j|
%o A337766         a = [j]
%o A337766         (0..s - 1).each{|k|
%o A337766           num = i[k] - a[k]
%o A337766           if num > 0
%o A337766             a << num
%o A337766           else
%o A337766             break
%o A337766           end
%o A337766         }
%o A337766         b_ary << a if a.size == s + 1 && a == a.uniq.sort
%o A337766       }
%o A337766     }
%o A337766     f_ary = b_ary
%o A337766     cnt += f_ary.size
%o A337766   end
%o A337766   cnt
%o A337766 end
%o A337766 def A337766(n)
%o A337766   (1..n).map{|i| A(i)}
%o A337766 end
%o A337766 p A337766(50)
%Y A337766 Equivalent sequences with different restrictions on rows: A062684 (none, except terms are positive), A062896 (not a reversal of a counted row), A337765 (weakly increasing).
%Y A337766 Cf. A346523.
%K A337766 nonn
%O A337766 1,3
%A A337766 _Seiichi Manyama_, Sep 19 2020