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.

A171827 Nonnegative integers that can be made by using exactly four fours (4 4's) and the four basic operators {+, -, *, /}.

This page as a plain text file.
%I A171827 #18 Nov 26 2018 14:34:47
%S A171827 0,1,2,3,4,5,6,7,8,9,12,15,16,17,20,24,28,32,36,48,60,64,68,80,128,256
%N A171827 Nonnegative integers that can be made by using exactly four fours (4 4's) and the four basic operators {+, -, *, /}.
%C A171827 Every integer can be made if other operators are allowed (e.g., 14 = 4!/4 + 4 + 4). The sequence is finite: a(26) = 4*4*4*4=256 is the last term.
%H A171827 Wikipedia, <a href="http://en.wikipedia.org/wiki/Four_fours">Four Fours</a>
%e A171827 Example: a(11) = 12 since 12 = (4 - 4/4) * 4.
%o A171827 (PARI) A171827(n=4, 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[n-k]]) | U <- S[k]]))))); [t|t <- S[n], t>=0 && type(t)=="t_INT"]} \\ A171827() yields this sequence, use optional arg to compute variants. - _M. F. Hasler_, Nov 24 2018
%Y A171827 Cf. A171826, A171828, A171829, A258068, A258069, A258070, A258071.
%Y A171827 Cf. A182002, A258097.
%K A171827 nonn,fini,full
%O A171827 1,3
%A A171827 _Sergio Pimentel_, Dec 19 2009