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.

A305885 Zeroless composite numbers which become and remain prime under a complete cyclic shift of digits.

Original entry on oeis.org

14, 16, 32, 34, 35, 38, 74, 76, 91, 92, 95, 98, 118, 119, 133, 176, 194, 316, 398, 712, 715, 731, 736, 772, 775, 778, 779, 793, 794, 914, 935, 973, 1118, 1195, 1312, 1336, 1774, 1937, 3112, 3199, 3337, 3379, 3394, 3772, 3992, 7132, 7198, 7318, 7376, 7771, 7912
Offset: 1

Views

Author

Philip Mizzi, Jun 13 2018

Keywords

Comments

Numbers with a zero digit have been excluded as cycling through these numbers would generate leading zeros, which become problematic throughout the cycle.
3999131, 7919777, 37177739 and 391331191 are in this sequence, see the link. - Eric Chen, Jun 14 2018
The sequence contains all composites without the digit zero that can be obtained by cyclically permuting the digits of the terms of A270083. - Felix Fröhlich, Jul 10 2018

Examples

			N_0 = 1118 (composite);
N_1 = 1181 (prime);
N_2 = 1811 (prime);
N_3 = 8111 (prime);
N_4 = N_0 = 1118 (composite).
		

Crossrefs

Programs

  • Maple
    Q[1]:= [seq([i],i=1..9)]:
    for d from 2 to 7 do Q[d]:= map(t -> seq([i,op(t)],i=1..9),Q[d-1]) od:
    Res:= NULL: count:= 0:
    for d from 2 to 7 do
      for q in Q[d] do P[q]:= isprime(add(q[i]*10^(i-1),i=1..d)) od;
      for q in Q[d] do
         if (not P[q]) and andmap(t -> P[ListTools:-Rotate(q,t)],[$1..d-1]) then
           count:= count+1;
           Res:= Res, add(q[i]*10^(i-1),i=1..d);
         fi
      od
    od:
    Res; # Robert Israel, Jul 10 2018
  • Mathematica
    Select[Range[11, 8000], Function[{k, d}, And[CompositeQ@ k, FreeQ[d, 0], AllTrue[Array[FromDigits@ RotateLeft[d, #] &, IntegerLength@ k - 1], PrimeQ]]] @@ {#, IntegerDigits@ #} &] (* Michael De Vlieger, Jun 14 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(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))))
    forcomposite(c=1, 8000, if(is(c), print1(c, ", "))) \\ Felix Fröhlich, Jul 10 2018

Formula

{ A052382 } intersection { A068653 }.
{ A068653 } minus { A011540 }.