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.

Showing 1-10 of 10 results.

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

Original entry on oeis.org

0, 2, 13, 31, 45, 200, 854, 3358, 4698, 29324, 55295, 263489, 567993, 2328803
Offset: 0

Views

Author

Martin Y. Champel, Jan 30 2015

Keywords

Comments

a(n) > 10^7 for n >= 14. - Bert Dobbelaere, Oct 29 2018

Examples

			a(0) = 0 since 0! equals 1, which does not contain any '2'.
For n = 1, a(1) = 2 as 2! = 2 contains '2'.
For n = 2, a(2) = 13 as 13! = 6227020800 contains '22' and 13 is the smallest integer for which the condition is met.
		

Crossrefs

Programs

  • Mathematica
    A254447[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 2], m++]; m,
        t = Table[2, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254447[n], {n, 0, 13}](* Robert Price, Mar 20 2019 *)

Extensions

a(11), a(12) from Jon E. Schoenfield, Feb 22 2015, Feb 27 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(13) from Bert Dobbelaere, Oct 29 2018

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

Original entry on oeis.org

0, 8, 24, 25, 134, 407, 151, 2936, 8040, 26808, 49668, 115189, 429335, 1365981, 3507499
Offset: 0

Views

Author

Martin Y. Champel, Jan 30 2015

Keywords

Examples

			a(1) = 8 since 8! = 40320, which contains '3' and 8 is the smallest integer for which the condition is met.
a(2) = 24 since 24! = 620448401733239439360000 contains '33'.
		

Crossrefs

Programs

  • Mathematica
    A254448[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 3], m++]; m,
        t = Table[3, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254448[n], {n, 0, 14}] (* Robert Price, Mar 20 2019 *)

Extensions

a(11), a(12) from Jon E. Schoenfield, Feb 20 2015, Feb 24 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(13) from Lars Blomberg, Mar 19 2015
a(14) from Bert Dobbelaere, Oct 29 2018

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

Original entry on oeis.org

0, 4, 21, 63, 117, 375, 1325, 1253, 5741, 30455, 83393, 68094, 565882, 2666148, 1514639
Offset: 0

Views

Author

Martin Y. Champel, Jan 30 2015

Keywords

Comments

a(6) and a(7) are anagrams.

Examples

			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'.
		

Crossrefs

Programs

  • 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 *)
  • 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

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

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

Original entry on oeis.org

0, 12, 11, 36, 99, 207, 629, 3982, 13216, 24090, 65698, 131076, 176801, 2074822, 5203944, 3716991
Offset: 0

Views

Author

Martin Y. Champel, Feb 06 2015

Keywords

Examples

			a(1) = 12 since 12! = 479001600 contains '9' and 12 is the smallest integer for which the condition is met,
a(2) = 11 since 11! = 39916800 contains '99' and 11 is the smallest integer for which the condition is met.
		

Crossrefs

Programs

  • Mathematica
    A254717[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 9], m++]; m,
        t = Table[9, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254717[n], {n, 0, 7}] (* Robert Price, Mar 21 2019 *)
  • 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++))
    for(n=1,6,print1(a(n),", ")) \\ Derek Orr, Feb 06 2015

Extensions

a(12) from Jon E. Schoenfield, Feb 21 2015
a(13)-a(15) from Bert Dobbelaere, Oct 29 2018

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

Original entry on oeis.org

0, 7, 17, 70, 111, 258, 689, 454, 7133, 15977, 82869, 111044, 536687, 384769, 2750561, 7063105
Offset: 0

Views

Author

Martin Y. Champel, Jan 31 2015

Keywords

Comments

a(14) > 1500000. - Jon E. Schoenfield, Mar 31 2015

Examples

			a(1) = 7 as 7! equals 5040, which contains '5' and 5 is the smallest integer for which the condition is met.
		

Crossrefs

Programs

  • Mathematica
    A254450[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 5], m++]; m,
        t = Table[5, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254450[n], {n, 0, 13}] (* Robert Price, Mar 21 2019 *)

Extensions

