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

A344626 Primes p such that exactly two numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

13, 17, 31, 37, 71, 73, 79, 97, 101, 103, 107, 127, 149, 157, 163, 173, 181, 191, 271, 277, 307, 313, 317, 331, 359, 367, 379, 397, 419, 479, 491, 571, 577, 593, 617, 631, 673, 701, 709, 727, 739, 757, 761, 787, 797, 811, 839, 877, 907, 911, 937, 941, 947, 977
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 2 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344627 (k=3), A344628 (k=4), A344629 (k=5), A344630 (k=6), A344631 (k=7), A344632 (k=8).

Programs

  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==2, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344627 Primes p such that exactly three numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

113, 131, 197, 199, 311, 337, 373, 719, 733, 919, 971, 991, 1031, 1091, 1097, 1103, 1109, 1123, 1181, 1213, 1231, 1279, 1297, 1301, 1319, 1327, 1579, 1777, 1811, 1873, 1913, 1949, 1951, 1979, 1987, 1993, 2131, 2311, 2377, 2399, 2713, 2791, 2939, 2971, 3011
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 3 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344628 (k=4), A344629 (k=5), A344630 (k=6), A344631 (k=7), A344632 (k=8).

Programs

  • Mathematica
    Select[Prime[Range[500]],Total[Boole[PrimeQ[FromDigits/@ Table[ RotateRight[ IntegerDigits[#],n],{n,IntegerLength[#]}]]]]==3&] (* Harvey P. Dale, Mar 30 2023 *)
  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==3, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344628 Primes p such that exactly four numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

1193, 1931, 3119, 3779, 7793, 7937, 9311, 9377, 11393, 11701, 11717, 11743, 13177, 13931, 13997, 16993, 17011, 17117, 17431, 17539, 17713, 19717, 19997, 21737, 23339, 23773, 30197, 31139, 31699, 31771, 32377, 33923, 37217, 38197, 39233, 39499, 39799, 39971
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 4 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344629 (k=5), A344630 (k=6), A344631 (k=7), A344632 (k=8).

Programs

  • Mathematica
    Select[Prime[Range[4500]],Count[FromDigits/@Table[RotateRight[IntegerDigits[#],d],{d,IntegerLength[ #]}],?PrimeQ]==4&] (* _Harvey P. Dale, Aug 31 2024 *)
  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==4, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344629 Primes p such that exactly five numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

11939, 19391, 19937, 37199, 39119, 71993, 91193, 93719, 93911, 99371, 103391, 103997, 107119, 110339, 111893, 111919, 113123, 113177, 113983, 114997, 117133, 117319, 117353, 117701, 118931, 119107, 119179, 119191, 119699, 123113, 127733, 129919, 131231, 131771
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 5 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344628 (k=4), A344630 (k=6), A344631 (k=7), A344632 (k=8).

Programs

  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==5, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344630 Primes p such that exactly six numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

193939, 199933, 319993, 331999, 391939, 393919, 919393, 933199, 939193, 939391, 993319, 999331, 1313999, 1317727, 1399913, 1731893, 1743737, 1772713, 1893173, 1977779, 2713177, 3139991, 3173189, 3177271, 3189317, 3717437, 4373717, 7174373, 7271317, 7318931
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 6 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344628 (k=4), A344629 (k=5), A344631 (k=7), A344632 (k=8).

Programs

  • Mathematica
    Select[Prime[Range[500000]],Total[Boole[PrimeQ[FromDigits/@Table[RotateRight[IntegerDigits[#],n],{n,0,IntegerLength[ #]-1}]]]]==6&] (* Harvey P. Dale, Sep 22 2024 *)
  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==6, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344631 Primes p such that exactly seven numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

17773937, 39371777, 71777393, 73937177, 77393717, 77739371, 93717773, 101717933, 101793137, 111766999, 111897767, 113379997, 113719261, 113773021, 113913133, 117669991, 118977671, 119307977, 119937137, 123975113, 131239751, 131331139, 131473193, 133113913
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 7 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344628 (k=4), A344629 (k=5), A344630 (k=6), A344632 (k=8).

Programs

  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==7, 1, 0)
    forprime(p=1, 1e3, if(is(p), print1(p, ", ")))

A344632 Primes p such that exactly eight numbers among all circular permutations of the digits of p are prime.

Original entry on oeis.org

119139133, 133119139, 139133119, 191391331, 311913913, 331191391, 913311913, 913913311, 1013517313, 1033939939, 1039191919, 1112795317, 1113194339, 1117923797, 1127953171, 1131943391, 1139937913, 1173917197, 1179237971, 1279531711, 1310135173, 1311399379
Offset: 1

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Crossrefs

Cf. A270083. Row 8 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344628 (k=4), A344629 (k=5), A344630 (k=6), A344631 (k=7).

Programs

  • PARI
    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
    eva(n) = subst(Pol(n), x, 10)
    is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==8, 1, 0)
    forprime(p=1, , if(is(p), print1(p, ", ")))

A247153 a(n) = smallest prime p for which cyclic digit shifts produce exactly n different primes, or 0 if no such p exists for n.

Original entry on oeis.org

2, 13, 113, 1193, 11939, 193939, 17773937, 119139133, 111133719913, 111119917373, 111393733793, 1117739771979737
Offset: 1

Views

Author

Felix Fröhlich, Nov 21 2014

Keywords

Comments

a(n) is equal to the smallest n-digit non-repunit prime in A016114, unless no n-digit non-repunit prime exists in A016114. In that case, the number of digits of a(n), if it exists, must be > n.
From David A. Corneth, Aug 06 2018: (Start)
Do we have leading digit of a(n) <= any digit from a(n)?
For n > 1, can a(n) contain a digit d with gcd(10, d) > 1? (End)
Smallest prime p such that A262988(p) = n. - Felix Fröhlich, Aug 06 2018

Crossrefs

Cf. A016114, A262988. This is column 1 of A317716.

Extensions

a(7)-a(8) from P. De Geest's website added by Felix Fröhlich, Nov 26 2014
a(9)-a(12) from Robert G. Wilson v, Aug 06 2018

A317756 Number of distinct primes obtained by cyclically shifting the decimal digits of the n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 2, 2, 2, 3, 1, 1, 1, 2, 2, 3, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Keywords

Comments

First occurrence of k, k=1,2,3,...: 2, 13, 113, 1193, 11939, 193939, 17773937, 119139133, ..., . A247153.
a(n) is equal to the row index of prime(n) in A317716.
Every positive integer occurs in this sequence if and only if A247153(i) != 0 for every i >= 1.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{len = IntegerLength@n, s = {n}}, Do[AppendTo[s, FromDigits@RotateRight@IntegerDigits@s[[k - 1]]], {k, 2, len}]; DeleteDuplicates@Select[s, PrimeQ]] (* after Michael De Vlieger in A262988 *); Array[Length@f@Prime@# &, 105] (* Robert G. Wilson v, Aug 06 2018 *)
    Table[Count[Union[FromDigits/@Table[RotateRight[IntegerDigits[p],n],{n,IntegerLength[p]}]],?PrimeQ],{p,Prime[Range[120]]}] (* _Harvey P. Dale, Jan 18 2025 *)
  • 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
    count_primes(n) = my(d=digits(n), i=0); while(1, if(ispseudoprime(eva(d)), i++); d=rot(d); if(d==digits(n), return(i)))
    a(n) = my(p=prime(n)); count_primes(p) \\ Felix Fröhlich, Aug 06 2018

Formula

a(n) = A262988(A000040(n)).
Showing 1-9 of 9 results.