login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

The smallest composite number which divides the concatenation of its ascending ordered prime factors, with repetition, when written in base n.
10

%I #54 Jan 12 2025 14:56:53

%S 85329,4,224675,4,1140391,4,9,4,28749,4,841,4,9,4,239571,4,343,4,9,4,

%T 231,4,25,4,9,4,315,4,343,4,9,4,25,4,9761637601,4,9,4,4234329,4,715,4,

%U 9,4,609,4,49,4,9,4,195,4,25,4,9,4,1015,4,76729,4,9,4,25,4,14332171

%N The smallest composite number which divides the concatenation of its ascending ordered prime factors, with repetition, when written in base n.

%C The number 4 = 2*2 in any base b = 3 + 2*n, n >= 0, will always divide the concatenation of its prime divisors as 4 = "2"_b + "2"_b = "22"_b = 2*(3 + 2*n) + 2 = 8 + 4*n, which is divisible by 4.

%C The number 9 = 3*3 in any base b = 8 + 6*n, n >= 0, will always divide the concatenation of its prime divisors as 9 = "3"_b + "3"_b = "33"_b = 3*(8 + 6*n) + 3 = 27 + 18*n, which is divisible by 9.

%C Theorem: if p is prime, then a(p*(m+2)-1) <= p^2 for all m >= 0. Proof: If p is prime and base b = p*(m+2)-1 for some m >= 0, then b > p and p expressed in base b = "p"_b and thus "pp"_b = p*(b+1) = p^2*(m+2), i.e., divisible by p^2. - _Chai Wah Wu_, Apr 01 2024

%C a(36) <= 9761637601. a(40) = 4234329. By the theorem above if n+1 is composite, then a(n) <= p^2 where p = A020639(n+1) is the smallest prime factor of n+1. The first few terms where the inequality is strict are: a(406) = 105, a(766) = 105, a(988) = 195, a(1036) = 105, a(1072) = 231, ... - _Chai Wah Wu_, Apr 11 2024

%C From _Chai Wah Wu_, Apr 12 2024: (Start)

%C Theorem: If n is even, then a(n) >= 9 is odd.

%C Proof: This is true for n = 2. Let n > 2 be even. Let m be even.

%C If m=2^k for k>1, then 2 concatenated k times in base n is 2*(n^(k-1)+...+n+1) = 2*(n^k-1)/(n-1).

%C Since n^k-1 is odd, m does not divide 2*(n^k-1)/(n-1). If m has an odd prime divisor then concatenating the primes in base n will result in an odd number that is not divisible by m.

%C Finally, a(n) >= 9 since the first odd composite number is 9. (End)

%H Michael S. Branicky, <a href="/A371641/b371641.txt">Table of n, a(n) for n = 2..129</a>

%e a(2) = 85329 as 85329 = 3_10 * 3_10 * 19_10 * 499_10 = 11_2 * 11_2 * 10011_2 * 111110011_2 = "111110011111110011"_2 = 255987_10 which is divisible by 85329.

%e a(10) = 28749 as 28749 = 3_10 * 7_10 * 37_10 * 37_10 = "373737"_10 = 373737_10 which is divisible by 28749. See also A259047.

%o (Python)

%o from itertools import count

%o from sympy.ntheory import digits

%o from sympy import factorint, isprime

%o def fromdigits(d, b):

%o n = 0

%o for di in d: n *= b; n += di

%o return n

%o def a(n):

%o for k in count(4):

%o if isprime(k): continue

%o sf = []

%o for p, e in factorint(k).items():

%o sf.extend(e*digits(p, n)[1:])

%o if fromdigits(sf, n)%k == 0:

%o return k

%o print([a(n) for n in range(2, 6)]) # _Michael S. Branicky_, Apr 01 2024

%o (Python)

%o from itertools import count

%o from sympy import factorint, integer_log

%o def A371641(n):

%o for m in count(4):

%o f = factorint(m)

%o if sum(f.values()) > 1:

%o c = 0

%o for p in sorted(f):

%o a = pow(n,integer_log(p,n)[0]+1,m)

%o for _ in range(f[p]):

%o c = (c*a+p)%m

%o if not c:

%o return m # _Chai Wah Wu_, Apr 11 2024

%o (PARI) has(F,n)=my(f=F[2],t); for(i=1,#f~, my(p=f[i,1],d=#digits(p,n),D=n^d); for(j=1,f[i,2], t=D*t+p)); t%F[1]==0

%o a(k,lim=10^6,startAt=4)=forfactored(n=startAt,lim, if(vecsum(n[2][,2])>1 && has(n,k), return(n[1]))); a(k,2*lim,lim+1) \\ _Charles R Greathouse IV_, Apr 11 2024

%Y Cf. A020639, A027746, A259047, A322843, A248915.

%K nonn,base,changed

%O 2,1

%A _Scott R. Shannon_, Mar 30 2024

%E a(36) and beyond from _Michael S. Branicky_, Apr 27 2024