login
A171828
Nonnegative integers that can be made by using five fives (5 5's) and the four basic operators {+, -, *, /}.
13
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 35, 40, 45, 49, 50, 51, 55, 60, 70, 75, 80, 95, 100, 105, 115, 120, 124, 125, 126, 130, 135, 145, 150, 155, 175, 200, 225, 245, 250, 255, 275, 300, 375, 500, 600, 620, 630, 650, 750, 1250, 3125
OFFSET
1,3
COMMENTS
Every integer can be made if other operators are allowed (i.e., 13 = (5!+5+5)/(5+5)). The sequence is finite: a(68) = 5*5*5*5*5 = 3125 is the last term.
EXAMPLE
Example: a(14) = 14 = (5+5+5)-(5/5).
PROG
(PARI) A171828(n=5, 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]]))))); select(t->t>=0 && type(t)=="t_INT", S[n])} \\ A171828() yields this sequence, use optional arg to compute variants. - M. F. Hasler, Nov 24 2018
KEYWORD
nonn,fini,full
AUTHOR
Sergio Pimentel, Dec 19 2009
STATUS
approved