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.

A187023 a(n) is the smallest prime factor of n^n-1 having the form k*n+1.

Original entry on oeis.org

3, 13, 5, 11, 7, 29, 17, 19, 11, 15797, 13, 53, 7027567, 61, 17, 10949, 19, 109912203092239643840221, 41, 43, 23, 461, 73, 101, 937, 109, 29, 59, 31, 568972471024107865287021434301977158534824481, 257, 67, 103, 281, 37, 149, 191, 157, 41
Offset: 2

Views

Author

Michel Lagneau, Mar 02 2011

Keywords

Comments

The values of k are in A187025.

Examples

			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.
		

Crossrefs

Programs

  • 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
  • Mathematica
    Table[p=First/@FactorInteger[n^n-1]; Select[p, Mod[#1, n] == 1 &, 1][[1]], {n, 2, 40}]