login
A371695
The smallest composite number that divides the reverse of the concatenation of its ascending ordered prime factors, with repetition, when written in base n.
3
623, 4, 114, 4, 57, 4, 9, 4, 26, 4, 185, 4, 9, 4, 1718, 4, 343, 4, 9, 4, 70, 4, 25, 4, 9, 4, 195, 4, 226, 4, 9, 4, 25, 4, 123, 4, 9, 4, 654, 4, 862, 4, 9, 4, 42, 4, 49, 4, 9, 4, 3385, 4, 25, 4, 9, 4, 238, 4, 202, 4, 9, 4, 25, 4, 453, 4, 9, 4, 2435, 4, 721, 4, 9, 4, 49, 4, 70, 4, 9, 4, 186
OFFSET
2,1
COMMENTS
See A371641 for an explanation of multiple terms being 4 and 9. The largest number in the first 10000 terms is a(5980) = 1030778.
LINKS
FORMULA
If n+1 is composite, then a(n) <= A020639(n+1)^2. The numbers n where n+1 is composite and a(n) < A020639(n+1)^2 are 288, 298, 340, 360, 376, 516, 526, 550, 582, 736, ... and appear to be identical to A371948. - Chai Wah Wu, Apr 16 2024
EXAMPLE
a(2) = 623 as 623 = 7_10 * 89_10 = 111_2 * 1011001_2 = "1111011001"_2 which when reversed is "1001101111"_2 = 623_10 which is divisible by 623.
a(4) = 114 as 114 = 2_10 * 3_10 * 19_10 = 2_4 * 3_4 * 103_4 = "23103"_4 which when reversed is "30132"_4 = 798_10 which is divisible by 114.
PROG
(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 list(factorint(k).items())[::-1]:
sf.extend(e*digits(p, n)[1:][::-1])
if fromdigits(sf, n)%k == 0:
return k
print([a(n) for n in range(2, 83)]) # Michael S. Branicky, Apr 16 2024
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Apr 03 2024
STATUS
approved