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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A318623 a(n) = 2^phi(n) mod n. 3
 0, 0, 1, 0, 1, 4, 1, 0, 1, 6, 1, 4, 1, 8, 1, 0, 1, 10, 1, 16, 1, 12, 1, 16, 1, 14, 1, 8, 1, 16, 1, 0, 1, 18, 1, 28, 1, 20, 1, 16, 1, 22, 1, 12, 1, 24, 1, 16, 1, 26, 1, 40, 1, 28, 1, 8, 1, 30, 1, 16, 1, 32, 1, 0, 1, 34, 1, 52, 1, 36, 1, 64, 1, 38, 1, 20, 1, 40, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 COMMENTS Of course, a(n) = 0 iff n is a power of 2 and a(n) = 1 iff n is an odd number > 1. For other n, let n = 2^t*s, t > 0, s > 1 is an odd number, then a(n) is the unique solution to x == 0 (mod 2^t) and x == 1 (mod s). LINKS Seiichi Manyama, Table of n, a(n) for n = 1..10000 FORMULA If n is a power of 2 then a(n) = 0; if n is an odd number > 1 then a(n) = 1; else, let n = 2^t*s, t > 0, s > 1 is an odd number, then a(n) = n - (s mod 2^t)^2 + 1. EXAMPLE a(6) = 2^phi(6) mod 6 = 2^4 mod 6 = 4. a(18) = 2^phi(18) mod 18 = 2^6 mod 18 = 10. MATHEMATICA a[n_] = Mod[2^EulerPhi[n], n]; Array[a, 50] (* Stefano Spezia, Sep 01 2018 *) Table[PowerMod[2, EulerPhi[n], n], {n, 80}] (* Harvey P. Dale, Nov 07 2021 *) PROG (PARI) a(n) = lift(Mod(2, n)^(eulerphi(n))) (Magma) [Modexp(2, EulerPhi(n), n): n in [1..110]]; // Vincenzo Librandi, Aug 02 2018 CROSSREFS Cf. A000010, A007663, A245970. Sequence in context: A290456 A010639 A035588 * A332055 A073027 A370073 Adjacent sequences: A318620 A318621 A318622 * A318624 A318625 A318626 KEYWORD nonn,easy AUTHOR Jianing Song, Aug 30 2018 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.

Last modified August 2 21:27 EDT 2024. Contains 374875 sequences. (Running on oeis4.)