A077815 2^phi(n) mod n^2, where phi is Euler's totient function A000010.
0, 2, 4, 4, 16, 4, 15, 16, 64, 16, 56, 16, 40, 64, 31, 0, 222, 64, 58, 256, 127, 56, 392, 256, 451, 40, 433, 176, 30, 256, 187, 0, 958, 800, 841, 208, 38, 780, 586, 1536, 944, 568, 1076, 1200, 91, 392, 2069, 1024, 2157, 1076, 1021, 1600, 1909, 2620, 826, 2752
Offset: 1
Keywords
Examples
a(42) = 2^phi(42) mod 42*42 = 2^phi(2*3*7) mod 1764 = 2^(42*(1-1/2)*(1-1/3)*(1-1/7)) mod 1764 = 2^12 mod 1764 = 4096 mod 1764 = 568.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
PowerMod[2,EulerPhi[#],#^2]&/@Range[60] (* Harvey P. Dale, Dec 04 2021 *)
-
PARI
a(n)=lift(Mod(2,n^2)^eulerphi(n)) \\ Charles R Greathouse IV, Feb 21 2013