%I #9 Nov 08 2012 13:45:40
%S 3,3,37,2383,69011,4027
%N Smallest prime p such that n*p is greater than the greatest prime factors of p^n - 1 and of p^n + 1.
%C a(7) > 4000000. - _T. D. Noe_, Nov 08 2012
%e 4027^6 - 1 = 2^3*3^2*7*11*13*19*53*61*229*709*1759*3373,
%e 4027^6 + 1 = 2*5*37*41*1069*1381*1993*9733*9817,
%e and 6*4027 > 3373 and 6*4027 > 9817,
%e 3^1 - 1 = 2, 3^1 + 1 = 2^2 and 3 > 2.
%p A218863 := proc(n)
%p p := 2 ;
%p for i from 1 do
%p max(op(numtheory[factorset](p^n-1))) ;
%p if n*p > % then
%p max(op(numtheory[factorset](p^n+1))) ;
%p if n*p > % then
%p return p;
%p end if;
%p end if;
%p p := nextprime(p) ;
%p end do:
%p end proc: # _R. J. Mathar_, Nov 07 2012
%t Table[p = 2; While[n*p <= FactorInteger[p^n - 1][[-1, 1]] || n*p <= FactorInteger[p^n + 1][[-1, 1]], p = NextPrime[p]]; p, {n, 6}] (* _T. D. Noe_, Nov 07 2012 *)
%K nonn
%O 1,1
%A _Robin Garcia_, Nov 07 2012
|