A115644 Brilliant numbers (A078972) that are sums of distinct factorials.
6, 9, 25, 121, 841, 871, 5041, 5767, 363721, 368761, 409111, 3633841, 3992431, 3992551, 4032121, 4037791, 39962281, 39962311, 39963031, 40279711, 40279801, 43585921, 43591687, 43909207, 479047801, 479365321, 479370271, 482631271
Offset: 1
Keywords
Examples
39962281 = 11! + 8! + 7! + 5!+ 1! = 4861*8221.
Programs
-
Mathematica
brillQ[n_] := Block[{d = FactorInteger[n]}, Plus@@Last/@d==2 && (Last/@d=={2} || Length@IntegerDigits@((First/@d)[[1]])==Length@IntegerDigits@((First/@d)[[2]]))]; fac=Range[20]!;lst={}; Do[ n = Plus@@(fac*IntegerDigits[k, 2, 20]); If[brillQ[n], AppendTo[lst, n]], {k, 2^20-1}]; lst