|
|
A098797
|
|
Numbers k (with no zero digits) with property that k raised to the product of its digits plus the sum of its digits is prime.
|
|
0
|
|
|
1, 11, 17, 34, 187, 232, 1132, 3112, 3173, 6127, 11413, 12112, 12331, 13213, 14311, 14731, 22231, 23221, 41911, 43117, 51235, 112435, 122113, 131113, 131335, 138181, 142111, 165811, 192163, 211123, 213121, 214513, 225337, 243331, 313171, 321211, 371221, 435415
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(4)=34: 34^(3*4)+(3+4) = 2386420683693101063, which is prime.
|
|
MATHEMATICA
|
f[n_] := Block[{d = Sort[IntegerDigits[n]]}, d[[1]] != 0 && PrimeQ[n^(Times @@ d) + Plus @@ d]]; Do[ If[ f[n], Print[n]], {n, 36625}] (* Robert G. Wilson v, Oct 23 2004 *)
|
|
PROG
|
(Python)
from math import prod
from sympy import isprime
from itertools import count, islice, product
def agen(): # generator of terms
for d in count(1):
for t in product(range(1, 10), repeat=d):
k = sum(10**i*ti for i, ti in enumerate(t[::-1]))
if isprime(k**prod(t) + sum(t)): yield k
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|