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
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, 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, 35, 36, 9, 14, 27, 22, 9, 54, 29, 12, 9, 72, 1, 39, 1, 71, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
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).
LINKS
FORMULA
a(n) = 9^a(A000010(n)) mod n.
a(n) = (9^^k) mod n, if n < A246497(k), where ^^ is Knuth's double-arrow notation.
PROG
(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; }
CROSSREFS
Sequence in context: A354794 A355401 A195596 * A129810 A016500 A211451
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 03 2020
STATUS
approved

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)