OFFSET
1,1
COMMENTS
The concatenation of a number (not divisible by 10) and its reverse is always a multiple of 11.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 727 is a term because 727 is a prime and 11*727 = 7997 is the concatenation of the emirp 79 and its reverse 97.
MAPLE
rev:= proc(n) local L, i;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
f:= proc(n) local r, nr;
if not isprime(n) then return NULL fi;
r:= rev(n);
if r = n or not isprime(r) then return NULL fi;
nr:= (n*10^(1+ilog10(r))+r)/11;
if isprime(nr) then return nr fi;
end proc:
map(f, [seq(i, i=3..100000, 2)]);
MATHEMATICA
cat[n_] := FromDigits@Join[(d = IntegerDigits[n]), Reverse[d]]; Select[(cat /@ Select[Range[5000], ! PalindromeQ[#] && PrimeQ[#] && PrimeQ[IntegerReverse[#]] &])/11, PrimeQ] (* Amiram Eldar, Jun 29 2021 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jun 29 2021
STATUS
approved