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-6 of 6 results.

A384383 Number of polynomials with a shortest addition-multiplication-composition chain of length n, starting with 1 and x.

Original entry on oeis.org

2, 4, 14, 73, 586, 7250
Offset: 0

Views

Author

Pontus von Brömssen, Jun 01 2025

Keywords

Comments

An addition-multiplication-composition chain for the polynomial p(x) is a finite sequence of polynomials, starting with 1, x and ending with p(x), in which each element except 1 and x equals q(x)+r(x), q(x)*r(x), or q(r(x)) for two preceding, not necessarily distinct, elements q(x) and r(x) in the chain. The length of the chain is the number of elements in the chain, excluding 1 and x.

Examples

			An example of a polynomial for which composition is necessary to obtain the shortest chain is 9*x, with the chain (1, x,) 2*x, 3*x, 9*x. (9*x is the composition of 3*x with itself.) So 9*x is one of the 11 polynomials counted by a(3) but not by A384382(3).
		

Crossrefs

Cf. A382928, A383331 (addition only), A384382 (addition and multiplication), A384386, A384482 (addition and composition).

A384482 Number of functions f(x) = b*x+c with nonnegative integer coefficients and a shortest addition-composition chain of length n, starting with 1 and x.

Original entry on oeis.org

2, 3, 7, 20, 75, 412, 3200, 34167, 507344
Offset: 0

Views

Author

Pontus von Brömssen, Jun 02 2025

Keywords

Comments

See A384480 for details.

Crossrefs

Cf. A383331 (addition only), A384382 (addition and multiplication), A384383 (addition, multiplication, and composition), A384480, A384481, A384485.

A383332 Smallest positive weight of a pair of nonnegative integers with a shortest vectorial addition chain of length n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 20, 29, 44, 70, 104
Offset: 0

Views

Author

Pontus von Brömssen, Apr 26 2025

Keywords

Comments

See A383330 for details.
The weight of a pair is the sum of its elements.

Examples

			   n | a(n) | pairs (x,y) with x <= y, x+y = a(n), and shortest chain length n
  ---+------+-----------------------------------------------------------------
   0 |   1  | (0,1)
   1 |   2  | (0,2), (1,1)
   2 |   3  | (0,3), (1,2)
   3 |   4  | (1,3)
   4 |   6  | (1,5)
   5 |   8  | (1,7)
   6 |  12  | (1,11)
   7 |  20  | (1,19), (3,17)
   8 |  29  | (6,23)
   9 |  44  | (7,37)
  10 |  70  | (11,59)
  11 | 104  | (15,89)
		

Crossrefs

Row 2 of A383334.

A383330 Triangle read by rows: T(n,k) is the length of a shortest vectorial addition chain for (n,k), 0 <= k <= n.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 2, 3, 3, 4, 3, 3, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 3, 4, 4, 5, 4, 5, 5, 6, 4, 4, 5, 5, 5, 5, 5, 5, 6, 5, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 5, 5, 5, 6, 5, 6, 5, 6, 6, 7, 5
Offset: 0

Views

Author

Pontus von Brömssen, Apr 26 2025

Keywords

Comments

Starting with (1,0) and (0,1), each pair of the chain must be equal to the sum of two preceding pairs. The length of the chain is defined to be the number of pairs in the chain, excluding (1,0) and (0,1).
Also, T(n,k) is the least number of multiplications needed to obtain x^n*y^k, starting with x and y.
T(0,0) = 0 by convention.

Examples

			Triangle begins:
  n\k| 0  1  2  3  4  5  6  7  8  9 10
  ---+--------------------------------
   0 | 0
   1 | 0  1
   2 | 1  2  2
   3 | 2  3  3  3
   4 | 2  3  3  4  3
   5 | 3  4  4  4  4  4
   6 | 3  4  4  4  4  5  4
   7 | 4  5  5  5  5  5  5  5
   8 | 3  4  4  5  4  5  5  6  4
   9 | 4  5  5  5  5  5  5  6  5  5
  10 | 4  5  5  5  5  5  5  6  5  6  5
