OFFSET
1,1
COMMENTS
Primes p such that no number is p times its digit sum.
These may be called the non-Moran primes because no index k exists in A001101 to represent them as A001101(k)/digitsum[A001101(k)]. - R. J. Mathar, Aug 10 2007
LINKS
David A. Corneth, Table of n, a(n) for n = 1..18497
FORMULA
EXAMPLE
p=5743 is not in the sequence because it can be represented as p=40201/7 (x=40201) or as p=80402/14 (x=80402).
p=7 is not in the sequence because it can be represented as p=21/3 (x=21) or p=42/6 (x=42) or p=63/9 (x=63) or p=84/12 (x=84). In all cases, the denominators are the digit sums of the numerators.
MAPLE
A007953 := proc(n) option remember ; add(j, j=convert(n, base, 10)) ; end: A001101 := proc(p) option remember : local k, digs ; digs := 1; if not isprime(p) then RETURN(-1) ; else while 10^(digs-1)/(9*digs) <= p do for k from max(p, 10^(digs-1)) to 10^digs do if k = p*A007953(k) then RETURN(k) ; fi ; od ; digs := digs+1 ; od: RETURN(-1) ; fi ; end: for n from 1 to 500 do if A001101(ithprime(n)) = -1 then printf("%d, ", ithprime(n)) ; fi : od: # R. J. Mathar, Aug 10 2007
PROG
(Python)
from itertools import count, islice, combinations_with_replacement
from sympy import nextprime
def A130338_gen(startvalue=1): # generator of terms >= startvalue
n = nextprime(max(startvalue, 1)-1)
while True:
for l in count(1):
if 9*l*n < 10**(l-1):
yield n
break
for d in combinations_with_replacement(range(10), l):
if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
break
else:
continue
break
n = nextprime(n)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Aug 07 2007
EXTENSIONS
More terms from R. J. Mathar, Aug 10 2007
STATUS
approved