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.

A320523 Smallest m > 1 such that either n^m == n (mod 25) or n^m == 0 (mod 25).

Original entry on oeis.org

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

Views

Author

Marco Ripà, Oct 14 2018

Keywords

Comments

This is a periodic sequence. In fact, a(n) (mod 25) == a(n + k*25) (mod 25), for any k >= 0. The maximum value of a(n) is 21 = lambda(25) + 1 = 20 + 1, since 20 is the Carmichael's lambda value in 25.
This sequence, omitting a(n = 10*k), predicts the convergence speed of any tetration a^^b, for any b >= a > 2, since A317905(n) = 1 iff a(n) > 5 and A317905(n) >= 2 otherwise (for any 2 <= a(n) <= 5).

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.

Crossrefs

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.