The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A068653 Composite numbers such that every cyclic shift (other than the number itself) gives a prime. 7
 14, 16, 20, 30, 32, 34, 35, 38, 50, 70, 74, 76, 91, 92, 95, 98, 110, 118, 119, 133, 170, 176, 194, 310, 316, 398, 710, 712, 715, 730, 731, 736, 772, 775, 778, 779, 790, 793, 794, 914, 935, 970, 973, 1118, 1130, 1195, 1312, 1336, 1370, 1774, 1937, 3110, 3112 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Single-digit numbers are excluded. There are only 144 terms up through 10 million. - Harvey P. Dale, Sep 12 2014 LINKS Chai Wah Wu, Table of n, a(n) for n = 1..148 a(n) for n = 1..144 from Harvey P. Dale. EXAMPLE 176 is a term as the two cyclic shifts other than the number itself, 761 and 617, are primes. MATHEMATICA LiQ[n_] := Module[{s=0}, li1=IntegerDigits[n]; k=Length[li1]; t={li1}; Do[li1=RotateLeft[li1]; AppendTo[t, li1], {i, k-1}]; If[Length[Select[Table[FromDigits[p], {p, t}], PrimeQ]] == k-1, s=1]; s]; t1={}; Do[If[!PrimeQ[i] && LiQ[i]==1, AppendTo[t1, i]], {i, 10, 3112}]; t1 (* Jayanta Basu, May 03 2013 *) cppQ[n_]:=Module[{c=FromDigits/@NestList[RotateLeft[#]&, IntegerDigits[n], IntegerLength[ n]-1]}, CompositeQ[c[[1]]]&&AllTrue[Rest[c], PrimeQ]]; Select[ Range[10, 5000], cppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 12 2014 *) PROG (Python) from itertools import product from sympy import isprime A068653_list = [] for l in range(1, 9):     for m in product(('1379' if l > 1 else '123579'), repeat=l):         for d in '0123456789':             s = ''.join(m)+d             n = int(s)             if not isprime(n):                 for k in range(len(s)-1):                     s = s[1:]+s[0]                     if not isprime(int(s)):                         break                 else:                     A068653_list.append(n) # Chai Wah Wu, May 06 2017 CROSSREFS Cf. A003459, A068652. Sequence in context: A176686 A007935 A076055 * A225193 A102616 A291907 Adjacent sequences:  A068650 A068651 A068652 * A068654 A068655 A068656 KEYWORD base,nonn AUTHOR Amarnath Murthy, Feb 28 2002 EXTENSIONS Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 21 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 12 11:51 EDT 2021. Contains 343821 sequences. (Running on oeis4.)