login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130338 Primes p with no solution x to x=p*digitsum(x). 3
173, 383, 431, 443, 461, 491, 521, 563, 761, 821, 827, 839, 941, 971, 983, 1049, 1481, 1487, 1493, 1499, 1553, 1571, 1601, 1811, 1871, 1931, 2153, 2207, 2477, 2591, 2609, 2753, 3037, 3041, 3083, 3137, 3221, 3251, 3257, 3307, 3329, 3371 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
A000040 MINUS {A001101(k)/A007953(A001101(k)): k=1,2,3,4,..}. A003635 INTERSECT A000040. - R. J. Mathar, Aug 10 2007
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)
A130338_list = list(islice(A130338_gen(), 20)) # Chai Wah Wu, May 09 2023
CROSSREFS
Cf. A003635.
Sequence in context: A096703 A060332 A142022 * A275968 A142782 A142250
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Aug 07 2007
EXTENSIONS
More terms from R. J. Mathar, Aug 10 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)