Besides Do[If[! MemberQ[{1, 495508}, #], Print[k -> #]] &@ PowerMod[k, 497502, 497503], {k, 3333}] 499->496505 997->496506 998->998 1497->496505 1994->496506 1996->496505 2495->998 2991->496506 2994->998 497503 is the smallest pseudoprime k ⊥ 210 ∋ In[272]:= Mod[{2*265^k, 184^k + 183^k + 163^k}, k] /. k -> 497503 Out[272]= {435159, 435159} "Proof": In[273]:= Block[{d, a = B + C, b = C + A, c = A + B, A = 102, B = 82, C = 81}, d = c + C; Reap[Do[If[! PrimeQ[k] && ! MemberQ[carms, k] && CoprimeQ[k, 210] && Divisible[ 2*PowerMod[d, k, k] - PowerMod[a, k, k] - PowerMod[b, k, k] - PowerMod[c, k, k], k], Sow[{k, d, c, b, a}]], {k, 2, 497504}]]] Out[273]= {Null, {{{497503, 265, 184, 183, 163}}}} --rwg I'm converting to "anticlockwise". Counterclockwise is just the same as clockwise, but restricted to clocks sitting on counters. Or perhaps a counterclock is merely digital, so counterclockwise means showing consecutive numerals, mod 60.