OFFSET
1,2
COMMENTS
a(n) is the least positive integer k such that (k+n-1)!/(k-1)! does not contain the digit 2, or -1 if there is no such k.
a(32) = 13.
Conjecture: a(n) = -1 for n = 31 and all n >= 33.
EXAMPLE
a(4) = 3 because 3*4*5*6 = 360 does not contain the digit 2, while 1*2*3*4 = 24 and 2*3*4*5 = 120 do.
MAPLE
f:= proc(n) local k, t;
t:= n!;
for k from 1 to 100000 do
if not member(2, convert(t, base, 10)) then return k fi;
t:= t*(n+k)/k;
od:
-1
end proc:
map(f, [$1..32]);
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Feb 12 2023
STATUS
approved