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-4 of 4 results.

A067109 Number of occurrences of the string n in n! (A000142).

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 2, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 0, 2, 1, 1, 0, 0, 2, 0, 0, 1, 0, 0, 2, 2, 4, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 2, 1, 2, 5, 0
Offset: 1

Views

Author

Amarnath Murthy, Jan 08 2002

Keywords

Comments

a(A033180(n)) > 0. - Reinhard Zumkeller, Aug 23 2008

Examples

			a(4) = 1 as 4! = 24 and 4 occurs once;
a(5) = 0 as 5! = 120 does not contain a 5;
a(20) = 1 as 20! = 2432902008176640000 and 20 occurs once.
		

Crossrefs

Programs

  • Haskell
    import Data.List (tails, isPrefixOf)
    a067109 n = sum $
       map (fromEnum . (show n `isPrefixOf`)) (tails $ show $ a000142 n)
    -- Reinhard Zumkeller, Aug 28 2014
  • Mathematica
    Table[ Length[ StringPosition[ ToString[n! ], ToString[n]]], {n, 1, 75} ]
    Table[SequenceCount[IntegerDigits[n!],IntegerDigits[n],Overlaps->True],{n,100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 01 2019 *)

Extensions

More terms from Robert G. Wilson v, Jan 09 2002

A383217 Lexicographically earliest strictly increasing sequence such that no term is a substring of the product of all previous terms.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 40, 41, 44, 45, 46, 48, 49, 53, 54, 55, 56, 57, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 76, 79, 80, 84, 85, 87, 90, 91, 97, 98
Offset: 1

Views

Author

Dominic McCarty, Apr 19 2025

Keywords

Examples

			The product of the first 6 terms is 720. "7" is a substring of "720", so a(7) cannot be 7. So, a(7) is the next available value, 8.
		

Crossrefs

Cf. A383218 (product of first n terms), A033180.

Programs

  • Python
    from itertools import count
    from math import prod
    a = [1]
    while len(a) < 40: a.append(next(k for k in count(a[-1]+1) if str(k) not in str(prod(a))))
    print(a)

A383218 The product of the first n terms of A383217.

Original entry on oeis.org

1, 2, 6, 24, 120, 720, 5760, 51840, 518400, 5702400, 68428800, 889574400, 12454041600, 186810624000, 2988969984000, 50812489728000, 914624815104000, 17377871486976000, 347557429739520000, 7298706024529920000, 160571532539658240000, 3693145248412139520000
Offset: 1

Views

Author

Dominic McCarty, Apr 19 2025

Keywords

Crossrefs

Programs

  • Python
    from itertools import count
    a, p = [1], 1
    for k in count(2):
        if str(k) not in str(p): p *= k; a.append(p)
        if len(a) >= 20: break
    print(a)

A113621 Numbers k such that the representation of k^2 is a substring of that of k!, in base 10.

Original entry on oeis.org

1, 20, 29, 170, 176, 241, 3136, 9800, 20309, 20486, 53663, 73793, 94836, 200000
Offset: 1

Views

Author

Giovanni Resta, Jan 26 2006

Keywords

Comments

Using one of the fast algorithms for computing the last nonzero digit of the factorial (A008904) it is easy to see that also 200000000 and 2*10^16 are terms.

Examples

			29^2 = 841 and 29! = 8(841)761993739701954543616000000.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[If[{}!= StringPosition[ToString[n! ], ToString[n^2]], AppendTo[lst, n]], {n, 10000}]; lst

Extensions

Extended by Giovanni Resta, Apr 04 2014
Showing 1-4 of 4 results.