A shortest addition chain for (11,7) is [(1,0), (0,1),] (1,1), (2,1), (4,2), (5,3), (10,6), (11,7) of length T(11,7) = 6.
		

Crossrefs

Cf. A003313 (column k=0, excluding T(0,0)), A265690 (column k=1 and main diagonal; apparently also column k=2), A383331, A383332.

A383333 Square array read by antidiagonals: T(n,k) is the number of n-tuples of nonnegative integers, not all equal to 0, with a shortest vectorial addition chain of length k; n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 7, 6, 4, 5, 16, 16, 10, 5, 9, 37, 46, 30, 15, 6, 15, 91, 134, 101, 50, 21, 7, 26, 229, 411, 349, 190, 77, 28, 8, 44, 585, 1319, 1264, 751, 323, 112, 36, 9, 78, 1528, 4368, 4817, 3106, 1426, 511, 156, 45, 10, 136, 4034, 14925, 19131, 13532, 6586, 2478, 766, 210, 55, 11
Offset: 1

Views

Author

Pontus von Brömssen, Apr 26 2025

Keywords

Comments

The n unit tuples (1, 0, ..., 0), ... (0, ..., 0, 1) are given for free, so T(n,0) = n.
Starting with the n unit tuples, each tuple of a chain must be equal to the sum of two preceding tuples. The length of the chain is defined to be the number of tuples in the chain, excluding the unit tuples.
Also, T(n,k) is the number of non-constant monomials x_1^e_1*...*x_n^e_n that requires k multiplications, given x_1, ..., x_n.

Examples

			Array begins:
  n\k| 0  1  2   3    4    5     6      7
  ---+-----------------------------------
  1  | 1  1  2   3    5    9    15     26
  2  | 2  3  7  16   37   91   229    585
  3  | 3  6 16  46  134  411  1319   4368
  4  | 4 10 30 101  349 1264  4817  19131
  5  | 5 15 50 190  751 3106 13532  61748
  6  | 6 21 77 323 1426 6586 32035 163594
There are 12 triples of nondecreasing nonnegative integers with a shortest addition chain of length 3. Counting also the permutations of these, we get T(3,3) = 46:
  (0, 0, 5):  3
  (0, 0, 6):  3
  (0, 0, 8):  3
  (0, 1, 3):  6
  (0, 1, 4):  6
  (0, 2, 3):  6
  (0, 2, 4):  6
  (0, 3, 3):  3
  (0, 4, 4):  3
  (1, 1, 2):  3
  (1, 2, 2):  3
  (2, 2, 2):  1
      Total: 46
		

Crossrefs

Cf. A383334.
Rows: A003065 (n=1), A383331 (n=2).
Columns: A000027 (k=0), A000217 (k=1), A005581 (k=2).

A384382 Number of polynomials with a shortest addition-multiplication chain of length n, starting with 1 and x.

Original entry on oeis.org

2, 4, 14, 62, 350, 2517, 22918, 259325
Offset: 0

Views

Author

Pontus von Brömssen, Jun 01 2025

Keywords

Comments

An addition-multiplication chain for the polynomial p(x) is a finite sequence of polynomials, starting with 1, x and ending with p(x), in which each element except 1 and x equals q(x)+r(x) or q(x)*r(x) for two preceding, not necessarily distinct, elements q(x) and r(x) in the chain. The length of the chain is the number of elements in the chain, excluding 1 and x.

Examples

			a(0) = 2 because 1 and x are considered to have chains of length 0.
a(1) = 4 because the 4 polynomials 2, x+1, 2*x, and x^2 have chains of length 1.
a(2) = 14 because the 14 polynomials 3, 4, x+2, 2*x+1, 2*x+2, 3*x, 4*x, x^2+1, x^2+x, x^2+2*x+1, 2*x^2, 4*x^2, x^3, and x^4 have chains of length 2.
		

Crossrefs

Cf. A382928, A383002, A383331 (addition only), A384383 (addition, multiplication, and composition), A384482 (addition and composition).
Showing 1-6 of 6 results.