A074477 Largest prime factor of 3^n - 1.
2, 2, 13, 5, 11, 13, 1093, 41, 757, 61, 3851, 73, 797161, 1093, 4561, 193, 34511, 757, 363889, 1181, 368089, 3851, 1001523179, 6481, 391151, 797161, 8209, 16493, 20381027, 4561, 4404047, 21523361, 2413941289, 34511, 2664097031, 530713
Offset: 1
Keywords
Examples
3^7 - 1 = 2186 = 2*1093, so a(7) = 1093.
Links
- Table of n, a(n) for n = 1..690
- S. S. Wagstaff, Jr., The Cunningham Project
Crossrefs
Programs
-
Magma
[Maximum(PrimeDivisors(3^n-1)): n in [1..40]]; // Vincenzo Librandi, Aug 23 2013
-
Maple
A074477 := proc(n) A006530( 3^n-1) ; end proc: # R. J. Mathar, Jul 18 2015 # alternative: a:= n-> max(seq(i[1], i=ifactors(3^n-1)[2])): seq(a(n), n=1..40); # Alois P. Heinz, Jul 18 2015
-
Mathematica
Table[FactorInteger[3^n - 1] [[-1, 1]], {n, 40}] (* Vincenzo Librandi, Aug 23 2013 *)
-
PARI
for(n=1,40, v=factor(3^n-1); print1(v[matsize(v)[1],1],","))
Formula
Extensions
Terms to a(100) in b-file from Vincenzo Librandi, Aug 23 2013
a(101)-a(660) in b-file from Amiram Eldar, Feb 01 2020
a(661)-a(690) in b-file from Max Alekseyev, May 22 2022