%I #25 Dec 06 2024 11:23:21
%S 1,2,3,4,5,5,6,5,5,6,7,7,8,8,7,6,7,7,8,8,9,9,9,8,7,7,6,7,8,9,8,7,8,9,
%T 8,7,8,9,10,10,11,11,12,11,10,11,10,9,8,9,10,9,9,8,9,9,10,10,11,11,10,
%U 9,8,7,8,9,10,11,11,10,10,9,10,10,10,11,11,10,9,8,7,8,9,10,11,12,11,12,12
%N Number of 1's required to build n using +, -, *, ^, and parentheses.
%C One strategy for computing integer complexities like a(n) is to proceed in rounds, successively determining all n for which a(n) = 2, 3, 4, 5, and so on. In each round one takes all operations of pairs of numbers whose already known lesser complexities sum to the current value. The difficulty with this particular a(n) is that exponentiation quickly produces very large values, which conceivably could be near each other and yield a value of a(n) for small n by taking their difference in a later round. However, one can safely compute small values up to 19 by ignoring intermediate results larger than 2^65: this doesn't ignore anything except 2^81, 2^256, and 2^512 in the ninth round, and those values will not become involved in differences that could affect arguments n less than 2^65 until at least round 19, so all small values up to 19 produced in this way will be correct. Doing so gives values for all n from a(1)=1 up to a(3305)=19. It is possible based on the above that a(3306) might be 19, if some large result from round 10 differs from one of the three ignored values in round 9 by exactly 3306. That just about surely doesn't happen, but more careful reasoning would be needed to prove the correct value a(3306) = 20. - _Glen Whitney_, Sep 22 2021
%H Glen Whitney, <a href="/A091334/b091334.txt">Table of n, a(n) for n = 1..3305</a>
%H J. Iraids, K. Balodis, J. Cernenoks, M. Opmanis, R. Opmanis and K. Podnieks, <a href="http://arxiv.org/abs/1203.6462">Integer Complexity: Experimental and Analytical Results</a>. arXiv preprint arXiv:1203.6462, 2012. - From _N. J. A. Sloane_, Sep 22 2012
%H <a href="/index/Com#complexity">Index to sequences related to the complexity of n</a>
%H Glen Whitney, <a href="/A091334/a091334.txt">Python3.8 program computing up to a(3305)</a>
%e A091334(15) = 7 because 15 = (1+1+1+1)^(1+1) - 1. (Note that 15 is also the smallest index at which A091334 differs from A025280.)
%Y Cf. A005245 (variant using + and *), A025280 (using +, *, and ^), A091333 (using +, -, and *), A348089 (using +, -, *, /, and ^), A348262 (using + and ^).
%K nonn
%O 1,2
%A _Jens Voß_, Dec 30 2003