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.

A363968 Least number of 1's needed to represent n using only additions +, subtractions -, multiplications *, divisions /, concatenations # and parentheses ().

This page as a plain text file.
%I A363968 #41 Aug 30 2023 15:20:41
%S A363968 2,1,2,3,4,5,5,6,5,4,3,2,3,4,5,6,6,7,6,5,4,3,4,5,5,6,6,7,7,6,5,4,5,5,
%T A363968 6,7,6,6,7,7,6,5,5,6,6,7,7,8,7,8,7,6,7,7,7,6,6,7,8,8,7,6,6,6,7,8,7,8,
%U A363968 8,8,8,7,8,8,8,9,9,8,8,8,7,6,7,8,7,8,8,8,7,7,6,5,6,7,8,9,8,8,7,6,5
%N A363968 Least number of 1's needed to represent n using only additions +, subtractions -, multiplications *, divisions /, concatenations # and parentheses ().
%C A363968 Fractions are not allowed as intermediate results.
%C A363968 The unique difference with A362471 is that concatenation is here allowed; in fact, in A362471, concatenation is only allowed for getting repunits as 111 = 1#1#1 but not for getting other integers.
%C A363968 Also, for example, the concatenation of 5 and -3 is not possible, so it should not be interpreted as 5-3 = 2.
%C A363968 The first differences with A362471 in the data appear at n = 16, 19, 20, 21, 29, ... see Example section.
%H A363968 Michael S. Branicky, <a href="/A363968/b363968.txt">Table of n, a(n) for n = 0..10000</a>.
%H A363968 <a href="/index/Com#complexity">Index to sequences related to the complexity of n</a>.
%F A363968 |a(n+1) - a(n)| <= 1; improved by _Pontus von Brömssen_, Jun 30 2023
%F A363968 a(n) <= A362471(n).
%F A363968 a(n) <= Sum_{k=1..m} a(dk), where d1d2..dm are the decimal digits of n. - _Michael S. Branicky_, Jun 30 2023
%e A363968 For n = 16, 16 = 1 # ((1+1)*(1+1+1)), so a(16) = 6 while A362471(16) = 7.
%e A363968 For n = 19, 19 = 1 # (11-1-1), so a(19) = 5 while A362471(19) = 6.
%e A363968 For n = 20, 20 = (1+1) # (1-1), so a(20) = 4 while A362471(20) = 5.
%e A363968 For n = 31, 31 = (1+1+1) # (1), so a(31) = 4 while A362471(31) = 7.
%e A363968 For n = 43, 43 = (1+1)*((1+1) # (1)) + 1, so a(43) = 6 while A362471(43) = 7.
%Y A363968 Cf. A002275, A005245, A091333, A133344, A362471, A362626.
%K A363968 nonn,base
%O A363968 0,1
%A A363968 _Bernard Schott_, Jun 30 2023
%E A363968 a(72) and beyond from _Michael S. Branicky_, Jun 30 2023