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 51-60 of 198 results. Next

A346025 Primes that are the first in a run of exactly 5 emirps.

Original entry on oeis.org

3371, 9769, 11699, 11953, 15493, 34549, 72307, 72547, 105653, 106391, 109849, 129587, 139387, 144407, 169067, 170759, 178333, 193261, 193877, 316073, 324031, 324893, 325163, 333923, 339671, 375787, 381859, 389287, 701383, 701593, 712289, 722633, 744377, 777349
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) = 3371 because of the seven consecutive primes 3361, 3371, 3373, 3389, 3391, 3407, 3413 all except 3361 and 3413 are emirps and this is the first such occurrence.
		

Crossrefs

Subsequence of A006567 (emirps).

Programs

  • Mathematica
    Select[Prime@Range@20000,Boole[PrimeQ@#&&!PalindromeQ@#&/@(IntegerReverse/@NextPrime[#,Range[-1,5]])]=={0,1,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, 17], [0, 0, 0, 0, 0, 0, 0]
        for p in primerange(19, limit+1):
            if evec == [0, 1, 1, 1, 1, 1, 0]: alst.append(pvec[1])
            pvec = pvec[1:] + [p]; evec = evec[1:] + [isemirp(p)]
        return alst
    print(aupto(780000)) # Michael S. Branicky, Jul 04 2021

A048890 Primes that yield a different prime when rotated by 180 degrees.

Original entry on oeis.org

19, 61, 109, 199, 601, 661, 1019, 1061, 1091, 1109, 1181, 1601, 1609, 1669, 1699, 1811, 1901, 1999, 6011, 6091, 6101, 6199, 6619, 6661, 6689, 6691, 6899, 6991, 10061, 10069, 10091, 10691, 10861, 10909, 11069, 11681, 11909, 16001, 16619, 16661
Offset: 1

Views

Author

Keywords

Comments

Also called invertible primes. [Lekraj Beedassy, Jan 03 2009]

Crossrefs

Programs

  • Haskell
    import Data.List (unfoldr)
    a048890 n = a048890_list !! (n-1)
    a048890_list = filter f a000040_list where
       f x = all (`elem` [0,1,6,8,9]) ds && x' /= x && a010051 x' == 1
         where x' = foldl c 0 ds
               c v 6 = 10*v + 9; c v 9 = 10*v + 6; c v d = 10*v + d
               ds = unfoldr d x
               d z = if z == 0 then Nothing else Just $ swap $ divMod z 10
    -- Reinhard Zumkeller, Nov 18 2011
    
  • Mathematica
    lst = {}; fQ[n_] := Block[{allset = {0, 1, 6, 8, 9}, id = IntegerDigits@n}, rid = Reverse[id /. {6 -> 9, 9 -> 6}]; Union@ Join[id, allset] == allset && PrimeQ@ FromDigits@ rid && rid != id]; Do[ If[ PrimeQ@n && fQ@n, AppendTo[lst, n]], {n, 16900}]; lst (* Robert G. Wilson v, Feb 27 2007 *)
  • Python
    from itertools import product
    from sympy import isprime
    A048890_list = []
    for d in product('01689',repeat=6):
        s = ''.join(d)
        p = int(s)
        if p > 0:
            q = int(s[::-1].rstrip('0').translate(''.maketrans('69','96')))
            if p != q and isprime(q) and isprime(p):
                A048890_list.append(p) # Chai Wah Wu, Sep 13 2021

Extensions

Better definition and more terms from Robert G. Wilson v, Feb 27 2007

A071613 a(n) is the smallest prime that is the first of n consecutive primes with equal digit sum.

Original entry on oeis.org

2, 523, 22193, 1442173, 5521819, 354963229, 881160173, 881160173, 441586802467, 3085029222449
Offset: 1

Views

Author

Klaus Brockhaus, May 27 2002

Keywords

Comments

a(11) > 10^14. - Giovanni Resta, Aug 15 2013

Examples

			a(3) = 22193, since 22193,22229,22247 are three consecutive primes with digit sum 17 and this is the first occurrence of three consecutive primes with equal digit sum.
		

Crossrefs

Extensions

a(7)-a(9) from Donovan Johnson, Dec 02 2009
a(10) from Giovanni Resta, Aug 14 2013

A128390 Emirps with only nonprime digits (i.e., 0, 1, 4, 6, 8, 9).

Original entry on oeis.org

149, 199, 941, 991, 1009, 1061, 1069, 1091, 1109, 1181, 1409, 1499, 1601, 1619, 1669, 1811, 1901, 1949, 9001, 9011, 9041, 9161, 9491, 9601, 9661, 9941, 10009, 10061, 10069, 10091, 10499, 10889, 10891, 10909, 11149, 11161, 11489, 11699, 11909
Offset: 1

Views

Author

Lekraj Beedassy, Feb 28 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range@(10^4), (r = IntegerReverse@#) != # && PrimeQ@r && Intersection[IntegerDigits@#, {2, 3, 5, 7}] == {} &] (* Ray Chandler, Mar 06 2007 corrected by Hans Rudolf Widmer, May 18 2024 *)

Extensions

Corrected by Ray Chandler, Mar 06 2007

A228768 Smallest number that is an emirp in all bases from 2 through n.

Original entry on oeis.org

11, 11, 53, 61, 193, 193, 193, 193, 93836531, 1963209431, 14322793967831, 14322793967831
Offset: 2

Views

Author

James G. Merickel, Sep 03 2013

Keywords

Comments

Note: This sequence would differ almost certainly only in a few smaller terms if (multi-digit) palindromes were also allowed or, in the other direction, if the emirp partners were required to all differ from each other.
Numbers in this sequence must lie in specific ranges wherein the leading digit in each composite base is relatively prime to the base. In particular, if a value is to be found that is emirp in bases 2 through 14, its leading digits in bases 4, 6, 8, 9, 10, 12 and 14 are limited to 2/3, 2/5, 4/7, 6/8 (=3/4), 4/9, 4/11 and 6/13 of the possibilities.
With searches limited to such ranges, a probability estimate -- based on the Prime Number Theorem -- that a prime number is an emirp is enhanced by a factor expressing knowledge of non-divisibility by the prime divisors of the base and also by the prime factors of the base minus and plus 1. For example, for base 10 the knowledge that a number's reversal is prime and leads with a permissible digit implies that the number itself is not divisible by 2, 3, 5 or 11; and a factor of 2*(3/2)*(5/4)*(11/10)=33/8 would properly be multiplied by the reciprocal of the logarithm of the number to approximate the chance that the number is prime.
For the base-14 problem, employing a small (number-dependent) constant c to account for ratios of a number to its different-base reversals and multiplying such factors together provides an overall estimate of (3^5 * 5^4 * 7^5 * 11^3 * 13^3)/(2^28*(log(P)+c)^13) that a large prime, P, with permissible leading digits is an emirp in bases 2 through 14. The rational multiplier is about 27806397.37 or 3.7378900 per base. With calculations based on this way of employing standard heuristics, it turns out that this next term is most likely in the 3rd permissible range, between 5*6^20 and 2*10^16. (The 1st and 2nd are (a(13), 6*9^13) and (3*8^15, 2*14^12), respectively.) But there is an appreciable chance of its arising before that (greater than 10%), and also a not ignorable possibility (3 to 4%) it cannot be found until the 4th range (between 9*14^15 and 8*12^16, the chances being microscopic of this failing). Thus, either luck or excessive use of resources is required.

Examples

			Decimal 193 is 11000001, 21011, 3001, 1233, 521, 364, 301 and 234 in bases 2 through 9, and reversing (and translating back to decimal from these bases) gives primes 131, 113, 67, 461, 53, 241, 67 and 353.
		

Crossrefs

Programs

  • PARI
    emirp(p,b)=my(q,t=p);while(t,q=b*q+t%b;t\=b);isprime(q) && p!=q
    a(n)=forprime(p=2,,for(b=2,n,if(!emirp(p,b),next(2))); return(p)) \\ Charles R Greathouse IV, Sep 03 2013
    
  • Python
    from gmpy2 import is_prime, next_prime
    def isemirp(n,b=10): # check if n is emirp in base b
        x, y = n, 0
        while x >= b:
            x, r = divmod(x,b)
            y = y*b + r
        y = y*b + x
        return n != y and is_prime(y)
    def A228768(n):
        m = 1
        while True:
            m = next_prime(m)
            for b in range(2,n+1):
                if not isemirp(m,b):
                    break
            else:
                return m # Chai Wah Wu, Jun 11 2015

A054217 Primes p with property that p concatenated with its emirp p' (prime reversal) forms a palindromic prime of the form 'primemirp' (rightmost digit of p and leftmost digit of p' are blended together - p and p' palindromic allowed).

Original entry on oeis.org

2, 3, 5, 7, 13, 31, 37, 79, 113, 179, 181, 199, 353, 727, 787, 907, 937, 967, 983, 1153, 1193, 1201, 1409, 1583, 1597, 1657, 1831, 1879, 3083, 3089, 3319, 3343, 3391, 3541, 3643, 3853, 7057, 7177, 7507, 7681, 7867, 7949, 9103, 9127, 9173, 9209, 9439, 9547, 9601
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Comments

Original idea from G. L. Honaker, Jr..

Examples

			E.g., prime 113 has emirp 311 and 11311 is a palindromic prime, so 113 is a term.
		

Crossrefs

Programs

  • Mathematica
    empQ[n_]:=Module[{idn=IntegerDigits[n],rev},rev=Reverse[idn];And@@PrimeQ[ {FromDigits[ rev],FromDigits[Join[Most[idn],rev]]}]]; Select[Prime[ Range[ 1200]],empQ] (* Harvey P. Dale, Mar 26 2013 *)
  • Python
    from sympy import isprime
    def ok(n):
        if not isprime(n): return False
        s = str(n); srev = s[::-1]
        return isprime(int(srev)) and isprime(int(s[:-1] + srev))
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Nov 17 2023

Extensions

Corrected (a(30)=3089 inserted) by Harvey P. Dale, Mar 26 2013

A070905 Smallest prime (emirp) of n consecutive primes such that all are emirps and all have the same digital sum.

Original entry on oeis.org

13, 3803, 1865491, 710030729, 144432372463, 11659784792119
Offset: 1

Views

Author

Jason Earls, May 19 2002

Keywords

Examples

			a(2) = 3803 because 3803 and next prime 3821 are emirps, both with a digital sum of 14. a(3)=1865491 because 1865491 1865509 1865527 are all emirps with digital sum of 34.
		

Crossrefs

Cf. A006567.

Extensions

One more term from Klaus Brockhaus, May 26 2002
a(5)-a(6) from Giovanni Resta, Apr 24 2017

A050699 Nonprime numbers n such that n and n-reversed (<> n and no leading zeros) have the same number of prime factors (counted with multiplicity).

Original entry on oeis.org

15, 26, 39, 49, 51, 58, 62, 85, 93, 94, 115, 117, 122, 123, 126, 129, 143, 147, 155, 158, 159, 165, 169, 177, 178, 183, 185, 187, 203, 205, 221, 225, 226, 244, 246, 265, 285, 286, 289, 294, 302, 314, 315, 319, 321, 326, 327, 329, 335, 338, 339, 341, 355, 366
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			E.g., 321 = 3*107 and 123 = 3*41 -> both 321 and 123 have two prime factors.
		

Crossrefs

Programs

  • Maple
    with(numtheory): read(transforms): for n from 12 to 366 do r:=digrev(n): if(not isprime(n) and not n=r and not n mod 10 = 0 and bigomega(n)=bigomega(r))then printf("%d, ", n); fi: od: # Nathaniel Johnston, Jun 23 2011
  • Mathematica
    nrnQ[n_]:=Module[{idn=IntegerDigits[n],rev},rev=Reverse[idn];!PrimeQ[n] &&First[rev]!=0&&idn!=rev&&PrimeOmega[n]==PrimeOmega[FromDigits[rev]]]; Select[Range[400],nrnQ] (* Harvey P. Dale, Jun 23 2011 *)

Extensions

Definition clarified by Harvey P. Dale, Jun 23 2011

A108388 Transmutable primes: Primes with distinct digits d_i, i=1,m (2<=m<=4) such that simultaneously exchanging all occurrences of any one pair (d_i,d_j), i<>j results in a prime.

Original entry on oeis.org

13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 179, 191, 199, 313, 331, 337, 773, 911, 919, 1171, 1933, 3391, 7717, 9311, 11113, 11119, 11177, 11717, 11933, 33199, 33331, 77171, 77711, 77713, 79999, 97777, 99991, 113111, 131111, 131113, 131171, 131311
Offset: 1

Views

Author

Rick L. Shepherd, Jun 02 2005

Keywords

Comments

a(n) is a term iff a(n) is prime and binomial(m,2) 'transmutations' (see example) of a(n) are different primes. A083983 is the subsequence for m=2: one transmutation (The author of A083983, Amarnath Murthy, calls the result of such a digit-exchange a self-complement. {Because I didn't know until afterwards that this sequence was a generalization of A083983 and as this generalization always leaves some digits unchanged for m>2, I've chosen different terminology.}). A108389 ({1,3,7,9}) is the subsequence for m=4: six transmutations. Each a(n) corresponding to m=3 (depending upon its set of distinct digits) and having three transmutations is also a member of A108382 ({1,3,7}), A108383 ({1,3,9}), A108384 ({1,7,9}), or A108385 ({3,7,9}). The condition m>=2 only eliminates the repunit (A004022) and single-digit primes. The condition m<=4 is not a restriction because if there were more distinct digits, they would include even digits or the digit 5, in either case transmuting into a composite number. Some terms such as 1933 are reversible primes ("Emirps": A006567) and the reverse is also transmutable. The transmutable prime 3391933 has three distinct digits and is also a palindromic prime (A002385). The smallest transmutable prime having four distinct digits is A108389(0) = 133999337137 (12 digits).

Examples

			179 is a term because it is prime and its three transmutations are all prime:
exchanging ('transmuting') 1 and 7: 179 ==> 719 (prime),
exchanging 1 and 9: 179 ==> 971 (prime) and
exchanging 7 and 9: 179 ==> 197 (prime).
(As 791 and 917 are not prime, 179 is not a term of A068652 or A003459 also.).
Similarly, 1317713 is transmutable:
exchanging all 1's and 3s: 1317713 ==> 3137731 (prime),
exchanging all 1's and 7s: 1317713 ==> 7371173 (prime) and
exchanging all 3s and 7s: 1317713 ==> 1713317 (prime).
		

Crossrefs

Cf. A108382, A108383, A108384, A108385, A108386, A108389 (transmutable primes with four distinct digits), A083983 (transmutable primes with two distinct digits), A108387 (doubly-transmutable primes), A006567 (reversible primes), A002385 (palindromic primes), A068652 (every cyclic permutation is prime), A003459 (absolute primes).

Programs

  • Python
    from gmpy2 import is_prime
    from itertools import combinations, count, islice, product
    def agen(): # generator of terms
        for d in count(2):
            for p in product("1379", repeat=d):
                p, s = "".join(p), sorted(set(p))
                if len(s) == 1: continue
                if is_prime(t:=int(p)):
                    if all(is_prime(int(p.translate({ord(c):ord(d), ord(d):ord(c)}))) for c, d in combinations(s, 2)):
                        yield t
    print(list(islice(agen(), 50))) # Michael S. Branicky, Dec 15 2023

A108389 Transmutable primes with four distinct digits.

Original entry on oeis.org

133999337137, 139779933779, 173139331177, 173399913979, 177793993177, 179993739971, 391331737931, 771319973999, 917377131371, 933971311913, 997331911711, 1191777377177, 9311933973733, 9979333919939, 19979113377173, 31997131171111, 37137197179931, 37337319113911
Offset: 1

Views

Author

Rick L. Shepherd, Jun 02 2005

Keywords

Comments

This sequence is a subsequence of A108386 and of A108388. See the latter for the definition of transmutable primes and many more comments. Are any terms here doubly-transmutable also; i.e., terms of A108387? Palindromic too? Terms also of some other sequences cross-referenced below? a(7)=771319973999 is also a reversible prime (emirp). a(12)=9311933973733 also has the property that simultaneously removing all its 1's (93933973733), all its 3s (9119977) and all its 9s (3113373733) result in primes (but removing all 7s gives 93119339333=43*47*59*83*97^2, so a(12) is not also a term of A057876). Any additional terms have 14 or more digits.

Examples

			a(0)=133999337137 is the smallest transmutable prime with four distinct digits (1,3,7,9):
exchanging all 1's and 3's: 133999337137 ==> 311999117317 (prime),
exchanging all 1's and 7's: 133999337137 ==> 733999331731 (prime),
exchanging all 1's and 9's: 133999337137 ==> 933111337937 (prime),
exchanging all 3's and 7's: 133999337137 ==> 177999773173 (prime),
exchanging all 3's and 9's: 133999337137 ==> 199333997197 (prime) and
exchanging all 7's and 9's: 133999337137 ==> 133777339139 (prime).
No smaller prime with four distinct digits transmutes into six other primes.
		

Crossrefs

Cf. A108386 (Primes p such that p's set of distinct digits is {1, 3, 7, 9}), A108388 (transmutable primes), A083983 (transmutable primes with two distinct digits), A108387 (doubly-transmutable primes), A006567 (reversible primes), A002385 (palindromic primes), A068652 (every cyclic permutation is prime), A107845 (transposable-digit primes), A003459 (absolute primes), A057876 (droppable-digit primes).

Extensions

a(14) and beyond from Michael S. Branicky, Dec 15 2023
Previous Showing 51-60 of 198 results. Next