login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245972 Tower of 5s mod n. 9

%I #24 Jul 25 2022 04:03:06

%S 0,1,2,1,0,5,3,5,2,5,1,5,5,3,5,5,14,11,6,5,17,1,5,5,0,5,2,17,9,5,25,

%T 21,23,31,10,29,35,25,5,5,9,17,28,1,20,5,23,5,45,25,14,5,51,29,45,45,

%U 44,9,48,5,14,25,38,53,5,23,5,65,5,45,1,29,34,35,50

%N Tower of 5s mod n.

%C a(n) = (5^(5^(5^(5^(5^ ... ))))) mod n, provided sufficient 5s are in the tower such that adding more doesn't affect the value of a(n).

%H Wayne VanWeerthuizen, <a href="/A245972/b245972.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 5^a(A000010(n)) mod n. For n<=18, a(n)=(5^5) mod n.

%e a(2) = 1, as 5^X is odd for any whole number X.

%e a(19) = 6, as 5^(5^5) == 5^(5^(5^5)) == 5^(5^(5^(5^5))) == 6 (mod 19).

%p A:= proc(n) option remember; 5 &^ A(numtheory:-phi(n)) mod n end proc:

%p A(2):= 1;

%p seq(A(n), n=2..100);

%t a[n_] := a[n] = PowerMod[5, If[n <= 18, 5, a[EulerPhi[n]]], n];

%t Array[a, 100] (* _Jean-François Alcover_, Jul 25 2022 *)

%o (Sage)

%o def a(n):

%o if ( n <= 18 ):

%o return 3125%n

%o else:

%o return power_mod(5,a(euler_phi(n)),n)

%Y Cf. A000010, A240162, A245970, A245971, A245973, A245974.

%K nonn,easy

%O 1,3

%A _Wayne VanWeerthuizen_, Aug 08 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)