a(12)-a(13) from Jon E. Schoenfield, Feb 27 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(14)-a(15) from Bert Dobbelaere, Oct 29 2018

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

Original entry on oeis.org

0, 3, 20, 38, 35, 213, 1122, 3415, 10214, 32430, 145197, 351679, 666779, 813843, 3765934
Offset: 0

Views

Author

Martin Y. Champel, Jan 31 2015

Keywords

Examples

			a(1) = 3 since 3! equals 6 and contains '6'.
a(2) = 20 since 20! contains '66' and 20 is the smallest integer for which the condition is met.
		

Crossrefs

Programs

  • Mathematica
    A254451[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 6], m++]; m,
        t = Table[6, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254451[n], {n, 0, 7}] (* Robert Price, Mar 21 2019 *)

Extensions

a(10), a(11) from Jon E. Schoenfield, Feb 21 2015, Feb 23 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(12), a(13) from Jon E. Schoenfield, Mar 07 2015, Mar 10 2015
a(14) from Bert Dobbelaere, Oct 29 2018

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

Original entry on oeis.org

0, 6, 31, 48, 22, 599, 1102, 5280, 4667, 1753, 48861, 150336, 223254, 644487, 7016773, 9588848
Offset: 0

Views

Author

Martin Y. Champel, Jan 31 2015

Keywords

Examples

			a(1) = 6 since 6! equals 720, which contains '7'.
		

Crossrefs

Programs

  • Mathematica
    A254452[n_] := Module[{m = 0},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 7], m++]; m,
        t = Table[7, n];
        While[! MemberQ[Split[IntegerDigits[m!]], t], m++]; m]];
    Table[A254452[n], {n, 0, 14}] (* Robert Price, Mar 21 2019 *)

Extensions

a(11), a(12) from Jon E. Schoenfield, Feb 21 2015
a(0) prepended by Jon E. Schoenfield, Mar 01 2015
a(13) from Jon E. Schoenfield, Mar 06 2015
a(14)-a(15) from Bert Dobbelaere, Oct 29 2018

A254716 a(n) is the smallest nonnegative integer m such that m! contains a string of exactly n consecutive 8's, or -1 if no such m exists.

Original entry on oeis.org

0, 11, 9, 16, 27, 482, 532, 4731, 2061, 22402, 50381, 187611, 757618, 591042, 5157267, 9003765
Offset: 0

Views

Author

Martin Y. Champel, Feb 06 2015

Keywords

Examples

			a(1) = 11 since 11! = 39916800 contains '8' and 11 is the smallest integer for which the condition is met. (In 9! the '8's occur in a substring of length 2.)
a(2) = 9 since 9! = 362880 contains '88' and 9 is the smallest integer for which this condition is met.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 0, str = ToString[ 8(10^n - 1)/9]}, While[ Length@ StringPosition[ ToString[ k!], str] != 1, k++]; k]; f[0] = 0; Array[f, 14, 0] (* Robert G. Wilson v, Mar 10 2015 *)
  • 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]==8, c++); if(d[i]!=8, c=0; break)); if(c==n&&d[j+n]!=8&&d[j-1]!=8, return(k))); if(c==n, return(k)); if(c!=n, k++))
    for(n=1,6,print1(a(n),", ")) \\ Derek Orr, Feb 06 2015

Extensions

a(0)=0 added by M. F. Hasler, Feb 10 2015
a(11) from Jon E. Schoenfield, Feb 21 2015
a(13) from Jon E. Schoenfield, Feb 28 2015
a(12) from Jon E. Schoenfield, Mar 09 2015
a(14)-a(15) from Bert Dobbelaere, Oct 29 2018

A252652 a(n) is the smallest nonnegative integer such that a(n)! contains a string of exactly n consecutive 0's, not including trailing 0's.

Original entry on oeis.org

0, 7, 12, 22, 107, 264, 812, 4919, 12154, 24612, 75705, 101805, 236441, 1946174
Offset: 0

Views

Author

Jon E. Schoenfield, Mar 22 2015, at the suggestion of Martin Y. Champel

Keywords

Examples

			a(0) = 0 since 0! = 1, which does not contain a 0.
