OFFSET
2,3
COMMENTS
For clarification: if the largest prime factor occurs more than once, then that prime factor is selected.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..1206
MATHEMATICA
a[n_] := If[PrimeQ[2^n-1], 1, Block[{f = FactorInteger[2^n-1]}, If[f[[-1, 2]] == 1, f[[-2, 1]], f[[-1, 1]]]]]; a /@ Range[2, 52] (* Giovanni Resta, Mar 08 2017 *)
PROG
(PARI) a(n)=my(f=factor(2^n-1), t=#f~); if(f[t, 2]>1, f[t, 1], if(t>1, f[t-1, 1], 1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Mar 08 2017
STATUS
approved