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 11-20 of 22 results. Next

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

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

A287198 Numbers with the property that every cyclic permutation of its digits is a composite number with none of its permutations sharing any common prime factors.

Original entry on oeis.org

4, 6, 8, 9, 25, 49, 52, 56, 58, 65, 85, 94, 116, 134, 145, 158, 161, 178, 187, 253, 275, 295, 325, 341, 358, 413, 451, 514, 527, 529, 532, 581, 583, 589, 611, 718, 752, 781, 815, 817, 835, 871, 895, 899, 952, 958, 989, 998, 1154, 1156, 1159, 1165, 1189, 1192
Offset: 1

Views

Author

Luke Zieroth, May 21 2017

Keywords

Comments

Subsequence of A052382, as a number with a zero digit have cyclic permutations of the forms 0x and x0 which share prime factors of x. The only exception to this argument is 10, but 01 is not composite, so 10 is not a member of the sequence as well. - Chai Wah Wu, May 24 2017
If m is a multiple of 11 with an even number of digits, then m is not a term. - Chai Wah Wu, May 30 2017

Examples

			The numbers formed by cyclic permutations of 134 are 341 and 413. The factors of 134 are 2 and 67, the factors of 341 are 11 and 31, and the factors of 413 are 7 and 59. Since these numbers are all composite and none share any common factors with each other, 134 is included on the list.
		

Crossrefs

