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!)
A245974 Tower of 7's mod n. 9

%I #23 Sep 21 2022 04:15:45

%S 0,1,1,3,3,1,0,7,7,3,2,7,6,7,13,7,12,7,7,3,7,13,20,7,18,19,16,7,1,13,

%T 19,23,13,29,28,7,34,7,19,23,26,7,7,35,43,43,37,7,0,43,46,19,11,43,13,

%U 7,7,1,7,43,6,19,7,55,58,13,63,63,43,63,66,7,30

%N Tower of 7's mod n.

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

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

%F a(n) = 7^a(A000010(n)) mod n. For n <= 10, a(n) = (7^7) mod n.

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

%e a(11) = 2, as 7^(7^7) == 7^(7^(7^7)) == 7^(7^(7^(7^7))) == 2 (mod 11).

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

%p A(2):= 1;

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

%t a[n_] := a[n] = Switch[n, 1, 0, 2, 1, _, 7^a[EulerPhi[n]]]~Mod~n;

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Sep 21 2022 *)

%o (Sage)

%o def a(n):

%o if ( n <= 10 ):

%o return 823543%n

%o else:

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

%Y Cf. A240162, A245970, A245971, A245972, A245973.

%K nonn,easy

%O 1,4

%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 09:22 EDT 2024. Contains 371905 sequences. (Running on oeis4.)