A014117 Numbers n such that m^(n+1) == m (mod n) holds for all m.
1, 2, 6, 42, 1806
Offset: 1
Links
- M. A. Alekseyev, J. M. Grau, and A. M. Oller-Marcen. Computing solutions to the congruence 1^n + 2^n + ... + n^n == p (mod n). Discrete Applied Mathematics, 2018. doi:10.1016/j.dam.2018.05.022 arXiv:1602.02407 [math.NT], 2016-2018.
- John H. Castillo and Jhony Fernando Caranguay Mainguez, The set of k-units modulo n, arXiv:1708.06812 [math.NT], 2017.
- Yongyi Chen and Tae Kyu Kim, On Generalized Carmichael Numbers, arXiv:2103.04883 [math.NT], 2021.
- J. Dyer-Bennet, A Theorem in Partitions of the Set of Positive Integers, Amer. Math. Monthly, 47(1940) pp. 152-4.
- L. Halbeisen and N. Hungerbühler, On generalised Carmichael numbers, Hardy-Ramanujan Society, 1999, 22 (2), pp.8-22. (hal-01109575)
- J. M. Grau, A. M. Oller-Marcen, and Jonathan Sondow, On the congruence 1^m + 2^m + ... + m^m == n (mod m) with n|m, arXiv 1309.7941 [math.NT], 2013; Monatsh. Math., 177 (2015), 421-436.
- B. C. Kellner, The equation denom(B_n) = n has only one solution, preprint 2005.
- Don Reble, A014117 and related OEIS sequences (shows there are no other terms)
- Jonathan Sondow and K. MacMillan, Reducing the Erdos-Moser equation 1^n + 2^n + … + k^n = (k+1)^n modulo k and k^2, arXiv:1011.2154 [math.NT], 2010; see Prop. 2; Integers, 11 (2011), article A34.
- Eric Weisstein's World of Mathematics, Bernoulli Number
- D. Zagier, Problems posed at the St Andrews Colloquium, 1996
Crossrefs
Programs
-
Mathematica
r[n_] := Reduce[ Mod[m^(n+1) - m, n] == 0, m, Integers]; ok[n_] := Range[n]-1 === Simplify[ Mod[ Flatten[ m /. {ToRules[ r[n][[2]] ]}], n], Element[C[1], Integers]]; ok[1] = True; A014117 = {}; Do[ If[ok[n], Print[n]; AppendTo[ A014117, n] ], {n, 1, 2000}] (* Jean-François Alcover, Dec 21 2011 *) Select[Range@ 2000, Function[n, Times @@ Boole@ Map[Function[m, PowerMod[m, n + 1, n] == Mod[m, n]], Range@ n] > 0]] (* Michael De Vlieger, Dec 30 2016 *)
-
Python
[n for n in range(1, 2000) if all(pow(m, n+1, n) == m for m in range(n))] # David Radcliffe, May 29 2025
Formula
For n <= 5, a(n) = a(n-1)^2 + a(n-1) with a(0) = 1. - Raphie Frank, Nov 12 2012
Comments