OFFSET
1,1
COMMENTS
EXAMPLE
242 = 2*11^2 and 2+3+5+7+11 = 28 and 2!+4!+2! = 28.
MATHEMATICA
okQ[n_]:=Module[{ifn=Transpose[FactorInteger[n]][[1]]}, Total[Prime[ Range[ PrimePi[ Min[ifn]], PrimePi[Max[ifn]]]]]==Total[IntegerDigits[n]!]]; Select[Range[ 2, 3500000], okQ] (* Harvey P. Dale, Apr 21 2011 *)
PROG
(PARI) isok(n)={my(d=digits(n), s=sum(k=1, #d, d[k]!), f=factor(n)[, 1]); if(#f, forprime(p=f[1], f[#f], s-=p)); s==0} \\ Andrew Howroyd, Sep 18 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jason Earls, Sep 20 2002
EXTENSIONS
More terms from Michel ten Voorde, Jun 20 2003
More terms from Sam Alexander, Feb 28 2005
Offset changed by Andrew Howroyd, Sep 18 2024
STATUS
approved