login
a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 2's.
11

%I #43 Mar 21 2019 02:39:57

%S 0,2,13,31,45,200,854,3358,4698,29324,55295,263489,567993,2328803

%N a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 2's.

%C a(n) > 10^7 for n >= 14. - _Bert Dobbelaere_, Oct 29 2018

%e a(0) = 0 since 0! equals 1, which does not contain any '2'.

%e For n = 1, a(1) = 2 as 2! = 2 contains '2'.

%e For n = 2, a(2) = 13 as 13! = 6227020800 contains '22' and 13 is the smallest integer for which the condition is met.

%t A254447[n_] := Module[{m = 0},

%t If[n == 0, While[MemberQ[IntegerDigits[m!], 2], m++]; m,

%t t = Table[2, n];

%t While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];

%t Table[A254447[n], {n, 0, 13}](* _Robert Price_, Mar 20 2019 *)

%Y Cf. A254042, A254448, A254449, A254500, A254501, A254502, A254716, A254717.

%K nonn,base,more

%O 0,2

%A _Martin Y. Champel_, Jan 30 2015

%E a(11), a(12) from _Jon E. Schoenfield_, Feb 22 2015, Feb 27 2015

%E a(0) prepended by _Jon E. Schoenfield_, Mar 01 2015

%E a(13) from _Bert Dobbelaere_, Oct 29 2018