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-5 of 5 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).

A384480 Square array read by antidiagonals: T(n,k) is the length of a shortest addition-composition chain for n*x+k, starting with 1 and x; n, k >= 0.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Jun 02 2025

Keywords

Comments

An addition-composition chain for the affine function f is a finite sequence of affine functions, starting with 1, x and ending with f, in which each element except 1 and x equals g(x)+h(x) or g(h(x)) for two preceding, not necessarily distinct, elements g(x) and h(x) in the chain. The length of the chain is the number of elements in the chain, excluding 1 and x. Such chains exist only for functions of the form f(x) = n*x+k, where n and k are nonnegative integers, not both 0.
T(0,0) = 0 by convention.
Equivalently, the chains can be defined on pairs (s,t) of nonnegative integers (corresponding to the function f(x) = s*x+t) with the operations (s,t)+(u,v) = (s+t,u+v) (addition) and (s,t)o(u,v) = (s*u,s*v+t) (composition).

Examples

			Array begins:
  n\k| 0  1  2  3  4  5  6  7  8  9 10 11 12
  ---+--------------------------------------
   0 | 0  0  1  2  2  3  3  4  3  4  4  5  4
   1 | 0  1  2  3  3  4  4  5  4  5  5  5  5
   2 | 1  2  2  3  3  4  4  4  4  5  5  5  5
   3 | 2  3  3  3  4  4  4  5  5  5  5  5  5
   4 | 2  3  3  3  3  4  3  4  4  4  4  5  4
   5 | 3  4  4  4  4  4  4  4  5  5  5  5  5
   6 | 3  4  4  4  4  4  4  5  4  4  5  5  5
   7 | 4  5  5  5  5  5  5  5  5  5  5  6  6
   8 | 3  4  4  4  4  4  4  4  4  5  4  5  4
   9 | 3  4  5  4  4  5  5  5  4  5  5  5  4
  10 | 4  5  5  5  5  5  5  5  5  5  5  6  5
  11 | 4  5  6  5  5  5  6  6  6  5  5  6  6
  12 | 4  5  5  5  5  5  5  5  5  5  5  5  5
For (n,k) = (4,6), the unique shortest chain for 4*x+6 is (1, x,) x+1, 2*x+2, 4*x+6 of length T(4,6) = 3. The last term of the chain is the composition of 2*x+2 with itself.
For (n,k) = (6,4), a shortest chain for 6*x+4 is (1, x,) x+1, 2*x+2, 3*x+2, 6*x+4 of length T(6,4) = 4. This chain uses only additions.
		

Crossrefs

Cf. A383330 (addition only), A384481, A384482, A384483 (row 0).

Formula

T(n,k) <= T(n,k-1) + 1.
T(n,k) <= T(n-1,k) + 1.

A384485 Number of integers with a shortest addition-composition chain of length n, starting with 1 and x, i.e., number of integers k with A384483(k) = n.

Original entry on oeis.org

1, 1, 2, 3, 5, 20, 104, 700, 6779, 95596
Offset: 0

Views

Author

Pontus von Brömssen, Jun 02 2025

Keywords

Comments

See A384480 and A384483 for details.

Crossrefs

Cf. A003065 (addition only), A383002 (addition and multiplication), A384386 (addition, multiplication, and composition), A384480, A384482, A384483, A384484.

A384481 Smallest value of f(1) for a function 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

1, 2, 3, 4, 6, 8, 13, 24, 46, 98
Offset: 0

Views

Author

Pontus von Brömssen, Jun 02 2025

Keywords

Comments

See A384480 for details.

Examples

			  n | functions b*x+c with b+c = a(n) and shortest chain of length n
  --+---------------------------------------------------------------
  0 | 1, x
  1 | 2, x+1, 2*x
  2 | 3, x+2, 2*x+1, 3*x
  3 | 3+x, x+3
  4 | 5+x, x+5
  5 | 7+x, x+7
  6 | 11*x+2
  7 | 23*x+1
  8 | 7*x+39, 43*x+3
  9 | 11*x+87
		

Crossrefs

Cf. A383332 (addition only), A384480, A384482, A384484.

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