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.

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