cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A254717 #20 Mar 21 2019 13:32:11
%S A254717 0,12,11,36,99,207,629,3982,13216,24090,65698,131076,176801,2074822,
%T A254717 5203944,3716991
%N A254717 a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 9's.
%e A254717 a(1) = 12 since 12! = 479001600 contains '9' and 12 is the smallest integer for which the condition is met,
%e A254717 a(2) = 11 since 11! = 39916800 contains '99' and 11 is the smallest integer for which the condition is met.
%t A254717 A254717[n_] := Module[{m = 0},
%t A254717    If[n == 0, While[MemberQ[IntegerDigits[m!], 9], m++]; m,
%t A254717     t = Table[9, n];
%t A254717     While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
%t A254717 Table[A254717[n], {n, 0, 7}] (* _Robert Price_, Mar 21 2019 *)
%o A254717 (PARI) a(n)=k=0;while(k<10^4,d=digits(2*10^(#(digits(k!))+1)+10*k!);for(j=1,#d-n+1,c=0;for(i=j,j+n-1,if(d[i]==9,c++);if(d[i]!=9,c=0;break));if(c==n&&d[j+n]!=9&&d[j-1]!=9,return(k)));if(c==n,return(k));if(c!=n,k++))
%o A254717 for(n=1,6,print1(a(n),", ")) \\ _Derek Orr_, Feb 06 2015
%Y A254717 Cf. A254042, A254447, A254448, A254449, A254500, A254501, A254502, A254716.
%K A254717 nonn,more,base
%O A254717 0,2
%A A254717 _Martin Y. Champel_, Feb 06 2015
%E A254717 a(12) from _Jon E. Schoenfield_, Feb 21 2015
%E A254717 a(13)-a(15) from _Bert Dobbelaere_, Oct 29 2018