A213017 Largest possible number of digits in a base n right-truncatable semiprime.
0, 0, 0, 8, 22, 30, 31, 35, 38, 43, 48, 51
Offset: 2
Examples
There are no right-truncatable semiprimes in bases 2,3 and 4 thus a(2)=a(3)=a(4)=0; The examples give the smallest base n semiprimes of maximum digit count, found by H. Jurksch: a(5)=8: 42143413 a(6)=22: 4223145115415551545111 a(7)=30: 644324264233631242462662622646 a(8)=31: 4267773725372537135533515117773 a(9)=35: 43741424882428682844851886888222774 a(10)=38: 93359393537779942973989331953313839313 a(11)=43: 4567476a2738a828994aa851a116aa886a95686a231 a(12)=48: 43a2971ba155719171a2b1b97777775b779a732b755572b7 a(13)=51: 9114448462c6c46b3c9937446466b43686a246686667324c6a2
Links
- Shyam Sunder Gupta, The largest right-truncatable semiprime, Prime Curios.
Programs
-
Python
from sympy import factorint def fromdigits(t, b): return sum(b**i*di for i, di in enumerate(t[::-1])) def semiprime(n): return sum(factorint(n).values()) == 2 def a(n): d, s = 0, [(i,) for i in range(n) if semiprime(fromdigits((i,), n))] while len(s) > 0: cands = set(t+(d,) for t in s for d in tuple(range(n))) d, s = d+1, [c for c in cands if semiprime(fromdigits(c, n))] return d print([a(n) for n in range(2, 8)]) # Michael S. Branicky, Aug 04 2022
Comments