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!)
A086697 Left-truncatable semiprimes, i.e., semiprimes in which repeatedly deleting the leftmost digit gives a semiprime at every step until a single-digit semiprime remains. 2
4, 6, 9, 14, 26, 34, 39, 46, 49, 69, 74, 86, 94, 134, 146, 169, 194, 214, 226, 249, 274, 314, 326, 334, 339, 346, 386, 394, 446, 469, 514, 526, 586, 614, 626, 634, 649, 669, 674, 694, 734, 746, 749, 794, 849, 869, 886, 914, 926, 934, 939, 949, 974, 1169, 1214 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Zero digits are not permitted, so 106 is not a member even though 106 and 6 are both semiprimes. - Harvey P. Dale, Jun 28 2017
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
I. O. Angell and H. J. Godwin, On Truncatable Primes, Math. Comput. 31, 265-267, 1977.
EXAMPLE
a(15)=146 is a term because 146, 46, 6 are all semiprimes.
MATHEMATICA
ltsQ[n_]:=DigitCount[n, 10, 0]==0&&AllTrue[FromDigits/@NestList[Rest[ #]&, IntegerDigits[n], IntegerLength[n]-1], PrimeOmega[#]==2&]; Select[ Range[ 1500], ltsQ] (* Harvey P. Dale, Jun 28 2017 *)
lt3pQ[n_]:=Module[{idn=IntegerDigits[n]}, FreeQ[idn, 0]&&Union[PrimeOmega/@(FromDigits/@Table[Take[idn, -i], {i, Length[idn]}])]=={2}]; Select[Range[8000], lt3pQ] (* Vincenzo Librandi, Apr 22 2018 *)
PROG
(Python)
from sympy import factorint
from itertools import islice
def issemiprime(n): return sum(factorint(n).values()) == 2
def agen():
semis, digits = [4, 6, 9], "123456789" # can't have 0
while len(semis) > 0:
yield from semis
cands = set(int(d+str(p)) for p in semis for d in digits)
semis = sorted(c for c in cands if issemiprime(c))
print(list(islice(agen(), 55))) # Michael S. Branicky, Aug 04 2022
CROSSREFS
Cf. A001358 (semiprimes), A085733 (right-truncatable).
Sequence in context: A226271 A137371 A179463 * A372533 A374739 A287568
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Jul 28 2003
STATUS
approved

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 August 19 23:12 EDT 2024. Contains 375310 sequences. (Running on oeis4.)