OFFSET
1,1
COMMENTS
No further terms found to 10^8.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..54
FORMULA
Sum digits of n; find product of digits of n; multiply sum by product; divide this product into n; if result is prime add to sequence
EXAMPLE
a(5)=571 because 4+1+1+1+2=9 and 4*2=8; 8*9=72; 41112/72 = 571 and 571 is prime. [corrected by Harry J. Smith, Feb 02 2010]
MATHEMATICA
rp[n_]:=Module[{idn=IntegerDigits[n], p}, If[MemberQ[idn, 0], p=1, p=n/ (Total[ idn] Times@@idn)]; If[PrimeQ[p], p, 0]]; DeleteCases[ rp/@ Range[ 10^8], 0] (* Harvey P. Dale, Jan 03 2015 *)
PROG
(PARI) ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) } { n=0; for (m=1, 10^12, p=ProdD(m); if (p == 0, next); f=m/(SumD(m)*p); if (frac(f)==0 && isprime(f), write("b066146.txt", n++, " ", f); if (n==54, return)) ) } \\ Harry J. Smith, Feb 02 2010
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, Dec 13 2001
EXTENSIONS
Offset changed from 2 to 1 by Harry J. Smith, Feb 02 2010
a(32)-a(46) from Harry J. Smith, Feb 02 2010
STATUS
approved