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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 43, 46, 48, 52, 57, 60, 63, 69, 75, 78, 82, 88, 94, 99, 104, 111, 119, 124, 129, 137, 147, 153, 160, 169, 179, 187, 194, 204, 216, 224, 233, 246, 259, 267, 277, 292, 308, 318, 329, 343, 361
Offset: 1

Views

Author

Seiichi Manyama, Sep 19 2020

Keywords

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

Examples

			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
		

Crossrefs

Equivalent sequences with different restrictions on rows: A062684 (none, except terms are positive), A062896 (not a reversal of a counted row), A337765 (weakly increasing).
Cf. A346523.

Programs

  • 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)

A348850 a(n) is the number of labeled rooted unordered binary trees T where the nodes are labeled with distinct positive integers, the root has label n, each parent label equals the sum of its children labels, and T cannot be extended.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 5, 9, 10, 14, 22, 33, 57, 66, 94, 132, 188, 317, 454, 576, 806, 1083, 1535, 2342, 3215, 5231, 5656, 8545, 10804, 15226, 21153, 30342, 44536, 63165, 73877, 107241, 133994, 178497, 247564, 331695, 472331
Offset: 1

Views

Author

Rémy Sigrist, Nov 01 2021

Keywords

Comments

For any n > 0:
- we can imagine a variant of Grundy's game where we start with n at root position,
- and each move consists in adding to a leaf, say w, two children, u and v such that 0 < u < v and u+v = w and u and v do not already appear in the tree,
- a(n) gives the number of final positions (where no move is possible).

Examples

			For n = 1, 2, 3, 4: a(n) = 1:
          |         |         |         |
          1         2         3         4
                             / \       / \
                            1   2     1   3
For n = 5, 6: a(n) = 2:
          |         |         |         |
          5         5         6         6
         / \       / \       / \       / \
        1   4     2   3     1   5     2   4
                               / \       / \
                              2   3     1   3
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-2 of 2 results.