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 A187023 #16 May 17 2024 03:18:45 %S A187023 3,13,5,11,7,29,17,19,11,15797,13,53,7027567,61,17,10949,19, %T A187023 109912203092239643840221,41,43,23,461,73,101,937,109,29,59,31, %U A187023 568972471024107865287021434301977158534824481,257,67,103,281,37,149,191,157,41 %N A187023 a(n) is the smallest prime factor of n^n-1 having the form k*n+1. %C A187023 The values of k are in A187025. %H A187023 Amiram Eldar, <a href="/A187023/b187023.txt">Table of n, a(n) for n = 2..138</a> %e A187023 7^7-1 = 2*3*29*4733; the smallest prime divisor of the form k*n+1 is 29 = 4*7+1, hence a(7) = 29. %t A187023 Table[p=First/@FactorInteger[n^n-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 40}] %o A187023 (Magma) A187023:=function(n); for d in PrimeDivisors(n^n-1) do if d mod n eq 1 then return d; end if; end for; return 0; end function; [ A187023(n): n in [2..50] ]; // _Klaus Brockhaus_, Mar 02 2011 %Y A187023 Cf. A187022, A187025. %K A187023 nonn %O A187023 2,1 %A A187023 _Michel Lagneau_, Mar 02 2011