OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..600
EXAMPLE
a(3) = 121921 is a term because it and its reversal 129121 are distinct primes, 121921 mod (1+2+1+9+2+1) = 129121 mod (1+2+9+1+2+1) = 1, 121921^2 = 14864730241 with sum of digits 40, 129121^2 = 16672232641 also with sum of digits 40, 121921^2 mod 40 = 1 and 129121^2 mod 40 = 1.
MAPLE
filter:= proc(n) local L, i, r, s;
if not isprime(n) then return false fi;
L:= convert(n, base, 10);
r:= add(L[-i]*10^(i-1), i=1..nops(L));
if r = n or not isprime(r) then return false fi;
s:= convert(L, `+`);
n mod s = 1 and r mod s = 1 and n^2 mod convert(convert(n^2, base, 10), `+`)=1 and r^2 mod convert(convert(r^2, base, 10), `+`)=1
end proc:
select(filter, [seq(i, i=3..10^7, 2)]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Sep 08 2022
STATUS
approved