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 41-50 of 198 results. Next

A048053 Smallest sequence of 12 consecutive reversible primes (emirps).

Original entry on oeis.org

9387802769, 9387802807, 9387802817, 9387802861, 9387802867, 9387802873, 9387802909, 9387802937, 9387802939, 9387802973, 9387802987, 9387803003
Offset: 1

Views

Author

Keywords

Examples

			The reverse of prime 9387802769 is 9672087839 is also prime, as are all of these numbers.
		

Crossrefs

A114018 Least n-digit prime whose digit reversal is also prime.

Original entry on oeis.org

2, 11, 101, 1009, 10007, 100049, 1000033, 10000169, 100000007, 1000000007, 10000000207, 100000000237, 1000000000091, 10000000000313, 100000000000261, 1000000000000273, 10000000000000079, 100000000000000049, 1000000000000002901, 10000000000000000051
Offset: 1

Views

Author

Amarnath Murthy, Nov 12 2005

Keywords

Comments

The more compact version A168159 gives many more terms, cf. formula. [M. F. Hasler, Nov 21 2009]

Crossrefs

Cf. A168159, A007500, A006567, A122490. [M. F. Hasler, Nov 21 2009]

Programs

  • Mathematica
    f[n_] := Block[{k = 10^(n - 1)}, While[ !PrimeQ[k] || !PrimeQ[FromDigits@Reverse@IntegerDigits@k], k++ ]; k]; Array[f, 19] (* Robert G. Wilson v, Nov 19 2005 *)
    lndp[n_]:=Module[{p=NextPrime[10^n]},While[CompositeQ[IntegerReverse[ p]],p = NextPrime[ p]];p]; Array[lndp,20,0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 05 2019 *)
  • PARI
    for(x=1,1e99, until( isprime(x=nextprime(x+1)) & isprime(eval(concat(vecextract(Vec(Str(x)),"-1..1")))),); print1(x", "); x=10^#Str(x)-1) \\ M. F. Hasler, Nov 21 2009
    
  • Python
    from sympy import isprime
    def c(n): return isprime(n) and isprime(int(str(n)[::-1]))
    def a(n): return next(p for p in range(10**(n-1), 10**n) if c(p))
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jun 27 2022

Formula

a(n) = 10^(n-1) + A168159(n). [M. F. Hasler, Nov 21 2009]

Extensions

More terms from Robert G. Wilson v, Nov 19 2005

A128388 Emirps with only prime digits (i.e., 2, 3, 5, 7).

Original entry on oeis.org

37, 73, 337, 733, 3257, 3373, 3527, 3733, 7253, 7523, 7577, 7757, 32233, 32257, 32353, 32377, 32537, 33223, 35227, 35257, 35323, 35327, 35537, 72253, 72337, 72353, 72577, 73277, 73327, 73523, 73553, 75223, 75253, 75577, 77237, 77323
Offset: 1

Views

Author

Lekraj Beedassy, Feb 28 2007

Keywords

Comments

7523 is the largest norep emirp with only prime digits. - Harvey P. Dale, Sep 17 2019

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range[10^4], # != IntegerReverse[ # ] && PrimeQ[IntegerReverse[ # ]] && Intersection[IntegerDigits[ # ], {0, 1, 4, 6, 8, 9}] == {} &] (* Ray Chandler, Mar 06 2007; corrected by James C. McMahon, Jun 03 2025 *)
    Table[Select[FromDigits/@Tuples[{2,3,5,7},n],!PalindromeQ[#]&& AllTrue[ {#, IntegerReverse[ #]},PrimeQ]&],{n,2,5}]//Flatten (* Requires Mathematica version 10 or later *)  (* Harvey P. Dale, Sep 17 2019 *)

Extensions

Corrected by Ray Chandler, Mar 06 2007

A083815 Semiprimes whose prime factors are distinct and the reversal of one factor is equal to the other.

Original entry on oeis.org

403, 1207, 2701, 7663, 35143, 75007, 117907, 127087, 140209, 173809, 197209, 247021, 257821, 342127, 382387, 643063, 692443, 743623, 1226221, 1341331, 1626151, 1698661, 1739161, 2073991, 2138791, 2528611, 2561011, 3321133
Offset: 1

Views

Author

Jason Earls, Jun 17 2003

Keywords

Comments

Products of emirp pairs, sorted. - Lekraj Beedassy, Jan 10 2008

Examples

			a(2)= 1207 = 17 * 71.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local i,L;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(p) local r;
      if not isprime(p) then return NULL fi;
      r:= revdigs(p);
      if r > p and isprime(r) then r*p fi
    end proc:
    sort(map(f, [seq(i,i=13..9999,2)])); # Robert Israel, Dec 26 2018

Extensions

More terms from Ray Chandler, Jul 22 2003

A109309 Larger emirps (primes whose digit reversal is a lesser prime).

Original entry on oeis.org

31, 71, 73, 97, 311, 701, 733, 743, 751, 761, 907, 937, 941, 953, 967, 971, 983, 991, 1201, 1301, 1321, 1511, 1601, 1741, 1811, 1831, 1901, 3011, 3121, 3191, 3203, 3221, 3251, 3271, 3301, 3371, 3391, 3433, 3511, 3541, 3571, 3613, 3643, 3733, 3803, 3821
Offset: 1

Views

Author

Zak Seidov, Jun 25 2005

Keywords

Crossrefs

Cf. A006567 Emirps (primes whose digit reversal is a different prime), A109308 Lesser emirps (primes whose digit reversal is a larger prime).

Programs

  • Mathematica
    dr[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Select[Prime[Range[1000]], PrimeQ[dr[ # ]]&&dr[ # ]<#&]
    Select[Prime[Range[600]],PrimeQ[IntegerReverse[#]]&&#>IntegerReverse[#]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 23 2020 *)

A346022 Primes that are the first in a run of exactly 2 emirps.

Original entry on oeis.org

13, 31, 337, 701, 761, 937, 983, 1151, 1279, 1831, 1933, 3191, 3803, 3851, 3911, 7043, 7219, 7457, 7523, 7643, 9127, 9161, 9241, 9437, 9521, 9547, 9601, 9871, 9931, 10007, 10151, 10247, 10487, 10639, 10853, 10889, 11071, 11657, 11833, 12071, 12547, 12689
Offset: 1

Views

Author

Lars Blomberg, Jul 01 2021

Keywords

Comments

There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite.

Examples

			a(2) = 31 because of the four consecutive primes 29, 31, 37, 41 only 31, 37 are emirps.
		

Crossrefs

Subsequence of A006567 (emirps).

Programs

  • Python
    from sympy import isprime, nextprime
    def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
    def aupto(limit):
      alst, pvec, evec, p = [], [2, 3, 5, 7], [0, 0, 0, 0], 11
      while pvec[1] <= limit:
        if evec == [0, 1, 1, 0]: alst.append(pvec[1])
        pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
      return alst
    print(aupto(12689)) # Michael S. Branicky, Jul 04 2021

A080790 Binary emirps, primes whose binary reversal is a different prime.

Original entry on oeis.org

11, 13, 23, 29, 37, 41, 43, 47, 53, 61, 67, 71, 83, 97, 101, 113, 131, 151, 163, 167, 173, 181, 193, 197, 199, 223, 227, 229, 233, 251, 263, 269, 277, 283, 307, 331, 337, 349, 353, 359, 373, 383, 409, 421, 431, 433, 449, 461, 463, 479, 487, 491, 503, 509, 521
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 25 2003

Keywords

Comments

Members of A074832 that are not in A006995. - Robert Israel, Aug 31 2016

Examples

			A000040(10) = 29 -> '11101' rev '10111' -> 23 = A000040(9), therefore 29 and 23 are terms.
The prime 19 is not a term, as 19 -> '10011' rev '11001' -> 25 = 5^2; and 7 = A074832(3) is not a term because it is a binary palindrome (A006995) and therefore not different.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L; L:= convert(n,base,2); add(L[-i]*2^(i-1),i=1..nops(L)) end proc:
    filter:= proc(t) local r; if not isprime(t) then return false fi;
      r:= revdigs(t); r <> t and isprime(r) end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Aug 30 2016
  • Mathematica
    Select[Prime[Range[100]], (r = IntegerReverse[#, 2]) != # && PrimeQ[r] &] (* Amiram Eldar, Jul 28 2025 *)
  • Python
    from sympy import isprime
    def ok(n):
        r = int(bin(n)[2:][::-1], 2)
        return n != r and isprime(n) and isprime(r)
    print([k for k in range(600) if ok(k)]) # Michael S. Branicky, Jul 30 2022

A178581 Primes that are the average of the members of emirp pairs.

Original entry on oeis.org

11311, 12721, 13831, 14741, 16061, 16561, 17471, 18481, 20507, 21107, 21407, 21617, 21817, 22727, 23027, 23227, 23327, 23537, 24137, 24547, 24847, 25147, 25247, 25447, 25657, 26357, 27067, 27367, 28277, 34543, 34843, 35153, 35353
Offset: 1

Views

Author

Lekraj Beedassy, May 29 2010

Keywords

Comments

For the lesser member of the corresponding smallest emirp pair, see A178582.

Crossrefs

A346023 Primes that are the first in a run of exactly 3 emirps.

Original entry on oeis.org

71, 953, 1021, 1097, 1381, 1499, 1583, 1723, 3011, 3083, 3271, 3343, 3463, 7673, 7949, 9209, 9479, 10453, 10987, 11149, 12289, 12743, 13499, 13751, 14057, 14087, 14549, 15289, 15649, 15731, 16103, 16193, 16567, 17033, 17203, 17669, 17737, 17903, 18899, 19793
Offset: 1

Views

Author

Lars Blomberg, Jul 02 2021

Keywords

Comments

There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite.

Examples

			a(1) = 71 because of the five consecutive primes 67, 71, 73, 79, 83 all except 67 and 83 are emirps and this is the first such occurrence.
		

Crossrefs

Subsequence of A006567 (emirps)

Programs

  • Mathematica
    Select[Prime@Range@10000,Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#,Range[-1,3]])]=={0,1,1,1,0}&] (* Giorgos Kalogeropoulos, Jul 04 2021 *)
  • Python
    from sympy import isprime, primerange
    def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
    def aupto(limit):
        alst, pvec, evec = [], [2, 3, 5, 7, 11], [0, 0, 0, 0, 0]
        for p in primerange(13, limit+1):
            if evec == [0, 1, 1, 1, 0]: alst.append(pvec[1])
            pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
        return alst
    print(aupto(20000)) # Michael S. Branicky, Jul 04 2021

A346024 Primes that are the first in a run of exactly 4 emirps.

Original entry on oeis.org

733, 7177, 9011, 11551, 11777, 12107, 13147, 13259, 13693, 14563, 19219, 19531, 19661, 31891, 32467, 35117, 35311, 36097, 36187, 38351, 38903, 70241, 70921, 75721, 77323, 78607, 79399, 79531, 90121, 91183, 92297, 92479, 92959, 93581, 94121, 95111, 95791, 96857
Offset: 1

Views

Author

Lars Blomberg, Jul 02 2021

Keywords

Comments

There are large gaps in this sequence because all terms need to begin with 1, 3, 7, or 9 otherwise the reversal is composite.

Examples

			a(1) = 733 because of the six consecutive primes 727, 733, 739, 743, 751, 757 all except 727 and 757 are emirps and this is the first such occurrence.
		

Crossrefs

Subsequence of A006567 (emirps)

Programs

  • Mathematica
    Select[Prime@Range@10000,Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#,Range[-1,4]])]=={0,1,1,1,1,0}&] (* Giorgos Kalogeropoulos, Jul 04 2021 *)
  • Python
    from sympy import isprime, primerange
    def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
    def aupto(limit):
        alst, pvec, evec = [], [2, 3, 5, 7, 11, 13], [0, 0, 0, 0, 0, 0]
        for p in primerange(17, limit+1):
            if evec == [0, 1, 1, 1, 1, 0]: alst.append(pvec[1])
            pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
        return alst
    print(aupto(97000)) # Michael S. Branicky, Jul 04 2021
Previous Showing 41-50 of 198 results. Next