login
Brilliant numbers (A078972) that are sums of distinct factorials.
2

%I #2 Mar 30 2012 17:40:35

%S 6,9,25,121,841,871,5041,5767,363721,368761,409111,3633841,3992431,

%T 3992551,4032121,4037791,39962281,39962311,39963031,40279711,40279801,

%U 43585921,43591687,43909207,479047801,479365321,479370271,482631271

%N Brilliant numbers (A078972) that are sums of distinct factorials.

%e 39962281 = 11! + 8! + 7! + 5!+ 1! = 4861*8221.

%t 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

%Y Cf. A078972, A025494, A115645, A115646, A089359.

%K nonn

%O 1,1

%A _Giovanni Resta_, Jan 27 2006