OFFSET
1,1
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
13: when 1 is shifted to last it becomes 31.
MATHEMATICA
fdlQ[n_]:=Module[{c=FromDigits[RotateLeft[IntegerDigits[n]]]}, PrimeQ[c] && c>n]; Select[Prime[Range[300]], fdlQ] (* Harvey P. Dale, Jun 06 2018 *)
PROG
(PHP)
function number_firsttolast($a)
{
$b=str_split($a);
$c=count($b);
for($i=1; $i<$c; $i++)
{
$d=$d.$b[$i];
}
$e=$d.$b[0];
return ($e);
}
(PARI)
move(n)=n=Vec(Str(n)); N=List(); for(i=2, #n, listput(N, n[i])); listput(N, n[1]); return(eval(concat(N)));
forprime(p=2, 1000, if(isprime(move(p))&&move(p)>p, print1(p, ", "))) \\ Edward Jiang, Sep 08 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Shanmuga Subramanian, Sep 08 2014
STATUS
approved