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.

A186641 Primes that are not cyclic numbers (A001913).

This page as a plain text file.
%I A186641 #14 Mar 04 2025 04:58:18
%S A186641 2,3,5,11,13,31,37,41,43,53,67,71,73,79,83,89,101,103,107,127,137,139,
%T A186641 151,157,163,173,191,197,199,211,227,239,241,251,271,277,281,283,293,
%U A186641 307,311,317,331,347,349,353,359,373,397,401,409,421,431,439,443,449,457,463,467,479
%N A186641 Primes that are not cyclic numbers (A001913).
%C A186641 Sequence A006559 with 2 and 5 included.
%p A186641 f1 := proc(n) local st, period:
%p A186641 st := ithprime(n):
%p A186641 period := numtheory[order](10,st):
%p A186641 if (st-1 <> period) then
%p A186641    RETURN(st):
%p A186641 fi: end:  seq(f1(n), n=1..150);
%o A186641 (Python)
%o A186641 from itertools import islice
%o A186641 from sympy import nextprime, n_order
%o A186641 def A186641_gen(startvalue=1): # generator of terms >= startvalue
%o A186641     p = max(startvalue-1,1)
%o A186641     while (p:=nextprime(p)):
%o A186641         if p==2 or p==5 or n_order(10,p)<p-1:
%o A186641             yield p
%o A186641 A186641_list = list(islice(A186641_gen(),20)) # _Chai Wah Wu_, Mar 03 2025
%K A186641 nonn
%O A186641 1,1
%A A186641 _Jani Melik_, Feb 24 2011