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.

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