OFFSET
1,6
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
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]] (* after Michael De Vlieger in A262988 *); Array[Length@f@Prime@# &, 105] (* Robert G. Wilson v, Aug 06 2018 *)
PROG
(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
count_primes(n) = my(d=digits(n), i=0); while(1, if(ispseudoprime(eva(d)), i++); d=rot(d); if(d==digits(n), return(i)))
a(n) = my(p=prime(n)); count_primes(p) \\ Felix Fröhlich, Aug 06 2018
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Felix Fröhlich and Robert G. Wilson v, Aug 06 2018
STATUS
approved