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-7 of 7 results.

A109308 Lesser emirps (primes whose digit reversal is a larger prime).

Original entry on oeis.org

13, 17, 37, 79, 107, 113, 149, 157, 167, 179, 199, 337, 347, 359, 389, 709, 739, 769, 1009, 1021, 1031, 1033, 1061, 1069, 1091, 1097, 1103, 1109, 1151, 1153, 1181, 1193, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1279, 1283, 1381, 1399, 1409, 1429
Offset: 1

Views

Author

Zak Seidov, Jun 25 2005

Keywords

Crossrefs

Cf. A006567 (emirps), A109309 (larger emirps).

Programs

  • Maple
    read("transforms"):
    A109308 := proc(n)
        option remember;
        local p,R ;
        if n = 1 then
            return 13 ;
        else
            p := nextprime(procname(n-1)) ;
            while true do
                R := digrev(p) ;
                if R> p and isprime(R) then
                    return p;
                end if;
                p := nextprime(p) ;
            end do:
        end if;
    end proc: # R. J. Mathar, Oct 12 2012
  • Mathematica
    dr[n_]:=FromDigits[Reverse[IntegerDigits[n]]];Select[Prime[Range[1000]], PrimeQ[dr[ # ]]&&dr[ # ]>#&]
  • PARI
    isok(p) = if (isprime(p), my(q=fromdigits(Vecrev(digits(p)))); (p < q) && isprime(q)); \\ Michel Marcus, Sep 07 2021
    
  • Python
    from sympy import isprime, primerange
    def ok(p): revp = int(str(p)[::-1]); return p < revp and isprime(revp)
    print(list(filter(ok, primerange(1, 1430)))) # Michael S. Branicky, Sep 07 2021

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

A178093 Larger of emirp pairs whose digital sums are also emirps (A178091).

Original entry on oeis.org

733, 751, 953, 971, 1741, 1831, 3271, 3433, 3541, 3613, 3851, 7253, 7321, 7433, 7523, 7901, 9013, 9103, 9161, 9341, 9521, 9769, 9787, 9967, 13711, 14431, 14831, 15241, 15511, 15601, 15731, 16451, 17041, 18701, 19421, 30271, 30491, 30851, 31081, 31481, 31531, 32341
Offset: 1

Views

Author

Lekraj Beedassy, May 19 2010

Keywords

Crossrefs

Programs

  • Mathematica
    emirpQ[n_] := n != IntegerReverse[n] && PrimeQ[n] && PrimeQ[IntegerReverse[n]]; q[n_] := emirpQ[DigitSum[n]] && n > IntegerReverse[n] && emirpQ[n]; Select[Range[10^5], q] (* Amiram Eldar, Apr 30 2024 *)

Extensions

More terms from Amiram Eldar, Apr 30 2024

A263242 Larger of emirp pairs that are merely reversals of their end digits.

Original entry on oeis.org

31, 71, 73, 97, 311, 701, 733, 743, 751, 761, 907, 937, 941, 953, 967, 971, 983, 991, 3221, 9001, 9221, 9227, 9551, 9661, 9883, 32321, 33931, 34141, 34841, 35051, 36061, 36761, 37571, 39791, 70001, 71711, 72221, 73331, 74143, 74441, 74843, 74941, 75253, 76261, 76463, 76561
Offset: 1

Views

Author

Lekraj Beedassy, Oct 13 2015

Keywords

Comments

The first digit is always larger than the last digit.

Crossrefs

Programs

  • Mathematica
    epQ[n_]:=Module[{idn=IntegerDigits[n],mid},mid=Rest[Most[idn]];PrimeQ[ IntegerReverse[n]]&&mid==Reverse[mid]&&idn[[1]]>idn[[-1]]]; Select[ Prime[Range[6,8000]],epQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 10 2016 *)

Extensions

Corrected by Harvey P. Dale, Oct 10 2016

A127748 Largest n-digit emirp (A006567) with strictly decreasing (distinct) digits.

Original entry on oeis.org

97, 983, 9871, 98731, 986543, 9875321
Offset: 2

Views

Author

Lekraj Beedassy, Jan 28 2007

Keywords

Crossrefs

Extensions

Edited and extended by Ray Chandler, Jan 30 2007

A152033 a(n) is the least n-digit prime p whose reversal is a prime q < p.

Original entry on oeis.org

31, 311, 1201, 11701, 106501, 1020101, 10021001, 100440001, 1000200001, 10003810001, 100011400001, 1000039200001, 10000084000001, 100000381000001, 1000001790000001, 10000004700000001, 100000033900000001, 1000000101700000001, 10000000484400000001, 100000001019000000001
Offset: 2

Views

Author

Zak Seidov, Nov 20 2008

Keywords

Crossrefs

Subsequence of A109309.

Programs

  • Mathematica
    Do[ p = NextPrime[10^(n - 1) ]; Do[ p1 = FromDigits[ Reverse[IntegerDigits[p]]]; If[PrimeQ[p1] && p1 < p, Print[{n, p}]; Break[]]; p = NextPrime[p], {10^9}], {n, 2, 16}];

Extensions

a(17)-a(21) from Chai Wah Wu, Sep 11 2019

A178545 Primes p such that q = p^2 + p + 1 is an emirp.

Original entry on oeis.org

3, 5, 41, 59, 839, 857, 1811, 1931, 3011, 3221, 3407, 3671, 8387, 8543, 8627, 9719, 9743, 9803, 10781, 11549, 12647, 13469, 13487, 13499, 13613, 13931, 14087, 17477, 17573, 17837, 18089, 18269, 19319, 19403, 19661, 19991, 27191, 27947, 31223, 33311, 34313
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 29 2010

Keywords

Comments

It is conjectured (but still an open problem) that there exist infinitely many primes of the form n^2 + n + 1 = ((2*n+1)^2 + 3)/4.
Landau's 4th problem from (1912, 5th Congress of Mathematicians in Cambridge) conjectures that there are infinitely many primes of the form n^2 + 1 (also Euler 1760; Mirsky 1949).
Hardy and Littlewood proposed a conjecture about the asymptotic number of primes of the form n^2 + 1.
An emirp ("prime" spelled backwards) is a prime whose reversal is a different prime, the reversal of q is denoted by R(q).
It is conjectured but also unproved that there are infinitely many emirps (see A048054).
For p > 3 necessarily p of the form 6*k + 5 as (6*k+1)^2 + (6*k+1) + 1 a multiple of 3.

Examples

			3^2 + 3 + 1 = 13 = prime(6), R(13) = prime(11), 3 is first term.
5^2 + 5 + 1 = 31 = prime(11), R(31) = prime(6), 5 is 2nd term.
q = 1811^2 + 1811 + 1 = 3281533 = prime(235691), R(q) = prime(240351), first case that p = 1811 = prime(280) = emirp(87) is itself an emirp.
		

References

  • M. Gardner: Die magischen Zahlen des Dr. Matrix, Krueger Verlag, Frankfurt am Main, 1987
  • R. Guy: Unsolved Problems in Number Theory,3rd edition, Springer, New York, 2004
  • G. H. Hardy, E. M. Wright: Einfuehrung in die Zahlentheorie, R. Oldenburg, Muenchen, 1958

Crossrefs

Programs

  • Maple
    filter:= proc(p) local q,qr;
       if not isprime(p) then return false fi;
       q:= p^2+p+1;
       if not isprime(q) then return false fi;
       qr:= revdigs(q);
       qr <> q and isprime(qr);
    end proc:
    select(filter, [3,seq(i,i=5..50000,6)]); # Robert Israel, Dec 04 2016
  • Mathematica
    EmirpQ[n_] := If[ PrimeQ@n, Block[{id = IntegerDigits@n}, rid = Reverse@ id; rid != id && PrimeQ@ FromDigits@ rid]]; Select[ Prime@ Range@ 3700, EmirpQ[ #^2 + # + 1] &] (* Robert G. Wilson v, Jul 26 2010 *)
    p2emrpQ[p_]:=With[{q=p^2+p+1},!PalindromeQ[q]&&AllTrue[{q,IntegerReverse[q]},PrimeQ]]; Select[Prime[Range[3700]],p2emrpQ] (* Harvey P. Dale, Mar 10 2025 *)

Extensions

More terms from Robert G. Wilson v, Jul 26 2010
Showing 1-7 of 7 results.