A320523 Smallest m > 1 such that either n^m == n (mod 25) or n^m == 0 (mod 25).
2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2, 2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2, 2, 21, 21, 11, 2, 6, 5, 21, 11, 2, 6, 21, 21, 11, 2, 6, 21, 5, 11, 2, 6, 21, 21, 3, 2
Offset: 1
Examples
For n = 41, a(41) = a(16) = 6, since 16^6 mod 25 = 16.
References
- M. Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011. ISBN 978-88-6178-789-6.
Links
- J. Jimenez Urroz and J. Luis A. Yebra, On the equation a^x == x (mod b^n), J. Int. Seq. 12 (2009) #09.8.8.
- M. Ripà, On the Convergence Speed of Tetration, ResearchGate (2018).
- M. Ripà, On the Convergence Speed of Tetration, viXra (2018).
- Wikipedia, Charmichael function
- Wikipedia, Tetration
- Wikipedia, Euler's totient function
Programs
-
Mathematica
With[{k = 25}, Table[If[Mod[n, 5] == 0, 2, SelectFirst[Range[2, CarmichaelLambda@ k + 1], PowerMod[n, #, k] == Mod[n, k] &]], {n, 75}]] (* Michael De Vlieger, Oct 15 2018 *)
-
PARI
a(n) = {my(m=2); while ((Mod(n, 25)^m != n) && (Mod(n, 25)^m != 0), m++); m;} \\ Michel Marcus, Oct 16 2018
Formula
For any k >= 0,
a( 1 + k*25) = 2;
a( 2 + k*25) = 21;
a( 3 + k*25) = 21;
a( 4 + k*25) = 11;
a( 5 + k*25) = 2;
a( 6 + k*25) = 6;
a( 7 + k*25) = 5;
a( 8 + k*25) = 21;
a( 9 + k*25) = 11;
a(10 + k*25) = 2;
a(11 + k*25) = 6;
a(12 + k*25) = 21;
a(13 + k*25) = 21;
a(14 + k*25) = 11;
a(15 + k*25) = 2;
a(16 + k*25) = 6;
a(17 + k*25) = 21;
a(18 + k*25) = 5;
a(19 + k*25) = 11;
a(20 + k*25) = 2;
a(21 + k*25) = 6;
a(22 + k*25) = 21;
a(23 + k*25) = 21;
a(24 + k*25) = 3;
a(25*(k + 1))= 2.
Comments