cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A318623 a(n) = 2^phi(n) mod n.

This page as a plain text file.
%I A318623 #24 Sep 08 2022 08:46:22
%S A318623 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,
%T A318623 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,
%U A318623 16,1,32,1,0,1,34,1,52,1,36,1,64,1,38,1,20,1,40,1
%N A318623 a(n) = 2^phi(n) mod n.
%C A318623 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).
%H A318623 Seiichi Manyama, <a href="/A318623/b318623.txt">Table of n, a(n) for n = 1..10000</a>
%F A318623 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.
%e A318623 a(6) = 2^phi(6) mod 6 = 2^4 mod 6 = 4.
%e A318623 a(18) = 2^phi(18) mod 18 = 2^6 mod 18 = 10.
%t A318623 a[n_] = Mod[2^EulerPhi[n], n]; Array[a, 50] (* _Stefano Spezia_, Sep 01 2018 *)
%t A318623 Table[PowerMod[2,EulerPhi[n],n],{n,80}] (* _Harvey P. Dale_, Nov 07 2021 *)
%o A318623 (PARI) a(n) = lift(Mod(2, n)^(eulerphi(n)))
%o A318623 (Magma) [Modexp(2, EulerPhi(n), n): n in [1..110]]; // _Vincenzo Librandi_, Aug 02 2018
%Y A318623 Cf. A000010, A007663, A245970.
%K A318623 nonn,easy
%O A318623 1,6
%A A318623 _Jianing Song_, Aug 30 2018