login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of distinct residues of x^n (mod n^3), x=0..n^3-1.
6

%I #11 Aug 23 2023 20:19:08

%S 1,3,7,6,21,8,43,18,55,22,111,20,157,44,147,65,273,56,343,30,105,112,

%T 507,68,501,158,487,110,813,88,931,257,777,274,903,140,1333,344,371,

%U 102,1641,64,1807,280,1155,508,2163,260,2059,502,1911,200,2757,488,483,374,805,814

%N Number of distinct residues of x^n (mod n^3), x=0..n^3-1.

%o (PARI) a(n) = #Set(vector(n^3, x, Mod(x-1,n^3)^n)); \\ _Michel Marcus_, Aug 22 2023

%o (Python)

%o def A365100(n): return len({pow(x,n,n**3) for x in range(n**3)}) # _Chai Wah Wu_, Aug 23 2023

%Y Cf. A195637, A365099, A365101, A365102, A023105, A046631, A365103, A365104.

%K nonn

%O 1,2

%A _Albert Mukovskiy_, Aug 21 2023