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!)
A245971 Tower of 4s mod n. 9
0, 0, 1, 0, 1, 4, 4, 0, 4, 6, 4, 4, 9, 4, 1, 0, 1, 4, 9, 16, 4, 4, 3, 16, 21, 22, 13, 4, 24, 16, 4, 0, 4, 18, 11, 4, 34, 28, 22, 16, 37, 4, 41, 4, 31, 26, 17, 16, 11, 46, 1, 48, 47, 40, 26, 32, 28, 24, 45, 16, 57, 4, 4, 0, 61, 4, 55, 52, 49, 46, 50, 40, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
a(n) = (4^(4^(4^(4^(4^ ... ))))) mod n, provided sufficient 4s are in the tower such that adding more doesn't affect the value of a(n).
LINKS
Wayne VanWeerthuizen, Table of n, a(n) for n = 1..10000
PROG
(Sage)
def tower4mod(n):
if n <= 10:
return 256%n
else:
ep = euler_phi(n)
return power_mod(4, ep+tower4mod(ep), n)
[tower4mod(n) for n in range(1, 30)]
(Haskell)
import Math.NumberTheory.Moduli (powerMod)
a245971 n = powerMod 4 (phi + a245971 phi) n
where phi = a000010 n
-- Reinhard Zumkeller, Feb 01 2015
CROSSREFS
Sequence in context: A290799 A155836 A337398 * A279365 A164613 A104794
KEYWORD
nonn,easy
AUTHOR
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 19 05:19 EDT 2024. Contains 371782 sequences. (Running on oeis4.)