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.

Showing 1-3 of 3 results.

A182180 Semiprimes that become prime when their digits are sorted into nonincreasing order.

Original entry on oeis.org

14, 34, 35, 38, 118, 119, 121, 133, 134, 142, 143, 145, 146, 166, 194, 214, 215, 218, 314, 334, 341, 346, 358, 361, 365, 377, 386, 395, 398, 413, 415, 437, 451, 473, 514, 517, 538, 583, 614, 634, 635, 671, 734, 737, 778, 779, 791, 799, 818, 835, 838, 878, 893
Offset: 1

Views

Author

Jonathan Vos Post, Apr 23 2012

Keywords

Comments

Suggested by Kevin L. Schwartz.

Examples

			a(10) = 121 = 11*11, which becomes the prime 211 when its digits are sorted into nonincreasing order.
		

Crossrefs

Cf. A000040, A001358, A115670 Semiprimes (A001358) whose digit reversal is prime, A182150 Semiprimes that are also semiprime when their digits are sorted into nondecreasing order.

Programs

  • Maple
    h:= proc(m) local k; for k from m+1 while isprime(k) or
                add(i[2], i=ifactors(k)[2])<>2 do od; k
        end:
    a:= proc(n) option remember; local k;
          k:= h(a(n-1));
          do if isprime(parse(cat(sort(convert(k, base, 10), `>`)[])))
                then return k else k:=h(k) fi
          od
        end: a(0):=0:
    seq(a(n), n=1..80);  # Alois P. Heinz, Apr 23 2012

Extensions

More terms from Alois P. Heinz, Apr 23 2012

A264815 Semirps: a semirp (or semi-r-p) is a semiprime r*p with r and p both reversed primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 39, 49, 51, 55, 62, 65, 74, 77, 85, 91, 93, 111, 119, 121, 142, 143, 146, 155, 158, 169, 185, 187, 194, 202, 213, 214, 217, 219, 221, 226, 237, 259, 262, 289, 291, 298, 302, 303, 314, 321, 334, 339, 341, 355
Offset: 1

Views

Author

Danny Rorabaugh, Nov 25 2015

Keywords

Comments

A semiprime (A001358) is the product of two prime, not necessarily distinct. A semiprime is in this list if those two primes (A000040) are reversed primes (A004087).
Since A007500 is the intersection of A000040 and A004087, this sequence is also the sorted list of all r*p with r and p in A007500.

Examples

			9 is in the list because 9 = 3*3 is a semiprime and reverse(3) = 3 is prime.
143 is in the list because 143 = 11*13 is a semiprime and both reverse(11) = 11 and reverse(13) = 31 are prime.
		

Crossrefs

Programs

  • Mathematica
    With[{nn=250},Take[Union[Times@@@Select[Tuples[IntegerReverse/@Prime[Range[nn]],2],AllTrue[#,PrimeQ]&]],60]] (* Harvey P. Dale, Apr 27 2025 *)
  • Sage
    reverse = lambda n: sum([10^i*int(str(n)[i]) for i in range(len(str(n)))])
    def is_semirp(n):
      F = factor(n)
      if sum([f[1] for f in F])==2:
        r, p = F[0][0], F[-1][0]
        if is_prime(reverse(r)) and is_prime(reverse(p)): return True
    [a for a in range(1,356) if is_semirp(a)] # Danny Rorabaugh, Nov 25 2015

Formula

[A007500]^2, sorted.

A368238 Semiprimes whose reversal is a prime, ordered by the prime.

Original entry on oeis.org

91, 14, 34, 74, 35, 95, 38, 301, 901, 721, 731, 361, 371, 391, 791, 922, 142, 362, 382, 703, 713, 133, 943, 763, 973, 793, 914, 134, 334, 934, 974, 194, 305, 905, 145, 745, 755, 365, 965, 785, 395, 995, 106, 706, 146, 346, 746, 166, 386, 917, 377, 118, 358, 758, 958, 778, 119, 749, 779, 799, 3101
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Dec 18 2023

Keywords

Examples

			a(4) = 74 because A115670(4) = 47 is the 4th prime whose reversal is a semiprime, and 74 is that reversal.
		

Crossrefs

Programs

  • Maple
    rev:= proc(n) local L,i;
           L:= convert(n,base,10);
           add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    map(rev, select(p -> isprime(p) and numtheory:-bigomega(rev(p)) = 2, [seq(i,i=3..1000,2)]);
  • Mathematica
    s = {}; Do[If[2 == PrimeOmega[sm = FromDigits[Reverse[IntegerDigits[Prime[k]]]]], AppendTo[s, sm]], {k, 200}]; s

Formula

a(n) = A004086(A085778(n)).
Showing 1-3 of 3 results.