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.

A171829 Nonnegative integers that can be made by using six sixes (6 6's) and the four basic operators {+, -, *, /}.

This page as a plain text file.
%I A171829 #38 Oct 12 2024 02:00:37
%S A171829 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,27,
%T A171829 28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,54,60,
%U A171829 65,66,67,69,70,71,72,73,74,75,77,78,79,84,90,96,102,107
%N A171829 Nonnegative integers that can be made by using six sixes (6 6's) and the four basic operators {+, -, *, /}.
%C A171829 More integers can be made if other operators are allowed (i.e., 22 = 6!/(6*6)+(6+6)/6). The sequence is finite: a(198) = 6*6*6*6*6*6 = 46656 is the last term.
%C A171829 See A258068 ff. for the integers that can be generated with the four basic operators and 7 7's, 8 8's, 9 9's, etc...
%H A171829 Alois P. Heinz, <a href="/A171829/b171829.txt">Table of n, a(n) for n = 1..198</a>
%H A171829 Wikipedia, <a href="http://en.wikipedia.org/wiki/Four_fours">Four Fours</a>
%e A171829 49 is in the sequence: 49 = (6 + 6/6) * (6 + 6/6).
%p A171829 f:= proc(n) f(n):= `if`(n=1, {6}, {seq(seq(seq([x+y, x-y, x*y,
%p A171829       `if`(y=0, [][], x/y)][], y=f(n-j)), x=f(j)), j=1..n-1)})
%p A171829     end:
%p A171829 sort([select(z->z>=0 and is(z, integer), f(6))[]])[];
%p A171829 #  _Alois P. Heinz_, Aug 04 2013
%t A171829 f[1] = {6}; f[n_] := f[n] = Union @ Flatten @ Table[Table[Table[{x+y, x-y, x*y, If[y == 0, Null, x/y]}, {y, f[n-j]}], {x, f[j]}], {j, 1, n-1}];
%t A171829 Sort[Select[f[6], # >= 0 && IntegerQ[#]&]] (* _Jean-François Alcover_, Jun 01 2018, after _Alois P. Heinz_ *)
%o A171829 (PARI) A171829(n=6, S=Vec([[n]],n))={for(n=2, n, S[n]=Set(concat(vector(n\2, k, concat([concat([[T+U, T-U, U-T, if(U, T/U), if(T, U/T), T*U] | T <- S[k]]) | U <- S[n-k]]))))); select(t-> t>=0 && denominator(t)==1,S[n])} \\ A171829() yields this sequence. Optional args allow to compute variants. - _M. F. Hasler_, Nov 24 2018
%Y A171829 Cf. A171826, A171827, A171828, A258068, A258069, A258070, A258071.
%Y A171829 Cf. A182002, A258097.
%K A171829 nonn,fini,full
%O A171829 1,3
%A A171829 _Sergio Pimentel_, Dec 19 2009
%E A171829 Corrected and edited by _Alois P. Heinz_, Aug 03 2013