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.

Previous Showing 11-15 of 15 results.

A317248 Semiprimes which when truncated arbitrarily on either side in base 10 yield semiprimes.

Original entry on oeis.org

4, 6, 9, 46, 49, 69, 94, 469, 694, 949, 4694
Offset: 1

Views

Author

Keith J. Bauer, Jul 24 2018

Keywords

Comments

There are exactly 3 1-digit terms, 4 2-digit terms, 3 3-digit terms, and 1 4-digit term.
After the 4-digit term, there are no more terms in this sequence. This is provable by induction: There are no 5-digit terms. If there are no k-digit terms, there are no (k+1)-digit terms. (If there were, then said term, when truncated on either side, would produce a k-digit number that is in the sequence.) Therefore, there are no terms that have at least 5 digits.
The sequence 3, 4, 3, 1, 0, 0, ... does not appear to be significant.
This sequence depends on base 10 and is nonnegative.
Any truncation of a number in this sequence yields another number in this sequence. If one did not, then truncating the number more would yield a non-semiprime, which is impossible.
Base 10 is the first base in which this sequence contains 3-digit terms.

Examples

			4694 is a semiprime (2 * 2347), and its truncations are, too: 469 (7 * 67), 694 (2 * 347), 46 (2 * 23), etc.
		

Crossrefs

Cf. A001358.
Subset of A107342 and A086698.

