Integer Complexity and Mixed Binary-Ternary Representation

Author Kazuyuki Amano

Thumbnail PDF


  • Filesize: 1.41 MB
  • 16 pages

Document Identifiers

Author Details

Kazuyuki Amano
  • Gunma University, Kiryu, Japan


The author would like to thank the anonymous reviewers of ISAAC '22 for their many helpful comments and suggestions.

Cite AsGet BibTex

Kazuyuki Amano. Integer Complexity and Mixed Binary-Ternary Representation. In 33rd International Symposium on Algorithms and Computation (ISAAC 2022). Leibniz International Proceedings in Informatics (LIPIcs), Volume 248, pp. 29:1-29:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2022)


The integer complexity of a natural number n, denoted by ‖n‖, is the smallest number of 1’s needed to express n using an arbitrary combination of addition and multiplication (and parentheses). For example, ‖6‖ = 5 since the expression 6 = (1+1)⋅ (1+1+1) contains five 1’s and there are no such expressions containing at most four 1’s. The investigation of this cute complexity measure was originated by Mahler and Popken in the 1950s. It is easy to see that ‖n‖/(log₃ n) ∈ [3, 3 log₂ 3] (∼ [3,4.755]) for every n, but the distribution of ‖n‖ is largely unknown. In this work, we focus on the restricted expressions obtained by applying Horner’s schema to a mixed binary-ternary representation of a given number in which we can arrange base-two and base-three digits in an arbitrary order. Let f(n) denote the minimum number of 1’s needed to express n in this way. Apparently, f(n) ≥ ‖n‖ for every n. We extensively investigate on f(n) via the combination of computer experiments and theoretical analysis and obtain the following set of results: (i) Computer experiments supporting the hypothesis that f(n)/log₃ n < 3.483 on average and f(n)/log₃ n < 4.212 for all n, (ii) For almost all natural numbers n, 3.120 < f(n)/log₃ n < 3.587, and (iii) There are infinitely many n’s such that f(n)/log₃ n > 3.934. Several new bounds on the original integer complexity are also presented in the paper.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Discrete mathematics
  • Integer complexity
  • Lower bounds
  • Upper bounds
  • Horner’s schema
  • Computer assisted proof


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Harry J. Altman. Integer complexity: Representing numbers of bounded defect. Theor. Comput. Sci., 652:64-85, 2016. URL:
  2. Harry J. Altman. Integer complexity: Algorithms and computational results. Integers, 18:A45, 2018. URL:
  3. Harry J. Altman and Joshua Zelinsky. Numbers with integer complexity close to the lower bound. Integers, 12A:A1, 2012. URL:
  4. Juris Cernenoks, Janis Iraids, Martins Opmanis, Rihards Opmanis, and Karlis Podnieks. Integer complexity: Experimental and analytical results II. In Jeffrey O. Shallit and Alexander Okhotin, editors, Descriptional Complexity of Formal Systems - 17th International Workshop, DCFS 2015, Waterloo, ON, Canada, June 25-27, 2015. Proceedings, volume 9118 of Lecture Notes in Computer Science, pages 58-69. Springer, 2015. URL:
  5. Katherine Cordwell, Alyssa Epstein, Anand Hemmandy, Steven J. Miller, Eyvindur A. Palsson, Aaditya Sharma, Stefan Steinerberger, and Yen Nhi Truong Vu. On algorithms to calculate integer complexity. Integers, 19:A12, 2019. URL:
  6. J. Arias de Reyna. Complexity of natural numbers, 2021. (translation of Complejidad de los números naturales, Gac. R. Soc. Mat. Esp. 3, 230-250, 2000). URL:
  7. J. Arias de Reyna and J. van de Lune. Algorithms for determining integer complexity, 2014. URL:
  8. Taylor Dupuy and David Weirich. Bits of 3ⁿ in binary, wieferich primes and a conjecture of Erdös. J. Number Theory, 158:268-280, 2016. URL:
  9. Ricard K. Guy. What is the least number of ones needed to represent n using only + and × (and parentheses)? Amer. Math. Monthly, 93:189-190, 1986. Google Scholar
  10. Ricard K. Guy. Unsolved Problems in Number Theory, Third Edition, Problem F26: Expressing numbers with just one. Springer-Verlag, New York, 2004. Google Scholar
  11. Jānis Iraids, Kaspars Balodis, Juris Čerņenoks, Mārtiņš Opmanis, Rihards Opmanis, and Kārlis Podnieks. Integer complexity: Experimental and analytical results. Scientific Papers University of Latvia, Computer Science and Information Technologies, 787:153-179, 2012. (also at arxiv:1203.6462). Google Scholar
  12. Jeffrey C. Lagarias. Ternary expansions of powers of 2. J. London Mathematical Society, 79(3):562-588, 2009. URL:
  13. K. Mahler and J. Popken. On a maximum problem in arithmetic (dutch). Nieuw Arch. Wiskunde, 3(1):1-15, 1953. Google Scholar
  14. Daniel A. Rawsthorne. How many 1’s are needed? Fib. Quart., 27:14-17, 1989. Google Scholar
  15. Christopher E. Shriver. An application of markov chain analysis to integer complexity, 2015. URL:
  16. Stefan Steinerberger. A short note on integer complexity. Contributions to Discrete Mathematics, 9:63-69, 2014. Google Scholar
  17. Cameron L. Stewart. On the representation of an integer in two different bases. Journal fur die reine und angewandte Mathematik, 319:63-72, 1980. Google Scholar
  18. Venecia Wang. A counterexample to the prime conjecture of expressing numbers using just ones. J. Number Theory, 133(2), 2013. URL:
  19. Emre Yolcu, Scott Aaronson, and Marijn J. H. Heule. An automated approach to the collatz conjecture. In André Platzer and Geoff Sutcliffe, editors, Automated Deduction - CADE 28 - 28th International Conference on Automated Deduction, Virtual Event, July 12-15, 2021, Proceedings, volume 12699 of Lecture Notes in Computer Science, pages 468-484. Springer, 2021. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail