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 61-70 of 198 results. Next

A155512 Emirps with digits 0 and 1 only.

Original entry on oeis.org

10011101, 10111001, 100100111, 111001001, 1000110101, 1001001011, 1010001101, 1010011111, 1010110001, 1011000101, 1101001001, 1111100101, 10010100101, 10100000011, 10100000111, 10100101001, 10111001011, 11000000101
Offset: 1

Views

Author

Lekraj Beedassy, Jan 23 2009

Keywords

Comments

Subsequence of A128390 and of A020449.

Crossrefs

Programs

  • Mathematica
    emQ[ls_List]:=Module[{rev=Reverse[ls]},Length[ls]==Length[rev]&& ls!=rev && PrimeQ[FromDigits[ls]]&&PrimeQ[FromDigits[rev]]]; Union[Flatten[ Table[FromDigits/@Select[Tuples[{1,0},n],emQ],{n,11}]]] (* Harvey P. Dale, Nov 30 2011 *)

Extensions

First two missed entries included. Lekraj Beedassy, May 30 2009
More terms from Sean A. Irvine, Mar 04 2010

A176371 Primes p such that reversal(p) - 13 is a square.

Original entry on oeis.org

31, 41, 71, 83, 281, 311, 431, 479, 733, 751, 797, 2011, 2857, 3163, 4373, 4397, 4943, 7541, 7577, 7583, 9413, 9491, 20533, 20731, 20771, 24151, 24547, 24767, 26249, 28979, 31121, 41201, 41609, 43321, 43391, 43753, 45641, 49459, 49463, 49811, 49891
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 16 2010

Keywords

Comments

R(n) denotes the Reversal of a natural number n
List of all (p,N) for p < 10^6 - 1:
(*) for emirp pair (p,R(p)), (+) if square base N is a prime
(41,1), (71,2) (+) (*), (83,5) (+), (281,13) (+), (311,10) (*), (431,11) (+), (479,31) (+), (733,18) (*), (751,12) (*), (797,28),
(2011,33), (2857,87), (4373,61) (+), (4397,89) (+), (4943,59) (+), (7541,38), (7577,88) (*), (7583,62), (9413,56), (9491,44) (*), (20533,183), (20731,117), (20771,133), (24151,123), (24547,273), (24767,277) (+), (26249,307) (+), (28979,313) (+), (31121,110) (*), (41201,101) (+),
(41609,301), (43321,111), (43391,139) (+), (43753,189), (45641,121), (49459,309), (49463,191) (+), (49811,109), (49891,141), (71293,198) (*),
(73133,182), (73471,132), (73597,282) (*), (75521,112), (77611,108) (*), (77849,308), (77863,192) (*), (79613,178), (79841,122) (*), (83207,265),
(83231,115), (83243,185), (83299,315), (90031,114) (*), (92801,104), (96431,116) (*), (98057,274)

Examples

			41 = prime(13), R(41) - 13 = 14 - 13 = 1^2, is a term.
71 = prime(20), 17 - 13 = 2^2, is a term.
83 = prime(23), 38 - 13 = 5^2, is a term.
797 = prime(139) = palindromic prime(18), N = 28^2, is also a term.
Note successive terms that are also consecutive primes: p(17) = 7577, p(18) = 7583, p(36) = 49459, p(37) = 49463, p(46) = 77849, p(47) = 77863.
		

References

  • W. W. R. Ball, H. S. M.Coxeter: Mathematical Recreations and Essays, Dover Publications, 13th edition, 1987
  • O. Fritsche, R. Mischak and T. Krome: Verflixt und zugeknobelt, Mehr mathematische Raetselgeschichten, Rowohlt TB. Nr.62190, 2007
  • C. W. Trigg, Primes with Reverses That Are Powers, J. Rec. Math. 17, 1985

Crossrefs

