%I #21 Jun 06 2018 14:01:27
%S 13,17,37,79,113,127,131,149,157,163,181,191,197,199,337,359,367,373,
%T 787,797,1117,1123,1129,1151,1153,1181,1187,1193,1201,1213,1231,1237,
%U 1259,1279,1297,1301,1319,1327,1367,1409,1423,1427,1439,1459,1483,1487,1493
%N Prime numbers p with property that when the first digit is shifted to the last digit, we obtain a prime greater than p.
%H Jens Kruse Andersen, <a href="/A246944/b246944.txt">Table of n, a(n) for n = 1..10000</a>
%e 13: when 1 is shifted to last it becomes 31.
%t fdlQ[n_]:=Module[{c=FromDigits[RotateLeft[IntegerDigits[n]]]},PrimeQ[c] && c>n]; Select[Prime[Range[300]],fdlQ] (* _Harvey P. Dale_, Jun 06 2018 *)
%o (PHP)
%o function number_firsttolast($a)
%o {
%o $b=str_split($a);
%o $c=count($b);
%o for($i=1;$i<$c;$i++)
%o {
%o $d=$d.$b[$i];
%o }
%o $e=$d.$b[0];
%o return ($e);
%o }
%o (PARI)
%o move(n)=n=Vec(Str(n));N=List();for(i=2,#n,listput(N,n[i]));listput(N,n[1]);return(eval(concat(N)));
%o forprime(p=2,1000,if(isprime(move(p))&&move(p)>p,print1(p,","))) \\ _Edward Jiang_, Sep 08 2014
%Y Cf. A109308.
%K nonn,base
%O 1,1
%A _Shanmuga Subramanian_, Sep 08 2014