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, ", ")))

A262988 Number of distinct primes, including n if prime, obtained by cyclically shifting the digits of n.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 1, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 0, 2, 1, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Felix Fröhlich, Oct 06 2015

Keywords

Comments

First differs from A039999 at n = 103.
Differs from A061264 iff n is a term of A004022.
a(n) = A055642(n) iff n is a term of A068652, except when n is also in A004022.

Examples

			a(1013) = 2, because of the four cyclic permutations of the digits of 1013 (1013, 131, 1310, 3101) two, namely 1013 and 131, are prime and those two primes are distinct.
		

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]]; Array[ Length@ f@ # &, {87}] (* Michael De Vlieger, Oct 07 2015 *)
  • 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) = x=0; for(k=1, #n, x=x+(n[k]*10^(#n-k))); x
    a(n) = i=0; r=rot(digits(n)); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); i

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, ", ")))

A327822 Numbers k such that when cyclically permuting the digits of k any number of times, any prime obtained is followed by a composite number and vice-versa.

Original entry on oeis.org

14, 16, 19, 20, 23, 29, 30, 32, 34, 35, 38, 41, 43, 47, 50, 53, 59, 61, 67, 70, 74, 76, 83, 89, 91, 92, 95, 98, 1015, 1018, 1070, 1075, 1099, 1132, 1136, 1163, 1216, 1238, 1274, 1303, 1321, 1339, 1361, 1475, 1510, 1517, 1535, 1570, 1574, 1612, 1630, 1631, 1636
Offset: 1

Views

Author

Felix Fröhlich, Sep 26 2019

Keywords

Examples

			When cyclically permuting the digits of 961990 one gets the numbers 961990, 619909, 199096, 990961, 909619, 96199 and these numbers are composite, prime, composite, prime, composite, prime, respectively, so 961990 (and each of these cyclic permutations except 96199) is a term of the sequence.
A more graphical representation:
       961990              C
      /      \           /   \
  096199   619909       P     P
     |        |         |     |
  909619   199096       C     C
      \      /           \   /
       990961              P
		

Crossrefs

Programs

  • 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(n) = my(nn=#Str(n), u=[], v=vector(nn, x, x%2==0), w=vector(nn, x, x%2==1), d=digits(n), r=rot(d)); if(nn%2==1, return(0)); u=concat(u, [ispseudoprime(eva(d))]); u=concat(u, ispseudoprime(eva(r))); while(1, r=rot(r); if(r==d, if(u==v || u==w, return(1)); return(0)); u=concat(u, ispseudoprime(eva(r))))
Showing 1-9 of 9 results.