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.

A360269 Least sum of 2's and 3's required to build n using +, * and parentheses.

This page as a plain text file.
%I A360269 #20 Feb 23 2023 13:21:35
%S A360269 2,3,4,5,5,7,6,6,7,8,7,10,9,8,8,10,8,11,9,10,10,12,9,10,11,9,11,11,10,
%T A360269 13,10,11,12,12,10,14,12,13,11,15,12,14,12,11,14,13,11,14,12,13,13,15,
%U A360269 11,13,13,14,13,16,12,16,14,13,12,15,13,15,14,15,14
%N A360269 Least sum of 2's and 3's required to build n using +, * and parentheses.
%H A360269 Andrew Howroyd, <a href="/A360269/b360269.txt">Table of n, a(n) for n = 2..10000</a>
%H A360269 <a href="/index/Com#complexity">Index to sequences related to the complexity of n</a>
%e A360269 a(7) = 7 because 7 built by the rules is 2*2+3 or 2+2+3, and in both cases the sum is 7 and there is no other combination with a lesser sum.
%e A360269 a(17) = 10 because 17 = (2+3)*3+2, with 10 being the minimal sum.
%e A360269 a(22) = 10 because 22 = 2*(3*3+2) and these 2's and 3's add up to 10, which is the least possible sum.
%e A360269 a(44) = 12 because 44 = 2*2*(3*3+2), with the least possible sum being 12.
%o A360269 (PARI) seq(n)=my(a=vector(n)); for(n=1, #a, my(m=if(n==2||n==3, n, oo)); for(k=2, n-2, m=min(m, a[k]+a[n-k])); fordiv(n, d, if(d>1&&d<n, m=min(m, a[d]+a[n/d]))); a[n]=m); a[2..n] \\ _Andrew Howroyd_, Jan 31 2023
%Y A360269 Cf. A000040, A025280.
%K A360269 nonn
%O A360269 2,1
%A A360269 _Tamas Sandor Nagy_, Jan 31 2023
%E A360269 Terms a(46) and beyond from _Andrew Howroyd_, Feb 01 2023