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 71-80 of 198 results. Next

A155509 Larger of emirps (pairs) with digits 1 and 9 only.

Original entry on oeis.org

991, 99119, 191911, 911111, 919111, 999199, 1911911, 1991911, 9111911, 11911111, 19911191, 19919111, 19991911, 99111119, 911111191, 991111111, 991991111, 999199991, 999919919, 1911119911, 1919991191, 1991111911, 1991919191
Offset: 1

Views

Author

Lekraj Beedassy, Jan 23 2009

Keywords

Crossrefs

Programs

  • Mathematica
    le19[n_]:=Module[{emrps=Select[FromDigits/@Tuples[{1,9},n],!PalindromeQ[ #] && AllTrue[ {#,IntegerReverse[#]},PrimeQ]&]},If[IntegerReverse[#]>#, IntegerReverse[ #],{}]&/@emrps/.{}->Nothing]; Flatten[Table[le19[x],{x,10}]] // Sort (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 04 2019 *)

Extensions

More terms from Sean A. Irvine, Apr 06 2010

A155514 Larger of emirps (pairs) with digits 0 and 1 only.

Original entry on oeis.org

10111001, 111001001, 1010110001, 1011000101, 1101001001, 1111100101, 10100101001, 11000000101, 11010011101, 11100000101, 100111101001, 101010000001, 101010111001, 110000000101, 110011010101, 110101011001
Offset: 1

Views

Author

Lekraj Beedassy, Jan 23 2009

Keywords

Crossrefs

Programs

  • Mathematica
    emrpQ[n_]:=Module[{idn=IntegerDigits[n],ridn},ridn=Reverse[idn]; idn!=ridn &&PrimeQ[n]&&PrimeQ[FromDigits[ridn]]]; lrgr[n_]:=If[nHarvey P. Dale, Oct 01 2012 *)

Extensions

First missed entry added. Lekraj Beedassy, May 30 2009
More terms from Sean A. Irvine, Mar 04 2010

A178091 Emirps whose digital sums are also emirps.

Original entry on oeis.org

157, 179, 337, 359, 733, 751, 953, 971, 1097, 1237, 1259, 1381, 1439, 1453, 1471, 1583, 1619, 1723, 1741, 1831, 3019, 3109, 3163, 3257, 3271, 3343, 3347, 3433, 3527, 3541, 3613, 3851, 7253, 7321, 7433, 7523, 7699, 7879, 7901, 9013, 9103, 9161, 9341, 9521, 9679, 9769, 9787, 9967
Offset: 1

Views

Author

Lekraj Beedassy, May 19 2010

Keywords

Comments

Palindromic primes are not allowed, nor are palindromic digital sums of primes. - Harvey P. Dale, Feb 23 2014

Crossrefs

Programs

  • Mathematica
    dseQ[n_]:=Module[{idn=IntegerDigits[n],ds},ds=IntegerDigits[Total[idn]];idn!=Reverse[idn]&&ds!=Reverse[ds] && And@@PrimeQ[{FromDigits[ Reverse[ idn]],FromDigits[ds],FromDigits[Reverse[ds]]}]]; Select[Prime[Range[ 1300]],dseQ] (* Harvey P. Dale, Feb 23 2014 *)

A185439 Emirp gaps: Differences between consecutive emirps.

Original entry on oeis.org

4, 14, 6, 34, 2, 6, 18, 10, 6, 36, 8, 10, 12, 20, 112, 26, 10, 12, 30, 312, 8, 24, 6, 4, 8, 10, 8, 138, 30, 4, 12, 14, 4, 12, 8, 18, 12, 10, 2, 28, 8, 22, 6, 6, 6, 42, 2, 28, 12, 8, 12, 4, 6, 6, 2, 6, 12, 10, 20, 4, 18, 20, 60, 18, 10, 20, 10, 14, 18, 16, 12, 12, 12, 36, 24, 14, 4, 18, 38, 12, 54, 10, 8, 12, 36, 22, 20
Offset: 1

Views

Author

Jonathan Vos Post, Feb 03 2011

Keywords

Comments

Gaps between consecutive primes whose reversal is a different prime. This is to Differences between consecutive primes (A001223) as emirps (A006567) are to primes (A000040). This was indirectly suggested to me in a facebook conversation with Kevin L. Schwartz. One may use this to derive other sequences: records in emirp gaps; lower of pair of consecutive emirps with record gap; larger of pair of emirps with record gaps, by analogy with A005250, A002386, A000101.

Examples

			The first 9 emirps are 13, 17, 31, 37, 71, 73, 79, 97, 107.
Hence the first 8 gaps between consecutive emirps are:
   17 - 13 =  4;
   31 - 17 = 14;
   37 - 31 =  6;
   71 - 37 = 34;
   73 - 71 =  2 (i.e., 71 and 73 are a pair of "twin prime emirps");
   79 - 73 =  6;
   97 - 79 = 18;
  107 - 97 = 10.
So far, we see a minimum gap of 2, and a maximum of 34.
		

Crossrefs

Programs

  • Mathematica
    emirpQ[n_]:=Module[{idn=IntegerDigits[n],ridn},ridn=Reverse[idn];idn!=ridn&&PrimeQ[FromDigits[ridn]]]
    Take[Differences[Select[Prime[Range[1000]],emirpQ]],90]  (* Harvey P. Dale, Feb 18 2011 *)

Formula

a(n) = A006567(n+1) - A006567(n).

A210546 Emirps whose products of digits are prime.

Original entry on oeis.org

13, 17, 31, 71, 113, 311, 1151, 1511, 111211, 112111, 1111711, 1171111, 11111117, 11113111, 11131111, 71111111, 111111131, 131111111, 1111115111, 1115111111, 11111111113, 31111111111, 111111111111111131, 131111111111111111, 1111111111111111111111111511
Offset: 1

Views

Author

Lekraj Beedassy, Mar 22 2012

Keywords

Crossrefs

Programs

  • Python
    from _future_ import division
    from sympy import isprime
    A210546_list = []
    for l in range(1,20):
        q = (10**l-1)//9
        for i in range(l):
            for p in [2,3,5,7]:
                r = q+(p-1)*10**i
                s, t = str(r), str(r)[::-1]
                if s != t and isprime(r) and isprime(int(t)):
                    A210546_list.append(r) # Chai Wah Wu, Aug 15 2017

Extensions

5 more terms from Alois P. Heinz, Mar 29 2012

A210547 Lesser of emirp pairs whose members have prime digital products.

Original entry on oeis.org

13, 17, 113, 1151, 111211, 1111711, 11111117, 11113111, 111111131, 1111115111, 11111111113, 111111111111111131, 1111111111111111111111111511, 11111111111111111711111111111, 111111111111111111111111111111111111131
Offset: 1

Views

Author

Lekraj Beedassy, Mar 22 2012

Keywords

Comments

Beyond the first two terms, a(n) is the intersection of A173595 and A046703.

Crossrefs

Extensions

More terms from Alois P. Heinz, Mar 22 2012

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

A345408 Numbers that are the sum of an emirp and its reversal in more than one way.

Original entry on oeis.org

1090, 2662, 2992, 3212, 4334, 4994, 5104, 5324, 6776, 7106, 9328, 9548, 10450, 10670, 10780, 11110, 11330, 11440, 11660, 12122, 12452, 12892, 13222, 15004, 16786, 17446, 17666, 29092, 29482, 31912, 36352, 44644, 44834, 45454, 46654, 46664, 47474, 47864, 49094, 49294, 49484, 49684, 49894, 50104
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 18 2021

Keywords

Comments

Numbers that are in A345409 in more than one way.
Interchanging an emirp and its reversal is not counted as a different way.

Examples

			a(3) = 2992 is a member because 2992 = 1091 + 1901 = 1181+1811 where 1091 and 1181 and their reversals 1901 and 1811 are primes.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
    isemirp1:= proc(n) local r;
    if not isprime(n) then return false fi;
    r:= revdigs(n);
    r > n and isprime(r)
    end proc:
    E:= select(isemirp1, [seq(seq(seq(i*10^d+j,j=1..10^d-1,2),i=[1,3,7,9]),d=1..4)]):
    V:= sort(map(t -> t+revdigs(t),E)):
    M:= select(t -> V[t+1]=V[t], [$1..nops(V)-1]):
    sort(convert(convert(V[M],set),list));
  • Python
    from collections import Counter
    from sympy import isprime, nextprime
    def epgen(start=1, end=float('inf')): # generates unique emirp/prime pairs
        p = nextprime(start-1)
        while p <= end:
            revp = int(str(p)[::-1])
            if p < revp and isprime(revp): yield (p, revp)
            p = nextprime(p)
    def aupto(lim):
        c = Counter(sum(ep) for ep in epgen(1, lim) if sum(ep) <= lim)
        return sorted(s for s in c if c[s] > 1)
    print(aupto(50105)) # Michael S. Branicky, Jun 18 2021

A345409 Numbers that are the sum of an emirp and its reversal.

Original entry on oeis.org

44, 88, 110, 176, 424, 808, 908, 928, 1070, 1090, 1150, 1190, 1312, 1372, 1616, 1676, 1736, 2222, 2332, 2552, 2662, 2992, 3212, 4114, 4334, 4444, 4664, 4774, 4994, 5104, 5324, 5434, 6226, 6776, 6886, 7106, 7436, 8338, 8558, 8998, 9218, 9328, 9548, 10010, 10120, 10450, 10670, 10780, 11000, 11110
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 18 2021

Keywords

Examples

			a(3) = 110 is a member because 110 = 37+73 where 37 is an emirp.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i; L:= convert(n,base,10); add(L[-i]*10^(i-1),i=1..nops(L)) end proc:
    f:= proc(n) local r;
    if not isprime(n) then return NULL fi;
    r:= revdigs(n);
    if r > n and isprime(r) then return r+n fi
    end proc:
    S:= map(f, {seq(seq(seq(i*10^d+j,j=1..10^d-1,2),i=[1,3,7,9]),d=1..4)}):
    sort(convert(S,list));
  • Python
    from sympy import isprime, nextprime
    def epgen(start=1, end=float('inf')): # generates unique emirp/prime pairs
        p = nextprime(start-1)
        while p <= end:
            revp = int(str(p)[::-1])
            if p < revp and isprime(revp): yield (p, revp)
            p = nextprime(p)
    def aupto(lim):
        epsums = set(sum(ep) for ep in epgen(1, lim))
        return sorted(filter(lambda x: x<=lim, epsums))
    print(aupto(11111)) # Michael S. Branicky, Jun 18 2021

A346027 Primes that are the first in a run of exactly 7 emirps.

Original entry on oeis.org

11897, 18719, 125627, 743989, 910909, 920957, 928429, 941449, 1093571, 1407181, 1466533, 1518863, 1648553, 1770829, 3170743, 3300593, 7321943, 7682687, 7755581, 9013351, 12890047, 13267459, 14113199, 16413013, 16944341, 17316031, 18447001, 18490267, 18964111
Offset: 1

Views

Author

Lars Blomberg, Jul 14 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) = 11897 because of the nine consecutive primes 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939, 11941 all except 11887 and 11941 are emirps and this is the first such occurrence.
		

Crossrefs

Subsequence of A006567 (emirps).

Programs

  • Mathematica
    EmQ[n_]:=(s=IntegerReverse@n;PrimeQ@s&&n!=s);
    Monitor[Do[p=Prime@k;If[MemberQ[{1,3,7,9},First@IntegerDigits@p],If[Boole[EmQ/@NextPrime[p,Range[-1,7]]]=={0,1,1,1,1,1,1,1,0},Print@p]],{k,10^6}],p] (* Giorgos Kalogeropoulos, Jul 27 2021 *)
  • Python
    # uses code in A346026
    print(aupto(10**7, runlength=7)) # Michael S. Branicky, Jul 14 2021
Previous Showing 71-80 of 198 results. Next