|
Search: id:A064155
|
|
|
| A064155 |
|
Let p=x1x2x3...xk be a prime in base 10 with k digits. The sequence give the primes p such that x1*x2*x3*...xk=k*(x1+x2+x3..+xk). |
|
+0 1
|
|
| 2, 3, 5, 7, 167, 523, 617, 761, 1427, 2417, 2741, 4127, 4217, 4271, 4721, 126241, 126421, 146221, 212461, 216421, 221461, 224611, 226141, 241261, 242161, 246121, 261241, 262411, 264211, 421621, 426211, 621241, 642121, 642211, 1111457
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
LINKS
|
Harry J. Smith, Table of n, a(n) for n=1,...,100
|
|
EXAMPLE
|
167 belongs to the sequence because 1*6*7=42 and 3*(1+6+7)=42
|
|
PROGRAM
|
(PARI) ProdD(x)= { local(p); p=1; while (x>9 && p>0, p*=(x-10*(x\10)); x\=10); return(p*x) } SumD(x)= { local(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } digitsIn(x)= { local(d); if (x==0, return(1)); d=1 + log(x)\log(10); if (10^d == x, d++, if (10^(d-1) > x, d--)); return(d) } { n=r=0; for (m=1, 10^9, r=nextprime(r+1); if ((p=ProdD(r)) && p == digitsIn(r)*SumD(r), write("b064155.txt", n++, " ", r); if (n==100, break)) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Sep 09 2009]
|
|
CROSSREFS
|
Sequence in context: A054218 A075048 A098463 this_sequence A069803 A083184 A046478
Adjacent sequences: A064152 A064153 A064154 this_sequence A064156 A064157 A064158
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
Felice Russo (felice.russo(AT)katamail.com), Sep 14 2001
|
|
|
Search completed in 0.002 seconds
|