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.
%I A370829 #26 Sep 20 2024 06:34:00 %S A370829 2,3,4,4,6,5,7,6,6,7,8,7,9,8,7,6,8,9,10,9,10,11,10,9,8,9,8,9,10,10,10, %T A370829 9,10,10,9,8,10,11,11,11,13,12,13,12,11,12,11,10,10,11,11,11,10,9,11, %U A370829 10,12,11,12,11,10,9,8,7,9,10,11,11,13,12,12,11,12,12,12,12,11,10,9,8,7 %N A370829 Minimum number of (-1)'s needed to write n, using +, *, ^ and parentheses, disallowing noninteger intermediate values. %C A370829 a(n) is bounded by a(n-1)-1 <= a(n) <= a(n-1)+2 since: %C A370829 An expression for n-1 can be increased to n by " + (-1)*(-1)" which is 2 more (-1)'s so that a(n) <= a(n-1)+2. %C A370829 An expression for n can be decreased to n-1 by "+ (-1)" which is 1 more (-1) so that a(n-1) <= a(n)+1. %H A370829 Edgar Deshayes, <a href="/A370829/a370829.java.txt">Java program</a> %e A370829 Let m = -1. Then, n = 1..9 can be expressed using a(n) m's as follows: %e A370829 a(1)=2: 1 = (-1)*(-1) = m*m. %e A370829 a(2)=3: 2 = (-2)*(-1) = (m+m)*m. %e A370829 a(3)=4: 3 = (-3)*(-1) = (m+m+m)*m. %e A370829 a(4)=4: 4 = (-2)*(-2) = (m+m)*(m+m). %e A370829 a(5)=6: 5 = (-5)*(-1) = (m+m+m+m+m)*m. %e A370829 a(6)=5: 6 = (-2)*(-3) = (m+m)*(m+m+m). %e A370829 a(7)=7: 7 = 8 +(-1) = (m+m+m+m)*(m+m)+m. %e A370829 a(8)=6: 8 = (-4)*(-2) = (m+m+m+m)*(m+m). %e A370829 a(9)=6: 9 = (-3)^ 2 = (m+m+m)^((m+m)*m). %o A370829 (Java) // see linked program %Y A370829 Cf. A025280 (same with +1). %K A370829 nonn %O A370829 1,1 %A A370829 _Edgar Deshayes_, Mar 02 2024