login
Numbers not achievable by the rules of 'Countdown' and 1,2,3,4,5,50.
1

%I #37 Jan 03 2016 10:43:48

%S 766,838,842,857,858,859,861,1073,1087,1091,1093,1094,1106,1107,1108,

%T 1109,1112,1114,1117,1118,1123,1132,1138,1142,1154,1157,1163,1174,

%U 1178,1223,1226,1258,1262,1268,1273,1276,1277,1278,1281,1282,1283,1286,1289,1291

%N Numbers not achievable by the rules of 'Countdown' and 1,2,3,4,5,50.

%C The rules allow one to use +, -, *, /, the given numbers and parentheses. Not all numbers need to be used. A number can be used only once. Fractions are not allowed as intermediate results.

%C 9000 = (1 + 2)*3*4*5*50 is the largest term missing. - _Charles R Greathouse IV_, Sep 19 2014

%H Alois P. Heinz, <a href="/A247486/b247486.txt">Table of n, a(n) for n = 1..10000</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Countdown_%28game_show%29#Numbers_round">Countdown rules for numbers round</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F a(n) = n + 2359 for n >= 6642. - _Alois P. Heinz_, Sep 22 2014

%e The examples show some achievable numbers. They are not listed by a:

%e 5 * (3 + 1) - 4 = 5 * 3 + 1 = 16.

%e (50 - (1 + 2) * 3) * (4 + 5) = 41 * 9 = 369.

%e (2 * 4) * (50 - 3 - 1) + 5 = 373.

%e ((50 - 2) * 4 + 1) * 3 - 5 = 574.

%e (1 + 3 * 4) * (50 + 2) - 5 = 671.

%p with(combinat):

%p l:= permute([1, 2, 3, 4, 5, 50]):

%p b:= proc(i, j, p) option remember; global l; `if`(i=j, l[p][j],

%p select(x->x<>0 and is(x, integer), {seq(seq(seq([f+g, f-g,

%p f*g, f/g][], g=b(k+1, j, p)), f=b(i, k, p)), k=i..j-1)}))

%p end:

%p l:= sort([({$1..9000} minus {seq({seq(select(x->x>0,

%p b(1, t, p))[], t=2..6)}[], p=1..6!)})[]]):

%p a:= n-> `if`(n<=6641, l[n], n+2359):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 22 2014

%K nonn,easy

%O 1,1

%A _Jon Perry_, Sep 18 2014

%E More terms from _Alois P. Heinz_, Sep 22 2014