A137580 Number of distinct digits in decimal representation of n!.
1, 1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 6, 6, 5, 6, 7, 5, 9, 8, 8, 9, 7, 7, 10, 9, 8, 9, 10, 8, 9, 9, 10, 9, 10, 10, 10, 10, 10, 9, 10, 10, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 0
Examples
n=12: 12! = 479001600 => a(12) = #{0,1,4,6,7,9} = 6.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Index entries for sequences related to factorial numbers.
Programs
-
Haskell
import Data.List (nub, sort) a137580 = length . nub . show . a000142 -- Reinhard Zumkeller, Apr 08 2012
-
Mathematica
Map[Length[Union[IntegerDigits[#]]] &, Table[n!, {n, 0, 79}]] (* Geoffrey Critzer, May 25 2013 *)
-
PARI
A137580(n)=#Set(digits(n!)) \\ M. F. Hasler, May 04 2015
Formula
a(n) < 10 iff A137579(n) = 0.
a(A182049(n)) < 10. - Reinhard Zumkeller, Apr 08 2012