%I #44 Mar 21 2019 02:40:11
%S 0,4,21,63,117,375,1325,1253,5741,30455,83393,68094,565882,2666148,
%T 1514639
%N a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 4's.
%C a(6) and a(7) are anagrams.
%e a(1) = 4 since 4! = 24 contains '4', and 4 is the smallest integer for which this condition is met.
%e a(2) = 21 since 21! = 51090942171709440000 contains '44'.
%t A254449[n_] := Module[{m = 0},
%t t = Table[4, n];
%t While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m];
%t Join[{0}, Table[A254449[n], {n, 1, 14}]] (* _Robert Price_, Mar 20 2019 *)
%o (Python)
%o def A254449(n):
%o if n == 0:
%o return 0
%o i, m, s = 1, 1, '4'*n
%o s2 = s+'4'
%o while True:
%o m *= i
%o sn = str(m)
%o if s in sn and s2 not in sn:
%o return i
%o i += 1 # _Chai Wah Wu_, Dec 29 2015
%Y Cf. A254042, A254447, A254448, A254500, A254501, A254502, A254716, A254717, A252652.
%K nonn,more,base
%O 0,2
%A _Martin Y. Champel_, Jan 30 2015
%E a(12) from _Jon E. Schoenfield_, Feb 27 2015
%E a(0) prepended by _Jon E. Schoenfield_, Mar 01 2015
%E a(14) by _Lars Blomberg_, Mar 19 2015
%E a(13) by _Bert Dobbelaere_, Oct 29 2018
|