OFFSET
1,2
COMMENTS
Factorials 0! and 1! are not considered distinct.
a(27) > 10^18, if it exists. - Amiram Eldar, Feb 24 2024
EXAMPLE
6230694987 = 13!+10!+8!+7!+4!+2!+1! = 3^3*11^2*1381^2.
MATHEMATICA
pwfQ[n_] := n==1 || Min[Last /@ FactorInteger@n] > 1; fac=Range[20]!; lst={}; Do[ n = Plus@@(fac*IntegerDigits[k, 2, 20]); If[pwfQ[n], AppendTo[lst, n]], {k, 2^20-1}]; lst
q[n_] := Module[{k = n, m = 2, r, ans = True}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[r > 1, ans = False; Break[]]; m++]; ans]; With[{max = 2^20-1}, Select[Union[Flatten[Table[i^2*j^3, {j, 1, max^(1/3)}, {i, 1, Sqrt[max/j^3]}]]], q]] (* Amiram Eldar, Feb 24 2024 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Giovanni Resta, Jan 27 2006
STATUS
approved