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.

A186283 Least number k such that k*n+1 is a prime dividing 2^n-1.

Original entry on oeis.org

1, 2, 1, 6, 1, 18, 2, 8, 1, 2, 1, 630, 3, 2, 1, 7710, 1, 27594, 2, 6, 1, 2, 10, 24, 105, 9728, 1, 8, 1, 69273666, 8, 18166, 1285, 2, 1, 6, 4599, 2, 1, 326, 1, 10, 2, 14, 1, 50, 2, 90462791808, 5, 2, 1, 120, 1615, 16, 2, 568, 1, 3050, 1, 37800705069076950, 11545611, 2, 4, 126, 1, 2891160, 2, 145690999102, 1
Offset: 2

Views

Author

Bill McEachen, Feb 16 2011

Keywords

Comments

The smallest prime factor of 2^n-1 of the form k*n+1 is A186522(n).
By Fermat's little theorem, a(n) = 1 if and only if n+1 is an odd prime. Further, for prime p, a(p) = 2 if and only if p is in A002515. - Thomas Ordowski, Sep 03 2017

Examples

			For n=8, 2^n-1 = 255 = 3 * 5 * 17.  The smallest prime factor of the form k*n+1 is 17 = 2*8+1. Hence, a(8) = 2.
		

References

  • Kenneth H. Rosen, Elementary Number Theory and Its Applications, 3rd Ed, Theorem 6.12, p. 225

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[2^n-1]; (Select[p, Mod[#1,n] == 1 &, 1][[1]] - 1)/n, {n, 2, 70}]
  • PARI
    a(n) = {if(isprime(n+1),return(1)); my(f = factor(2^n - 1)[,1]); for(i=1,#f, if(f[i]%n == 1, return((f[i]-1) / n)))} \\ David A. Corneth, Sep 03 2017

Formula

a(n) = (A186522(n)-1)/n.