OFFSET
1,2
COMMENTS
As 9 does not occur in d! for all d in {0..9}, all self-factorials cannot contain 9 as a digit, cf. A007095. - Reinhard Zumkeller, Sep 26 2014
LINKS
D. Applegate and R. Zumkeller, Table of n, a(n) for n = 1..10000 (first 300 terms from David Applegate)
EXAMPLE
24 is a self-factorial number because we can see both 2! = 2 and 4! = 24 in the decimal expansion 24.
MAPLE
isA134948 := proc(n) local nbase10, dgs, d, dfac ; nbase10 := convert(n, base, 10) ; dgs := convert(nbase10, set) ; for d in dgs do dfac := convert(d!, base, 10) ; if verify(dfac, nbase10, 'sublist') = false then RETURN(false) ; fi ; od: RETURN(true) ; end: for n from 1 to 10000 do if isA134948(n) then printf("%d ", n) ; fi ; od: # R. J. Mathar, Feb 05 2008
PROG
For C++ program see the Applegate link in A135463.
(Haskell)
import Data.List (nub, sort, isInfixOf)
a134948 n = a134948_list !! (n-1)
a134948_list = filter h [0..] where
h x = all (`isInfixOf` xs)
(map (fss !!) $ map (read . return) $ sort $ nub xs)
where xs = show x
fss = map show $ take 10 a000142_list
-- Reinhard Zumkeller, Sep 26 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alexander R. Povolotsky, Feb 02 2008
EXTENSIONS
a(1) - a(18) computed by N. J. A. Sloane, Feb 02 2008
a(19) onwards from David Applegate, Feb 09 2008
More terms from R. J. Mathar, Feb 05 2008
STATUS
approved