OFFSET
1,3
COMMENTS
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.
LINKS
Wikipedia, Four Fours
EXAMPLE
Example: a(11) = 12 since 12 = (4 - 4/4) * 4.
PROG
(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
CROSSREFS
KEYWORD
nonn,fini,full
AUTHOR
Sergio Pimentel, Dec 19 2009
STATUS
approved