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!)
A213017 Largest possible number of digits in a base n right-truncatable semiprime. 2

%I #24 Apr 03 2023 10:36:13

%S 0,0,0,8,22,30,31,35,38,43,48,51

%N Largest possible number of digits in a base n right-truncatable semiprime.

%C Right-truncatable semiprimes are numbers, where the number itself and all numbers obtained by successively removing the rightmost digit are semiprimes. S. S. Gupta found the largest possible right-truncatable base 10 semiprime to be 95861957783594714393831931415189937897 (38 decimal digits). Digit counts for largest possible right-truncatable semiprimes in other bases, found by Hermann Jurksch, are given in this sequence.

%H Shyam Sunder Gupta, <a href="https://t5k.org/curios/page.php?curio_id=6861">The largest right-truncatable semiprime</a>, Prime Curios.

%e There are no right-truncatable semiprimes in bases 2,3 and 4 thus a(2)=a(3)=a(4)=0;

%e The examples give the smallest base n semiprimes of maximum digit count, found by H. Jurksch:

%e a(5)=8: 42143413

%e a(6)=22: 4223145115415551545111

%e a(7)=30: 644324264233631242462662622646

%e a(8)=31: 4267773725372537135533515117773

%e a(9)=35: 43741424882428682844851886888222774

%e a(10)=38: 93359393537779942973989331953313839313

%e a(11)=43: 4567476a2738a828994aa851a116aa886a95686a231

%e a(12)=48: 43a2971ba155719171a2b1b97777775b779a732b755572b7

%e a(13)=51: 9114448462c6c46b3c9937446466b43686a246686667324c6a2

%o (Python)

%o from sympy import factorint

%o def fromdigits(t, b): return sum(b**i*di for i, di in enumerate(t[::-1]))

%o def semiprime(n): return sum(factorint(n).values()) == 2

%o def a(n):

%o d, s = 0, [(i,) for i in range(n) if semiprime(fromdigits((i,), n))]

%o while len(s) > 0:

%o cands = set(t+(d,) for t in s for d in tuple(range(n)))

%o d, s = d+1, [c for c in cands if semiprime(fromdigits(c, n))]

%o return d

%o print([a(n) for n in range(2, 8)]) # _Michael S. Branicky_, Aug 04 2022

%Y Cf. A001358, A085733, A213018.

%K nonn,base,hard,more

%O 2,4

%A _Hugo Pfoertner_, Jun 07 2012

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 March 29 04:59 EDT 2024. Contains 371264 sequences. (Running on oeis4.)