login
A254449
a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 4's.
11
0, 4, 21, 63, 117, 375, 1325, 1253, 5741, 30455, 83393, 68094, 565882, 2666148, 1514639
OFFSET
0,2
COMMENTS
a(6) and a(7) are anagrams.
EXAMPLE
a(1) = 4 since 4! = 24 contains '4', and 4 is the smallest integer for which this condition is met.
a(2) = 21 since 21! = 51090942171709440000 contains '44'.
MATHEMATICA
A254449[n_] := Module[{m = 0},
t = Table[4, n];
While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m];
Join[{0}, Table[A254449[n], {n, 1, 14}]] (* Robert Price, Mar 20 2019 *)
PROG
(Python)
def A254449(n):
if n == 0:
return 0
i, m, s = 1, 1, '4'*n
s2 = s+'4'
while True:
m *= i
sn = str(m)
if s in sn and s2 not in sn:
return i
i += 1 # Chai Wah Wu, Dec 29 2015
KEYWORD
nonn,more,base
AUTHOR
Martin Y. Champel, Jan 30 2015
EXTENSIONS
a(12) from Jon E. Schoenfield, Feb 27 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(14) by Lars Blomberg, Mar 19 2015
a(13) by Bert Dobbelaere, Oct 29 2018
STATUS
approved