Programs

  • PARI
    isok(n) = {if (! isprime(n), return (0)); d = digits(n); revn = sum(i=1, #d, d[i]*10^(i - 1)); issquare(revn-13);} \\ Michel Marcus, Aug 25 2013
    
  • Python
    from sympy import isprime
    A176371_list, i, j = [], 0, 13
    while j < 10**10:
        p = int(str(j)[::-1])
        if j % 10 and isprime(p):
            A176371_list.append(p)
        j += 2*i+1
        i += 1
    A176371_list = sorted(A176371_list) # Chai Wah Wu, Dec 17 2015

Extensions

Two more terms 31 and 3163 added by Michel Marcus, Aug 25 2013

A210498 Prime numbers that become emirps when their least-significant-digit is deleted.

Original entry on oeis.org

131, 137, 139, 173, 179, 311, 313, 317, 373, 379, 719, 733, 739, 797, 971, 977, 1493, 1499, 1571, 1579, 1993, 1997, 1999, 3119, 3371, 3373, 3593, 7013, 7019, 7331, 7333, 7393, 7433, 7517, 7691, 7699, 9371, 9377, 9413, 9419, 9533, 9539, 9677, 9679, 9719, 9833
Offset: 1

Views

Author

Keywords

Comments

This sequence (like the emirps) experiences large gaps when the most-significant-digit is {2,4,5,6,8}.

Examples

			Example: a(1)=131, which becomes 13 upon deletion, which is an emirp.
		

Crossrefs

Programs

  • R
    library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x),split=""))),collapse=""))!=x & isprime(j);i=as.bigz(0); y=as.bigz(rep(0,100)); len=0;
    while(len<100)
        if(isprime((i=nextprime(i))))
            if(isemirp(as.bigz(substr(i,1,nchar(as.character(i))-1))))
                y[(len=len+1)]=i

A225235 Emirps whose internal digits are also an emirp.

Original entry on oeis.org

1979, 3319, 3371, 3373, 3719, 3733, 7177, 7717, 9133, 9173, 9791, 10177, 10711, 10739, 11071, 11497, 11579, 11677, 13477, 13591, 13597, 17011, 17393, 17519, 19531, 19913, 30139, 30319, 30971, 31139, 31799, 31991, 37619, 39371, 39419, 39839, 70313, 70373, 70717
Offset: 1

Views

Author

Keywords

Comments

This sequence (like the emirps) experiences large gaps when the most-significant-digit is {2,4,5,6,8}.

Examples

			7177 and 10177 are in the sequence because both are emirps, and both become the emirp 17 upon deletion of their first and last digits.
		

Crossrefs

Programs

  • R
    library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x), split=""))), collapse=""))!=x & isprime(j);
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s};
    i=as.bigz(0); y=as.bigz(rep(0, 100)); len=0;
    while(len<100) if(isemirp((i=nextprime(i)))) if(isemirp(as.bigz(no0(substr(i,2,nchar(as.character(i))-1))))) y[(len=len+1)]=i;
    as.vector(y)

A346026 Primes that are the first in a run of exactly 6 emirps.

Original entry on oeis.org

