A097642 Numbers k such that k = (d_1! + d_2! + ... + d_k!) - (d_1 + d_2 + ... + d_k) where d_1 d_2 ... d_k is the decimal expansion of k.
3, 115, 6576, 80855
Offset: 1
Examples
80855 is in the sequence because 80855 = (8! + 0! + 8! + 5! + 5!) - (8 + 0 + 8 + 5 + 5).
Crossrefs
Cf. A097643.
Programs
-
Mathematica
okQ[n_]:=Module[{idn=IntegerDigits[n]},n==Total[idn!]-Total[idn]]; Select[Range[81000],okQ] (* Harvey P. Dale, Aug 26 2011 *)