OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
179 and 971 are both congruent to 3 (mod 4); 337 and 733 are both congruent to 1 (mod 4).
MATHEMATICA
f[n_] := ToExpression[ StringReverse[ ToString[n]]]; Select[ Range[4000], PrimeQ[f[ # ]] && PrimeQ[ # ] && f[ # ] != # && Mod[ #, 4] == Mod[f[ # ], 4] &];
okQ[n_]:=Module[{rn=FromDigits[Reverse[IntegerDigits[n]]]}, rn!=n&& PrimeQ[ rn] && Mod[n, 4]==Mod[rn, 4]]; Select[Prime[Range[500]], okQ] (* Harvey P. Dale, Dec 19 2010 *)
PROG
(Python)
from sympy import isprime
def ok(n): return isprime(n) and isprime(r:=int(str(n)[::-1])) and r!=n and n%4==r%4
print([k for k in range(3100) if ok(k)]) # Michael S. Branicky, Aug 12 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Lekraj Beedassy, Apr 11 2002
EXTENSIONS
More terms from Jason Earls and Robert G. Wilson v, Apr 14 2002
Offset corrected by Mohammed Yaseen, Aug 11 2023
STATUS
approved