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.
%I A074792 #25 Feb 20 2024 07:01:51 %S A074792 2,3,4,3,6,5,8,3,4,9,12,5,14,13,16,3,18,5,20,3,4,21,24,5,6,25,4,13,30, %T A074792 11,32,3,34,33,36,5,38,37,16,3,42,5,44,21,16,45,48,5,8,9,52,5,54,5,16, %U A074792 13,7,57,60,7,62,61,4,3,66,23,68,13,70,29,72,5,74,73,16,37,78,17,80,3 %N A074792 Least k > 1 such that k^n == 1 (mod n). %H A074792 Rémy Sigrist, <a href="/A074792/b074792.txt">Table of n, a(n) for n = 1..10000</a> %F A074792 If p is prime a(p)=p+1 and a(2p)=2p-1; if n is in A050384 a(n)=n+1; if n is in A067945 a(n)=3 etc. It seems that sum(k=1, n, a(k)) is asymptotic to c*n^2 with c=0.2... %t A074792 Do[k = 2; While[ !IntegerQ[(k^n - 1)/n], k++ ]; Print[k], {n, 1, 80}] (* _Robert G. Wilson v_ *) %o A074792 (PARI) a(n)=if(n<0,0,s=2; while((s^n-1)%n>0,s++); s) %o A074792 (PARI) a(n)=my(s=2); while(Mod(s,n)^n-1!=0, s++); return(s) \\ _Rémy Sigrist_, Apr 02 2017 %Y A074792 a(n) = {A076944(n)}^(1/n). %Y A074792 Cf. A076942, A076943, A076944. %K A074792 nonn %O A074792 1,1 %A A074792 _Benoit Cloitre_, Sep 07 2002