Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A373901
Numbers m such that (m - k)^k modulo m is not equal to positive k <= m.
0
1, 3, 4, 8, 11, 16, 17, 19, 32, 43, 59, 64, 67, 83, 107, 128, 131, 137, 179, 227, 251, 256, 347, 467, 512, 523, 563, 587, 683, 691, 787, 907, 971, 977, 1019, 1024, 1097, 1187, 1259, 1283, 1307, 1459, 1523, 1579, 1619, 1627, 1699, 1723, 1787, 1867, 1907, 1931, 1987, 2027, 2048
OFFSET
1,2
COMMENTS
The odd composite and the even composite terms of this sequence are respectively 3353, 4213, 9233, 10813, ... and all and only powers of 2 >= 4.
EXAMPLE
1 is in this sequence because (1-1)^1 mod 1 = 0 != 1.
3 is in this sequence because
(3-1)^1 mod 3 = 2 != 1,
(3-2)^2 mod 3 = 1 != 2,
(3-3)^3 mod 3 = 0 != 3.
PROG
(Magma) [m : m in [1..2^11] | #[k: k in [1..m] | (m-k)^k mod m eq k] eq 0];
(PARI) isok(m) = for (k=1, m, if ((m - k)^k % m == k, return (0))); return(1); \\ Michel Marcus, Jun 30 2024
CROSSREFS
Supersequence of A151821.
Sequence in context: A287446 A051207 A217755 * A133363 A186423 A156056
KEYWORD
nonn
AUTHOR
STATUS
approved