login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071314 a(n) is the smallest number that cannot be obtained from the numbers {2^0,2^1,...,2^n} using each number at most once and the operators +, -, *, /. Parentheses are allowed, intermediate fractions are not allowed. 1

%I #37 Jul 15 2022 13:48:20

%S 2,4,11,27,77,595,2471,9643,51787

%N a(n) is the smallest number that cannot be obtained from the numbers {2^0,2^1,...,2^n} using each number at most once and the operators +, -, *, /. Parentheses are allowed, intermediate fractions are not allowed.

%C The A309886 is a similar sequence, except: there we allow intermediate fractions, and we require all numbers to be used when building an expression. - _Matej Veselovac_, Aug 28 2019

%C For n>=2, the largest number that can be obtained in this manner is given by the following formula: (2^1 + 2^0)*(Product_{k=2..n} 2^k). This product notation is equivalent to the expression: (3/2)*2^(n*(n+1)/2). Thus, for n>=2, this sequence has an upper bound: (3/2)*2^(n*(n+1)/2) + 1. - _Alejandro J. Becerra Jr._, Apr 22 2020

%H G. Bannay, <a href="https://web.archive.org/web/20061201125224/http://gilles.bannay.free.fr/jeux_us.html">Countdown Problem</a>

%H <a href="/index/Fo#4x4">Index entries for similar sequences</a>

%F a(n) <= A309886(n+1). - _Michael S. Branicky_, Jul 15 2022

%e a(2) = 11 because using {1,2,4} and the four operations we can obtain all the numbers up to 10, for example 10=(4+1)*2, but we cannot obtain 11 in the same way.

%e a(6) <= 595 since the only way to make 595 is: (1 + 16 + 4/8)*(2 + 32), which requires the use of an intermediate fraction 4/8 in the calculation process, which is not allowed. - _Matej Veselovac_, Aug 28 2019

%e a(8) != 19351 = 1+((2+256)*(((4+16)*(128-8))/32). - _Michael S. Branicky_, Jul 15 2022

%o (Python)

%o def a(n):

%o R = dict() # index of each reachable subset is [card(s)-1][s]

%o for i in range(n+1): R[i] = dict()

%o for i in range(n+1): R[0][(2**i,)] = {2**i}

%o reach = set(2**i for i in range(n+1))

%o for j in range(1, n+1):

%o for i in range((j+1)//2):

%o for s1 in R[i]:

%o for s2 in R[j-1-i]:

%o if set(s1) & set(s2) == set():

%o s12 = tuple(sorted(set(s1) | set(s2)))

%o if s12 not in R[len(s12)-1]:

%o R[len(s12)-1][s12] = set()

%o for a in R[i][s1]:

%o for b in R[j-1-i][s2]:

%o allowed = [a+b, a*b, a-b, b-a]

%o if a != 0 and b%a == 0: allowed.append(b//a)

%o if b != 0 and a%b == 0: allowed.append(a//b)

%o R[len(s12)-1][s12].update(allowed)

%o reach.update(allowed)

%o k = 1

%o while k in reach: k += 1

%o return k

%o print([a(n) for n in range(6)]) # _Michael S. Branicky_, Jul 15 2022

%Y Cf. A060315, A309886.

%K nonn,hard,more

%O 0,1

%A Koksal Karakus (karakusk(AT)hotmail.com), Jun 11 2002

%E a(8) corrected by _Michael S. Branicky_, Jul 15 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)