A066146 Primes associated with A066042.
2, 37, 2, 2, 571, 47, 3, 3, 103, 61, 113, 97, 797, 41893, 499, 109, 701, 997, 1231, 47, 1801, 557, 1129, 7481, 15731, 32579, 491, 257, 23, 24551, 8753, 110339, 3119, 10133, 46811, 4799, 5233, 215389, 1049, 1063039, 64327, 349, 2477, 69827, 317, 107377
Offset: 1
Examples
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]
Links
- Harry J. Smith, Table of n, a(n) for n = 1..54
Crossrefs
Cf. A066042.
Programs
-
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 *)
-
PARI
{ for(k=0, 10^7, my(d=digits(k), q=vecsum(d)*vecprod(d)); if (q != 0 && k%q==0 && isprime(k/q), print1(k/q, ", "))) } \\ Harry J. Smith, Feb 02 2010
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
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
Comments