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

%I #14 May 09 2023 20:49:23

%S 173,383,431,443,461,491,521,563,761,821,827,839,941,971,983,1049,

%T 1481,1487,1493,1499,1553,1571,1601,1811,1871,1931,2153,2207,2477,

%U 2591,2609,2753,3037,3041,3083,3137,3221,3251,3257,3307,3329,3371

%N Primes p with no solution x to x=p*digitsum(x).

%C Primes p such that no number is p times its digit sum.

%C 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

%H David A. Corneth, <a href="/A130338/b130338.txt">Table of n, a(n) for n = 1..18497</a>

%F A000040 MINUS {A001101(k)/A007953(A001101(k)): k=1,2,3,4,..}. A003635 INTERSECT A000040. - _R. J. Mathar_, Aug 10 2007

%e 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).

%e 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.

%p 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

%o (Python)

%o from itertools import count, islice, combinations_with_replacement

%o from sympy import nextprime

%o def A130338_gen(startvalue=1): # generator of terms >= startvalue

%o n = nextprime(max(startvalue,1)-1)

%o while True:

%o for l in count(1):

%o if 9*l*n < 10**(l-1):

%o yield n

%o break

%o for d in combinations_with_replacement(range(10),l):

%o if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:

%o break

%o else:

%o continue

%o break

%o n = nextprime(n)

%o A130338_list = list(islice(A130338_gen(),20)) # _Chai Wah Wu_, May 09 2023

%Y Cf. A003635.

%Y Cf. A000040, A001101, A007953, A003635, A066007.

%K nonn,base

%O 1,1

%A _Lekraj Beedassy_, Aug 07 2007

%E More terms from _R. J. Mathar_, Aug 10 2007

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 April 27 09:23 EDT 2024. Contains 372017 sequences. (Running on oeis4.)