10039, 14891, 39791, 119773, 149561, 162293, 163781, 176903, 181751, 197383, 336689, 392911, 393361, 714361, 715361, 779003, 971141, 995443, 996539, 1165037, 1284487, 1307729, 1447151, 1611877, 1640539, 1789621, 1891147, 3136909, 3150557, 3284447, 3339943
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) = 10039 because of the eight consecutive primes 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093 all except 10037 and 10093 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);
    Select[Prime@Range[2,50000],Boole[EmQ/@NextPrime[#,Range[-1,6]]]=={0,1,1,1,1,1,1,0}&] (* Giorgos Kalogeropoulos, Jul 27 2021 *)
  • Python
    from sympy import isprime, nextprime, prime, primerange
    def isemirp(p): s = str(p); return s != s[::-1] and isprime(int(s[::-1]))
    def aupto(limit, runlength=6):
      alst = []
      pvec = list(primerange(1, prime(runlength+2)+1))
      evec = [int(isemirp(p)) for p in pvec]
      target = [0] + [1 for i in range(runlength)] + [0]
      p = nextprime(pvec[-1])
      while pvec[1] <= limit:
        if evec == target: alst.append(pvec[1])
        pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]; p = nextprime(p)
        strp = str(p)
        if strp[0] in "24568": # skip large gaps (p is a prime, not an emirp)
          evec = [0 for i in range(runlength+2)]
          pvec = [0 for i in range(runlength+2)]
          p = nextprime(int(str(int(strp[0])+1)+'0'*(len(strp)-1)))
      return alst
    print(aupto(3339943)) # Michael S. Branicky, Jul 14 2021

A046485 Sum of first n palindromic primes A002385.

Original entry on oeis.org

2, 5, 10, 17, 28, 129, 260, 411, 592, 783, 1096, 1449, 1822, 2205, 2932, 3689, 4476, 5273, 6192, 7121, 17422, 27923, 38524, 49835, 61246, 73667, 86388, 99209, 112540, 126371, 140302, 154643, 169384, 184835, 200386, 216447, 232808, 249369, 266030, 283501
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

The subsequence of prime partial sum of palindromic primes begins: 2, 5, 17, 5273, 7121, 154643, 283501. What is the smallest nontrivial (i.e., multidigit) palindromic prime partial sum of palindromic primes? [Jonathan Vos Post, Feb 07 2010]

Crossrefs

Programs

  • Mathematica
    t = {}; b = 10; Do[p = Prime[n]; i = IntegerDigits[p, b]; If[i == Reverse[i], AppendTo[t, p];(*Print[p.FromDigits[i]]*)], {n, 4000}]; Accumulate[t] (* Vladimir Joseph Stephan Orlovsky, Feb 23 2012 *)
    Accumulate[Select[Prime[Range[10000]],IntegerDigits[#]==Reverse[ IntegerDigits[#]]&]] (* Harvey P. Dale, Aug 10 2013 *)

Formula

a(n) = Sum_{i=1..n} A002385(i) = Sum_{i=1..n} {p prime and R(p) = p, i.e., primes whose decimal expansion is a palindrome}. [Jonathan Vos Post, Feb 07 2010]

Extensions

Offset set to 1 by R. J. Mathar, Feb 21 2010

A054218 Palindromic primes of the form 'primemirp' resulting from A054217.

Original entry on oeis.org

2, 3, 5, 7, 131, 313, 373, 797, 11311, 17971, 18181, 19991, 35353, 72727, 78787, 90709, 93739, 96769, 98389, 1153511, 1193911, 1201021, 1409041, 1583851, 1597951, 1657561, 1831381, 1879781, 3083803, 3089803, 3319133, 3343433, 3391933, 3541453, 3643463
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Comments

Original idea from G. L. Honaker, Jr.

Examples

			Prime 113 has emirp 311 and 11311 is a palindromic prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    for i in range(2,10**7):
        if isprime(i):
            emirp = int(str(i)[-1::-1])
            if isprime(emirp):
                primemirp = int(str(i)+str(emirp)[1:])
                if isprime(primemirp):
                    print(primemirp)
    # Peter Rowlett, Nov 16 2023

Extensions

a(33)-a(35) from Peter Rowlett, Nov 16 2023

A085300 a(n) is the least prime x such that when reversed it is a power of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 163, 18258901387, 90367894271, 13, 73, 1861, 344800741, 34351783286302805384336021, 940315563074788471, 1886172359328147919771, 14854831
Offset: 1

Views

Author

Labos Elemer, Jun 24 2003

Keywords

Comments

A006567 (after rearranging terms) and A002385 are subsequences. - Chai Wah Wu, Jun 02 2016

Examples

			a(14)=344800741 means that 147008443=43^5=p(14)^5, where 5 is the smallest such exponent;
a(19) has 82 decimal digits and if reversed equals 39th power of p(19)=67.
		

Crossrefs

Programs

  • Python
    from sympy import prime, isprime
    def A085300(n):
        p = prime(n)
        q = p
        while True:
            m = int(str(q)[::-1])
            if isprime(m):
                return(m)
            q *= p # Chai Wah Wu, Jun 02 2016

A155507 Emirps with digits 1 and 9 only.

Original entry on oeis.org

199, 991, 91199, 99119, 111119, 111919, 119191, 191911, 911111, 919111, 991999, 999199, 1191119, 1191191, 1191991, 1911911, 1991911, 9111911, 11111911, 11191991, 11911111, 11919991, 19111991, 19911191, 19919111, 19991911
Offset: 1

Views

Author

Lekraj Beedassy, Jan 23 2009

Keywords

Comments

Subsequence of A128390.

Crossrefs

Programs

  • Mathematica
    emrpQ[n_]:=Module[{r=IntegerReverse[n]},r!=n&&AllTrue[{r,n},PrimeQ]]; Table[Select[FromDigits/@Tuples[{1,9},n],emrpQ],{n,8}]//Flatten (* Harvey P. Dale, Aug 09 2017 *)

Extensions

More terms from Sean A. Irvine, Apr 05 2010

A155508 Lesser of emirps (pairs) with digits 1 and 9 only.

Original entry on oeis.org

199, 91199, 111119, 111919, 119191, 991999, 1191119, 1191191, 1191991, 11111911, 11191991, 11919991, 19111991, 91111199, 111111199, 111199199, 191111119, 199991999, 919919999, 1111111999, 1191111991, 1199111191, 1911199999
Offset: 1

Views

Author

Lekraj Beedassy, Jan 23 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[Subsets[Select[FromDigits/@Tuples[{1,9},n],PrimeQ],{2}],AllTrue[#,PrimeQ]&&#[[1]]==IntegerReverse[#[[2]]]&][[All,1]],{n,3,10}]/.{}->Nothing] (* Harvey P. Dale, Aug 21 2020 *)

Extensions

More terms from Sean A. Irvine, Apr 06 2010
Previous Showing 61-70 of 198 results. Next