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.

A074477 Largest prime factor of 3^n - 1.

This page as a plain text file.
%I A074477 #33 Sep 08 2022 08:45:07
%S A074477 2,2,13,5,11,13,1093,41,757,61,3851,73,797161,1093,4561,193,34511,757,
%T A074477 363889,1181,368089,3851,1001523179,6481,391151,797161,8209,16493,
%U A074477 20381027,4561,4404047,21523361,2413941289,34511,2664097031,530713
%N A074477 Largest prime factor of 3^n - 1.
%H A074477 <a href="/A074477/b074477.txt">Table of n, a(n) for n = 1..690</a>
%H A074477 S. S. Wagstaff, Jr., <a href="http://www.cerias.purdue.edu/homes/ssw/cun/index.html">The Cunningham Project</a>
%F A074477 a(n) = A006530(A024023(n)). - _Michel Marcus_, Jul 18 2015
%e A074477 3^7 - 1 = 2186 = 2*1093, so a(7) = 1093.
%p A074477 A074477 := proc(n)
%p A074477         A006530( 3^n-1) ;
%p A074477 end proc: # _R. J. Mathar_, Jul 18 2015
%p A074477 # alternative:
%p A074477 a:= n-> max(seq(i[1], i=ifactors(3^n-1)[2])):
%p A074477 seq(a(n), n=1..40);  # _Alois P. Heinz_, Jul 18 2015
%t A074477 Table[FactorInteger[3^n - 1] [[-1, 1]], {n, 40}] (* _Vincenzo Librandi_, Aug 23 2013 *)
%o A074477 (PARI) for(n=1,40, v=factor(3^n-1); print1(v[matsize(v)[1],1],","))
%o A074477 (Magma) [Maximum(PrimeDivisors(3^n-1)): n in [1..40]]; // _Vincenzo Librandi_, Aug 23 2013
%Y A074477 Cf. A006530 (largest prime factor), A024023 (3^n-1).
%Y A074477 Cf. A074476 (largest prime factor of 3^n + 1), A005420 (largest prime factor of 2^n - 1), A074479 (largest prime factor of 5^n - 1).
%K A074477 nonn
%O A074477 1,1
%A A074477 _Rick L. Shepherd_, Aug 23 2002
%E A074477 Terms to a(100) in b-file from _Vincenzo Librandi_, Aug 23 2013
%E A074477 a(101)-a(660) in b-file from _Amiram Eldar_, Feb 01 2020
%E A074477 a(661)-a(690) in b-file from _Max Alekseyev_, May 22 2022