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.

A383002 Number of integers with a shortest addition-multiplication chain of length n.

Original entry on oeis.org

1, 1, 2, 5, 16, 63, 331, 2239, 19909, 225615, 3167570
Offset: 0

Views

Author

Pontus von Brömssen, Apr 12 2025

Keywords

Comments

a(n) is the number of occurrences of n in A230697.

Crossrefs

A383001 Smallest number with shortest addition-multiplication chain of length n.

Original entry on oeis.org

1, 2, 3, 5, 7, 13, 23, 59, 211, 619, 4282, 25819
Offset: 0

Views

Author

Pontus von Brömssen, Apr 12 2025

Keywords

Comments

Indices of records in A230697.

Crossrefs

Formula

A230697(a(n)) = n.

A384483 Length of shortest addition-composition chain for n, starting with 1 and x.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Jun 02 2025

Keywords

Comments

See A384480 for the definition of addition-composition chains. The number n is identified with the constant function f(x) = n.

Examples

			The smallest n for which a(n) < A003313(n) is n = 21. The length of a shortest addition chain for 21 is A003313(21) = 6, but there are addition-composition chains of length 5, for example (1, x,) x+1, 2*x+2, 3*x+3, 6, 21. 6 and 21 are the compositions of 3*x+3 with 1 and 6, respectively.
		

Crossrefs

Row 0 of A384480 for columns k >= 1.
Cf. A003313 (addition only), A230697 (addition and multiplication), A384384 (addition, multiplication, and composition), A384484, A384485.

Formula

a(n) <= A003313(n).
a(n) <= a(n-1) + 1.

A354914 The least cost to reach n using additions and multiplications, where multiplication is free.

Original entry on oeis.org

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

Views

Author

Stan Wagon, Jun 11 2022

Keywords

Comments

Start with 1. Apply multiplication or addition to any values (not necessarily distinct) already attained to get a finite sequence of integers ending in n. The cost of addition is one unit, but multiplication is free. Then a(n) is the cost of the least expensive path to n.
The problem is folklore. It is not hard to prove that the cost function is unbounded. The values given were produced by Joseph DeVincentis, Stan Wagon, and Al Zimmermann.

Examples

			For n = 23, the least cost a(23) is 4, via the sequence 1, 2, 3, 4, 8, 16, 19, 23.
		

Crossrefs

A383335 Length of shortest addition-multiplication-exponentiation chain for n.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Apr 27 2025

Keywords

Comments

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

Examples

			a(248) = 5 because the shortest addition-multiplication-exponentiation chain for 248 has length 5: (1, 2, 3, 5, 243, 248).
		

Crossrefs

A384384 Length of shortest addition-multiplication-composition chain for n, starting with 1 and x.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Jun 01 2025

Keywords

Comments

See A384383 for the definition of addition-multiplication-composition chains. The number n is identified with the constant polynomial p(x) = n.

Examples

			The smallest n for which a(n) < A230697(n) is n = 31. The length of a shortest addition-multiplication chain for 31 is A230697(31) = 6, but there are addition-multiplication-composition chains of length 5, for example (1, x,) 2*x, 2*x+1, 4*x+3, 7, 31. (4*x+3 is the composition of 2*x+1 with itself; 7 and 31 are the compositions of 4*x+3 with 1 and 7, respectively.)
		

Crossrefs

Cf. A230697 (addition and multiplication), A384383, A384385, A384386, A384483 (addition and composition).

Formula

a(n) <= A230697(n).
a(n) <= a(n-1) + 1.
Showing 1-6 of 6 results.