login
Sum of n and the sum of the factorials of its digits.
1

%I #11 Apr 25 2014 16:48:05

%S 2,4,9,28,125,726,5047,40328,362889,12,13,15,20,39,136,737,5058,40339,

%T 362900,23,24,26,31,50,147,748,5069,40350,362911,37,38,40,45,64,161,

%U 762,5083,40364,362925,65,66,68,73,92,189,790,5111,40392,362953,171,172,174

%N Sum of n and the sum of the factorials of its digits.

%H Vincenzo Librandi, <a href="/A241404/b241404.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = n + A061602(n). - _Michel Marcus_, Apr 21 2014

%e a(8) = 40328 because we have 8 + 8! = 40328.

%t f[n_]:= n + Plus@@Factorial/@IntegerDigits[n]; Table[f[n], {n, 50}]

%o (PARI) a(n) = my(d = digits(n)); n + sum(i=1, #d, d[i]!); \\ _Michel Marcus_, Apr 21 2014

%Y Cf. A061602, A108911.

%K nonn,base,easy

%O 1,1

%A _Vincenzo Librandi_, Apr 21 2014