OFFSET
1,11
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(157) = 2 as among the three cyclic permutations 157, 571, 715, two are primes.
MAPLE
A055642 := proc(n) max(1, ilog10(n)+1) ; end: A061264 := proc(n) local ncyc, s, dgs, a, L, i ; a := 0 ; dgs := convert(n, base, 10) ; ncyc := n ; for s from 1 to A055642(n) do if isprime(ncyc) then a := a+1 ; fi; L := ListTools[Rotate](dgs, s) ; ncyc := add(op(i, L)*10^(i-1), i=1..nops(L)) ; od: RETURN(a) ; end: for n from 1 to 120 do printf("%d, ", A061264(n)) ; od: # R. J. Mathar, Oct 02 2008
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 24 2001
EXTENSIONS
More terms from R. J. Mathar, Oct 02 2008
Offset corrected, Joerg Arndt, Aug 05 2015
STATUS
approved