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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A342176 Tower of primes modulo n: a(n) = (2^3^5^7^ ... ^prime(n)) mod n. 0
 0, 0, 2, 0, 3, 2, 1, 0, 8, 8, 8, 8, 8, 8, 8, 0, 8, 8, 18, 8, 8, 8, 2, 8, 8, 8, 26, 8, 26, 8, 8, 0, 8, 8, 8, 8, 6, 18, 8, 8, 8, 8, 32, 8, 8, 2, 7, 32, 29, 8, 8, 8, 18, 26, 8, 8, 56, 26, 42, 8, 8, 8, 8, 0, 8, 8, 58, 8, 2, 8, 18, 8, 1, 6, 8, 56 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS a(n) = 0 iff n is a power of 2. LINKS EXAMPLE a(1) = 0 = 2 mod 1. a(2) = 0 = 2^3 mod 2. a(3) = 2 = 2^3^5 = 2^243 = 2 mod 3. PROG (PARI) { a(n, m=n, s=2) = local(g); if(s==prime(n), return(n%m)); g=s^valuation(m, s); m\=g; lift(chinese(Mod(0, g), Mod(s, m)^a(n, eulerphi(m), nextprime(s+1)) )) } CROSSREFS Cf. A000040. Sequence in context: A194354 A156776 A292108 * A325195 A026728 A241556 Adjacent sequences:  A342173 A342174 A342175 * A342177 A342178 A342179 KEYWORD nonn AUTHOR Peter Schorn, Mar 04 2021 STATUS approved

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

Last modified January 27 11:16 EST 2022. Contains 350607 sequences. (Running on oeis4.)