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.

A116895 Least prime factor of n^n-1.

Original entry on oeis.org

3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 13, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2
Offset: 2

Views

Author

Giovanni Resta, Mar 02 2006

Keywords

Comments

If n is odd then a(n)=2; also, if n is even and not divisible by 3 then a(n)=3. - Zak Seidov, Mar 03 2006

Examples

			6^6-1=5*7*31*43, so a(6)=5.
		

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[GCD[n^n-1, 200! ]][[1,1]], {n, 2, 130}]
  • PARI
    A116895(n) = { my(k=(n^n)-1); forprime(p=2, ,if(!(k%p),return(p))); }; \\ Antti Karttunen, Dec 19 2018