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.
%I A061264 #12 Aug 05 2015 14:12:56 %S A061264 0,1,1,0,1,0,1,0,0,0,2,0,2,1,0,1,2,0,1,1,0,0,1,0,0,0,0,0,1,1,2,1,0,1, %T A061264 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, %U A061264 0,1,2,0,2,1,0,1,0,0,2,0,0,0,1,0,0,0,0,0,1,0,1,1,0,0,1,0,2,1,0,0,2,0,2,1,0 %N A061264 Number of cyclic permutations of the digits of n which give primes. %H A061264 Robert Israel, <a href="/A061264/b061264.txt">Table of n, a(n) for n = 1..10000</a> %e A061264 a(157) = 2 as among the three cyclic permutations 157, 571, 715, two are primes. %p A061264 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 %Y A061264 Cf. A039999. %Y A061264 Cf. A046810. - _R. J. Mathar_, Oct 02 2008 %K A061264 nonn,base %O A061264 1,11 %A A061264 _Amarnath Murthy_, Apr 24 2001 %E A061264 More terms from _R. J. Mathar_, Oct 02 2008 %E A061264 Offset corrected, _Joerg Arndt_, Aug 05 2015