Programs

  • Mathematica
    ok[n_] := Catch@ Block[{t = FromDigits /@ (RotateLeft[IntegerDigits[n], #] & /@ Range[ IntegerLength@ n])}, If[! AllTrue[t, CompositeQ], Throw@False]; Do[ If[ GCD[t[[i]], t[[j]]] > 1, Throw@False], {i, Length@t}, {j, i-1}]; True]; Select[ Range@ 1200, ok] (* Giovanni Resta, May 25 2017 *)
  • PARI
    is(n) = {my(d=digits(n), v=vector(#d)); v[1]=n; if(isprime(n)||n==10, return(0)); for(i=2, #d, v[i] = v[i-1]\10; v[i] = v[i]+(v[i-1]-v[i]*10)*10^(#d-1); if(isprime(v[i]), return(0)); for(j=1,i-1,if(gcd(v[j], v[i])>1, return(0)))); n>1} \\ David A. Corneth, May 25 2017
    
  • Python
    from gmpy2 import is_prime, gcd, mpz
    A287198_list, n  = [], 2
    while n <= 10**6:
        s = str(n)
        if not is_prime(n) and '0' not in s:
            k = n
            for i in range(len(s)-1):
                s = s[1:]+s[0]
                m = mpz(s)
                if is_prime(m) or gcd(k,m) > 1:
                    break
                k *= m
            else:
                A287198_list.append(n)
        n += 1 # Chai Wah Wu, May 27 2017

A085299 a(n) is the smallest number x such that A085298[x]=n, or 0 if no such number exists.

Original entry on oeis.org

1, 8, 47, 18, 14, 89, 10, 9, 48, 16, 23, 17, 168, 268, 15, 661, 50, 380, 84, 116, 360, 245, 29, 144, 345, 227, 785, 261, 148, 235, 691, 658, 638, 40, 1023, 674, 1529, 210, 19, 81, 181, 428, 170, 1130, 2322, 406, 600, 373, 958, 217
Offset: 1

Views

Author

Labos Elemer, Jun 24 2003

Keywords

Examples

			a(13) = 168 means that 13 is the smallest exponent such that reversed[p(168)^13] = reversed[997^13] = 776831144302925059735912605306533496169
is prime if read in this direction and 13th prime-power if read backwards.
		

Crossrefs

A263499 Numbers with nondecreasing digits such that every cyclic shift is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 37, 79, 113, 199, 337, 3779, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Chai Wah Wu, Nov 11 2015

Keywords

Comments

a(16) is too big to display, see the b-file.
a(n) is the intersection of the sequences A068652 and A009994. A258706 is a subsequence. Up until a(16) only the term 3779 is missing from A258706.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{d = IntegerDigits@ n}, And[d == Sort@ d, And @@ Table[PrimeQ@ FromDigits[d = RotateLeft@ d], {Length[d] - 1}]]]; Select[
    Prime@ Range@ 600, fQ] (* Michael De Vlieger, Nov 12 2015, after T. D. Noe at A068652 *)

A069219 Number of cyclic primes with n digits.

Original entry on oeis.org

4, 9, 12, 8, 10, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Martin Renner, Apr 12 2002

Keywords

Comments

Every prime repunit is also a cyclic prime.

Crossrefs

Extensions

More terms from De Geest link by Ray Chandler, May 04 2017

A265324 Numbers with nonincreasing digits such that every cyclic shift is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 73, 97, 311, 733, 971, 991, 9311, 999331, 1111111111111111111, 11111111111111111111111
Offset: 1

Views

Author

Chai Wah Wu, Dec 07 2015

Keywords

Comments

a(18) is too big to display, see the b-file.
a(n) is the intersection of the sequences A068652 and A009996.

Crossrefs

A305993 Base-3 circular primes: Numbers k for which all cyclic shifts of their base-3 expansions give base-3 expansions of prime numbers.

Original entry on oeis.org

2, 5, 7, 13, 1093, 797161
Offset: 1

Views

Author

Jeffrey Shallit, Jun 16 2018

Keywords

Comments

Numbers k for which all cyclic shifts of their base-3 expansions give base-3 expansions of prime numbers.
Not known to be infinite.
No other terms <= 10^7.
No other terms <= 10^11. - Lucas A. Brown, Sep 20 2024

Examples

			For example, 7 in base 3 is 21, and both 21 and 12 represent primes in base 3.
		

Crossrefs

The base-10 analog of this sequence is A068652.
Cf. A272106.

Extensions

New name from Lucas A. Brown, Sep 24 2024

A172435 Partial sums of circular primes A016114.

Original entry on oeis.org

2, 5, 10, 17, 28, 41, 58, 95, 174, 287, 484, 683, 1020, 2213, 5992, 17931, 37868, 231807, 431740, 1111111111111542851, 11112222222222222653962
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2010

Keywords

Comments

Circular primes are a generalization of palindromatic primes (A002385): numbers which remain prime under cyclic shifts of digits. 484 is the first square partial sum of circular primes. The subsequence of prime partial sums of circular primes begins: 2, 5, 17, 41, 683, 2213. The subsubsequence of circular prime partial sums of circular primes begins 2, 5, 17, and what is the next? What are the analogs in other bases?

Examples

			a(21) = 2 + 3 + 5 + 7 + 11 + 13 + 17 + 37 + 79 + 113 + 197 + 199 + 337 + 1193 + 3779 + 11939 + 19937 + 193939 + 199933 + 1111111111111111111 + 11111111111111111111111.
		

Crossrefs

A204844 Cyclic primes that are not absolute primes (A003459).

Original entry on oeis.org

197, 719, 971, 1193, 1931, 3119, 3779, 7793, 7937, 9311, 9377, 11939, 19391, 19937, 37199, 39119, 71993, 91193, 93719, 93911, 99371, 193939, 199933, 319993, 331999, 391939, 393919, 919393, 933199, 939193, 939391, 993319, 999331
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2012

Keywords

Comments

Every cyclic permutation of the digits is a prime, but there exists a non-cyclic permutation of the digits that produces a composite. [Extended by Felix Fröhlich, Aug 05 2018]
The sequence is the relative complement of A317688 in A293663. - Felix Fröhlich, Aug 05 2018
Conjecture: The sequence is finite, with 999331 being the last term (cf. A293142). - Felix Fröhlich, Aug 05 2018

Examples

			197, 719 and 971 are terms of the sequence, because all three numbers are prime, each number can be obtained by cyclically permuting the digits of one of the other numbers and there exist some composites, namely 791 and 917, that can be obtained from non-cyclic permutations of the digits of those three numbers. - _Felix Fröhlich_, Aug 10 2018
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ PrimePi[10^6], Union[d = IntegerDigits[#], {1,3,7,9}] == {1, 3, 7, 9} && AllTrue[ RotateLeft[d, #] & /@ Range@ IntegerLength@ #, PrimeQ@ FromDigits@ # &] && AnyTrue[ FromDigits /@ Permutations[d], CompositeQ] &] (* Giovanni Resta, Aug 10 2018 *)
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
    is_circularprime(n) = my(d=digits(n), r=rot(d)); if(vecmin(d)==0, return(0), while(1, if(!ispseudoprime(eva(r)), return(0)); r=rot(r); if(r==d, return(1))))
    find_index_a(vec) = my(r=#vec-1); while(1, if(vec[r] < vec[r+1], return(r)); r--; if(r==0, return(-1)))
    find_index_b(r, vec) = my(s=#vec); while(1, if(vec[r] < vec[s], return(s)); s--; if(s==r, return(-1)))
    switch_elements(vec, firstpos, secondpos) = my(g); g=vec[secondpos]; vec[secondpos]=vec[firstpos]; vec[firstpos] = g; vec
    reverse_order(vec, r) = my(v=[], w=[]); for(x=1, r, v=concat(v, vec[x])); for(y=r+1, #vec, w=concat(w, vec[y])); w=Vecrev(w); concat(v, w)
    next_permutation(vec) = my(r=find_index_a(vec)); if(r==-1, return(0), my(s=find_index_b(r, vec)); vec=switch_elements(vec, r, s); vec=reverse_order(vec, r)); vec
    is_permutable_prime(n) = if(n < 10, return(1)); my(d=vecsort(digits(n))); while(1, if(!ispseudoprime(eva(d)), return(0)); d=next_permutation(d); if(d==0, return(1)))
    forprime(p=1, , if(is_circularprime(p) && !is_permutable_prime(p), print1(p, ", "))) \\ Felix Fröhlich, Aug 05 2018

Extensions

More terms from Felix Fröhlich, Aug 05 2018
Previous Showing 11-20 of 22 results. Next