a(1) = 7 since 7! = 5040, which contains a 0 other than the trailing 0, and no integer smaller than 7 satisfies this requirement. (a(1) is not 5; 5! = 120, which has no 0 digits other than the trailing 0.)
a(2) = 12 since 12! = 479001600; discarding the trailing 0's leaves 4790016, which contains a string of exactly two consecutive 0's, and no integer smaller than 12 satisfies this requirement.
		

Crossrefs

Programs

  • Mathematica
    A252652[n_] := Module[{m = 0, s, t},
       If[n == 0, While[MemberQ[IntegerDigits[m!], 0], m++]; m,
        t = Table[0, n];
        While[s = Split[IntegerDigits[m!]];
         If[MemberQ[Last[s], 0], s = Delete[s, -1]]; ! MemberQ[s, t],
         m++]; m]];
    Table[A252652[n], {n, 0, 13}] (* Robert Price, Mar 21 2019 *)
  • PARI
    f(k, sz, sz1) = my(f=k!, s=Str(f/10^valuation(f, 10))); #strsplit(s, sz) - #strsplit(s, sz1);
    a(n) = if (n==0, return(0)); my(sz=concat(vector(n, k, "0")), sz1=concat(sz, "0"), k=1); while (f(k, sz, sz1) != 1, k++); k; \\ Michel Marcus, Oct 25 2023
  • Python
    import re
    def A252652(n):
        if n == 0:
            return 0
        f, i, s = 1, 0, re.compile('[0-9]*[1-9]0{'+str(n)+'}[1-9][0-9]*')
        while s.match(str(f)) == None:
            i += 1
            f *= i
        return i # Chai Wah Wu, Dec 29 2015
    

Extensions

a(13) from Lars Blomberg, Apr 05 2015

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

Original entry on oeis.org

0, 5, 10, 15, 20, 264, 25, 30, 35, 40, 45, 101805, 50, 55, 60, 65, 70
Offset: 0

Views

Author

Martin Y. Champel, Feb 22 2015

Keywords

Comments

Most multiples of 5 belong to the sequence (if not all).
All terms whose indices are included in A000966 are far bigger than their neighboring terms whose indices are multiples of 5.
a(11) is a multiple of 5, we can verify a(11) = a(25448).

Examples

			a(0) = 0 as 0! = 1 does not contain '0'.
a(1) = 5 as 5! = 120 contains '0'.
a(2) = 10 as 10! = 3628800 contains '00' and 10 is the smallest integer for which the condition is met.
		

Crossrefs

Programs

  • PARI
    \\ uses is() from A000966
    f(k, special, sz, sz1) = my(f=k!); if (special, s=Str(f/10^valuation(f, 10)), s=Str(k!)); #strsplit(s, sz) - #strsplit(s, sz1);
    a(n) = if (n==0, return(0)); my(sz= concat(vector(n, k, "0")), sz1=concat(sz, "0"), k=1,special=is(n)); while (f(k, special, sz, sz1) != 1, k++); k; \\ Michel Marcus, Oct 25 2023
  • Python
    # Python version 2.7
    from math import factorial as fct
    def trailing_zero(n):
        k=0
        while n!=0:
            n/=5
            k+=n
        return k
    def A255400():
        index = 1
        f = 1
        while True:
            if trailing_zero(f) == index:
                print("A255400("+str(index)+") = " +str(f))
                index += 1
            elif trailing_zero(f) > index:
                while True:
                    clnzer = str(fct(f))[:-trailing_zero(f)]
                    if index*'0' in clnzer and (index+1)*'0' not in clnzer:
                        print("A255400("+str(index)+") = " +str(f))
                        index += 1
                        f = 0
                        break
                    f +=1
            f +=1
        return
    
  • Python
    import re
    def A255400(n):
        f, i, s = 1, 0, re.compile('[0-9]*[1-9]0{'+str(n)+'}[1-9][0-9]*')
        while s.match(str(f)+'1') is None:
            i += 1
            f *= i
        return i # Chai Wah Wu, Apr 02 2015
    
Showing 1-10 of 10 results.