login
A236969
Primes p such that there exist x, y where x + y, x * y and x ^ y == 1 mod p.
1
3, 19, 31, 61, 67, 79, 97, 127, 307, 331, 367, 409, 457, 499, 571, 613, 631, 691, 709, 727, 733, 787, 829, 883, 991, 1063, 1087, 1093, 1213, 1297, 1303, 1327, 1423, 1471, 1549, 1567, 1693, 1699, 1723, 1747, 1777, 1783, 1801, 1987, 2011, 2053, 2083, 2143, 2161
OFFSET
1,1
LINKS
EXAMPLE
26 + 6 = 32 == 1 mod 31.
26 * 6 = 156 == 1 mod 31.
26 ^ 6 = 308915776 == 1 mod 31.
so 31 is in the sequence.
MATHEMATICA
okQ[n_] := Block[{x, y, r}, r = Reduce[x+y == 1 && x*y == 1 , {x, y}, Modulus -> n]; r =!= False && Or @@ ((1 == PowerMod[#[[1]], #[[2]], n]) & /@ ({x, y} /. List@ ToRules@ r))]; Select[Prime@Range@300, okQ] (* Giovanni Resta, Feb 03 2014 *)
PROG
(PARI) okp(p) = {for (x=0, p, for (y=0, p, if ((((x+y) % p)==1) && ((x*y) % p == 1) && (((x^y) % p) == 1), print1("x=", x, " y=", y); return (1)); ); ); return (0);
listp(nn) = {forprime (p=2, nn, if (okp(p), print(" p=", p)); ); } \\ Michel Marcus, Feb 02 2014
CROSSREFS
Cf. A007645.
Sequence in context: A339545 A102978 A218537 * A222590 A107165 A066811
KEYWORD
nonn
AUTHOR
Jon Perry, Feb 02 2014
STATUS
approved