The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A332054 Tower of 9's modulo n. 2

%I #6 Mar 04 2020 07:37:58

%S 0,1,0,1,4,3,1,1,0,9,5,9,1,1,9,9,9,9,1,9,15,5,8,9,14,1,0,1,9,9,4,9,27,

%T 9,29,9,1,1,27,9,9,15,11,5,9,31,32,9,15,39,9,1,9,27,49,1,39,9,57,9,34,

%U 35,36,9,14,27,22,9,54,29,12,9,72,1,39,1,71,27

%N Tower of 9's modulo n.

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

%F a(n) = 9^a(A000010(n)) mod n.

%F a(n) = (9^^k) mod n, if n < A246497(k), where ^^ is Knuth's double-arrow notation.

%o (PARI) a(n) = {my(b, c=0, d=n, k=1, x=1); while(k==1, z=x; y=1; b=1; while(z>0, while(y<z, d=eulerphi(d); y++); b=9^b-floor((9^b-1)/d)*d; z=z-1; y=1; d=n); if(c==b, k=0); c=b; x++); b%n; }

%Y Cf. A240162, A245970, A245971, A245972, A245973, A245974, A246497, A332055.

%K nonn

%O 1,5

%A _Jinyuan Wang_, Mar 03 2020

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 June 7 17:05 EDT 2024. Contains 373203 sequences. (Running on oeis4.)