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.

A364528 Number of 1's required to build -n using +, -, *, and parentheses.

Original entry on oeis.org

3, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 12, 12, 12, 12, 12, 13, 13, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 14, 13, 14, 13, 13
Offset: 1

Views

Author

Pontus von Brömssen, Jul 27 2023

Keywords

Comments

Unary minus is not allowed, otherwise we would have a(n) = A091333(n).

Examples

			a(5) = 6 because -5 = 1 - (1+1) * (1+1+1).
a(10) = 8 because -10 = 2 * (-5) = (1+1) * (1 - (1+1) * (1+1+1)).
		

Crossrefs

Cf. A091333.

Formula

A091333(n) <= a(n) <= 1 + A091333(n+1) <= 2 + A091333(n). Equality holds in the first inequality for n = 11, 17, 22, 23, 26, 29, ... .