OFFSET
1,2
EXAMPLE
57 is a term as 157 as well as 571 are primes.
MAPLE
i := 0:for k from 1 to 3200 do if(isprime(1+10*k) and isprime(k+10^(ceil(evalf(log(k+1)/log(10))))*1)) then s[i] := k; i := i+1; end if; end do:q := seq(s[j], j=0..i-1);
MATHEMATICA
p1Q[n_]:=Module[{idn=IntegerDigits[n]}, PrimeQ[FromDigits[Join[{1}, idn]]] && PrimeQ[FromDigits[Join[idn, {1}]]]]; Select[Range[700], p1Q] (* Harvey P. Dale, Jan 23 2013 *)
Flatten@Position[{#+10^IntegerLength@#, 1+10*#}&/@Range@10000, {_?PrimeQ..}] (* Hans Rudolf Widmer, Aug 21 2024 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Mar 02 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 17 2002
STATUS
approved