The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262988 Number of distinct primes, including n if prime, obtained by cyclically shifting the digits of n. 6
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,13
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.
LINKS
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
Sequence in context: A328515 A356682 A323989 * A039999 A069842 A083056
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Oct 06 2015
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 02:59 EDT 2024. Contains 373140 sequences. (Running on oeis4.)