cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

85329, 4, 224675, 4, 1140391, 4, 9, 4, 28749, 4, 841, 4, 9, 4, 239571, 4, 343, 4, 9, 4, 231, 4, 25, 4, 9, 4, 315, 4, 343, 4, 9, 4, 25, 4, 9761637601, 4, 9, 4, 4234329, 4, 715, 4, 9, 4, 609, 4, 49, 4, 9, 4, 195, 4, 25, 4, 9, 4, 1015, 4, 76729, 4, 9, 4, 25, 4, 14332171
Offset: 2

Views

Author

Scott R. Shannon, Mar 30 2024

Keywords

Comments

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.
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.
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
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
From Chai Wah Wu, Apr 12 2024: (Start)
Theorem: If n is even, then a(n) >= 9 is odd.
Proof: This is true for n = 2. Let n > 2 be even. Let m be even.
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).
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.
Finally, a(n) >= 9 since the first odd composite number is 9. (End)

Examples

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

Crossrefs

Programs

  • 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
    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
  • Python
    from itertools import count
    from sympy.ntheory import digits
    from sympy import factorint, isprime
    def fromdigits(d, b):
        n = 0
        for di in d: n *= b; n += di
        return n
    def a(n):
        for k in count(4):
            if isprime(k): continue
            sf = []
            for p, e in factorint(k).items():
                sf.extend(e*digits(p, n)[1:])
            if fromdigits(sf, n)%k == 0:
                return k
    print([a(n) for n in range(2, 6)]) # Michael S. Branicky, Apr 01 2024
    
  • Python
    from itertools import count
    from sympy import factorint, integer_log
    def A371641(n):
        for m in count(4):
            f = factorint(m)
            if sum(f.values()) > 1:
                c = 0
                for p in sorted(f):
                    a = pow(n,integer_log(p,n)[0]+1,m)
                    for _ in range(f[p]):
                        c = (c*a+p)%m
                if not c:
                    return m # Chai Wah Wu, Apr 11 2024
    

Extensions

a(36) and beyond from Michael S. Branicky, Apr 27 2024