Programs

  • Mathematica
    ok[w_, n_] := AllTrue[Flatten@ Table[ FromDigits@ Take[w, {i, j}], {i, n}, {j, i, n}], PrimeOmega[#] == 2 &]; Union @@ Reap[ Do[Sow[ FromDigits /@ Select[Tuples[{4, 6, 9}, n], ok[#, n] &]], {n, 5}]][[2, 1]] (* Giovanni Resta, Jul 26 2018 *)
  • Python
    #v2.7.13, see LINKS to run it online.
    #semitest(number, 0) returns True iff number is a semiprime
    def semitest(number, factors):
        if number != 2:
            for p in [2] + range(3, int(number ** 0.5) + 1, 2):
                if number % p == 0:
                    if factors < 2:
                        return semitest(number / p, factors + 1)
                    else:
                        return False
        if factors == 1:
            return True
        else:
            return False
    #main function
    def doIt(base):
        #initialization
        numbers = [[]]
        indices_list = [[]]
        i = 0
        for number in range(1, base):
            if semitest(number, 0):
                numbers[0].append(number)
                indices_list[0].append([i])
                i += 1
        #numbers[0] is the digit pool
        #numbers[-1] is to be appended to
        #numbers[-2] is for reference to past numbers
        #indices_list records the indices of numbers
        numbers.append([])
        indices_list.append([])
        #main while loop, go until there are no numbers left in the sequence
        indices = [0, 0]
        while len(numbers[-2]) > 0:
            #test number
            if indices[:-1] in indices_list[-2]:
                if indices[1:] in indices_list[-2]:
                    #little-endian
                    number = 0
                    power = 0
                    for index in indices:
                        number += numbers[0][index] * base ** power
                        power += 1
                    if semitest(number, 0):
                        numbers[-1].append(number)
                        indices_list[-1].append(indices[:])
            #increment indices
            for i in range(len(indices)):
                indices[i] += 1
                if indices[i] == len(numbers[0]):
                    indices[i] = 0
                    if i == len(indices) - 1:
                        indices = [0] * len(indices) + [0]
                        numbers.append([])
                        indices_list.append([])
                else:
                    break
        #print results after while loop has run
        print base, sum(numbers, [])
        print numbers
    #call main function
    doIt(10)
    
  • Python
    from sympy import factorint
    A317248_list = xlist = [4,6,9]
    for n in range(1,10):
        ylist = []
        for i in (4,6,9):
            for x in xlist:
                if sum(factorint(10*x+i).values()) == 2 and (10*x+i) % 10**n in xlist:
                    ylist.append(10*x+i)
                elif sum(factorint(x+i*10**n).values()) == 2 and (x//10+i*10**(n-1)) in xlist:
                    ylist.append(x+i*10**n)
        xlist = set(ylist)
        if not len(xlist):
            break
        A317248_list.extend(xlist)
    A317248_list.sort() # Chai Wah Wu, Aug 23 2018

A321046 Semiprimes for which the concatenation of the digits in the even positions and the concatenation of the digits in the odd positions are semiprimes.

Original entry on oeis.org

46, 49, 69, 94, 145, 194, 262, 265, 291, 295, 365, 393, 394, 395, 398, 446, 466, 469, 545, 565, 591, 597, 649, 662, 669, 695, 699, 767, 794, 842, 862, 865, 866, 895, 943, 961, 965, 993, 995, 1006, 1046, 1059, 1145, 1154, 1202, 1205, 1241, 1255, 1343, 1345, 1349, 1354, 1355, 1501, 1507, 1541, 1555, 1642, 1649, 1655
Offset: 1

Views

Author

Marius A. Burtea, Oct 26 2018

Keywords

Examples

			46 is a term because 46 = 2*23, 4 = 2*2 and 6 = 2*3 are semiprimes.
469 is a term because 469 = 7*67, 49 = 7*7 and 6 = 2*3 are semiprimes.
1145 is a term because 1145 = 5*229, 14 = 2*7 and 15 = 3*5 are semiprimes.
Also 38159 belongs to the sequence. In fact: 38159 = 11*3469, 319 = 11*29 and 85 = 5*17 are semiprimes.
		

Crossrefs

Programs

  • Mathematica
    spQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; ok[n_] := spQ[n] && Block[{d = IntegerDigits[n]},If[OddQ@ Length@ d, PrependTo[d, 0]]; AllTrue[ FromDigits /@ Transpose[ Partition[d, 2]], spQ]]; Select[ Range@ 1655, ok] (* Giovanni Resta, Oct 29 2018 *)

A365009 Semiprimes that are the concatenation of two or more semiprimes.

Original entry on oeis.org

46, 49, 69, 94, 106, 146, 159, 214, 219, 226, 254, 259, 334, 339, 346, 386, 394, 415, 422, 446, 451, 458, 466, 469, 482, 485, 493, 514, 519, 554, 559, 579, 586, 589, 614, 622, 626, 629, 633, 634, 635, 649, 655, 662, 669, 674, 685, 687, 694, 695, 699, 746, 749, 779, 866, 869, 879, 914, 921, 922
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Aug 15 2023

Keywords

Comments

Conjecture: The fraction of semiprimes <= N that are in this sequence goes to 1 as N -> infinity. What is the first N for which that fraction >= 1/2?

Examples

			a(3) = 69 is a term because 69 = 3 * 23 is a semiprime and is the concatenation of the semiprimes 6 = 2 * 3 and 9 = 3 * 3.
		

Crossrefs

Cf. A001358, A001238, A019549. Contains A107342.

Programs

  • Maple
    filter:= proc(n) local d,v;
      if numtheory:-bigomega(n) <> 2 then return false fi;
      for d from 1 to length(n)-1 do
         v:= n  mod 10^d;
         if v >= 10^(d-1) and numtheory:-bigomega(v)=2 and g((n-v)/10^d) then return true fi
      od;
      false
    end proc:
    g:= proc(n) local d,v; option remember;
      if numtheory:-bigomega(n) = 2 then return true fi;
      for d from 1 to length(n)-1 do
        v:= n mod 10^d;
        if v >= 10^(d-1) and numtheory:-bigomega(v)=2 and procname((n-v)/10^d) then return true fi
      od;
      false
    end proc:
    select(filter, [$10..1000]);

A111730 6-almost primes with semiprime digits (digits 4, 6, 9 only).

Original entry on oeis.org

64, 96, 4644, 4944, 6664, 6966, 9464, 9996, 44464, 44944, 46496, 46644, 49644, 49696, 64449, 64496, 66444, 66696, 69444, 69496, 69966, 94496, 94644, 94696, 96496, 96944, 99666, 99944, 444496, 444664, 444696, 444996, 446664, 446944, 446964, 449469, 449694, 449964, 464496, 464646, 464664, 464994, 469464, 494494, 494944, 494949, 494964, 496464, 499446, 499944, 644464, 644944
Offset: 1

Views

Author

Jonathan Vos Post, Nov 18 2005

Keywords

Examples

			64 = 2^6
96 = 2^5 * 3
4644 = 2^2 * 3^3 * 43
4944 = 2^4 * 3 * 103
6664 = 2^3 * 7^2 * 17
6966 = 2 * 3^4 * 43
9464 = 2^3 * 7 * 13^2
9996 = 2^2 * 3 * 7^2 * 17
44464 = 2^4 * 7 * 397
44944 = 2^4 * 53^2 = 212^2
46496 = 2^5 * 1453
		

Crossrefs

Intersection of A046306 and A107665.

Programs

  • Mathematica
    Select[Range[645000],ContainsOnly[IntegerDigits[#],{4,6,9}]&&PrimeOmega[#]==6&] (* James C. McMahon, Jun 05 2024 *)
  • PARI
    isok(k) = (bigomega(k) == 6) && (#setminus(Set(digits(k)), Set([4,6,9])) == 0); \\ Michel Marcus, Apr 13 2022

Extensions

Missing a(1)=64 prepended and several terms corrected by Georg Fischer and Michel Marcus, Apr 13 2022

A349275 Semiprimes with only semiprime digits, each appearing at least once.

Original entry on oeis.org

469, 649, 694, 4469, 4694, 4699, 4946, 6499, 6649, 6694, 9446, 9466, 9469, 9946, 44669, 44966, 44969, 46469, 46946, 46969, 46994, 46999, 49466, 49649, 49694, 49699, 49969, 64469, 64649, 64669, 64949, 64994, 66469, 66494, 66694, 69449, 69469, 69494, 69694, 69949, 94469, 94669, 94699, 94969, 96449, 96494, 96649, 96946, 96949, 96994, 99646, 99649, 444694
Offset: 1

Views

Author

Zak Seidov, Nov 12 2021

Keywords

Comments

Each digits 4, 6, 9 occur at least once. Minimal difference is 3.

Crossrefs

Cf. A001358.
Subsequence of A107342.

Programs

Previous Showing 11-15 of 15 results.