cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A373901 Numbers m such that (m - k)^k modulo m is not equal to positive k <= m.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 22 2024

Keywords

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.

Examples

			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.
		

Crossrefs

Supersequence of A151821.

Programs

  • 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