A241404 Sum of n and the sum of the factorials of its digits.
2, 4, 9, 28, 125, 726, 5047, 40328, 362889, 12, 13, 15, 20, 39, 136, 737, 5058, 40339, 362900, 23, 24, 26, 31, 50, 147, 748, 5069, 40350, 362911, 37, 38, 40, 45, 64, 161, 762, 5083, 40364, 362925, 65, 66, 68, 73, 92, 189, 790, 5111, 40392, 362953, 171, 172, 174
Offset: 1
Examples
a(8) = 40328 because we have 8 + 8! = 40328.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[n_]:= n + Plus@@Factorial/@IntegerDigits[n]; Table[f[n], {n, 50}]
-
PARI
a(n) = my(d = digits(n)); n + sum(i=1, #d, d[i]!); \\ Michel Marcus, Apr 21 2014
Formula
a(n) = n + A061602(n). - Michel Marcus, Apr 21 2014