login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest prime factor of 3^n + 1.
19

%I #28 Jul 25 2023 19:33:57

%S 2,2,5,7,41,61,73,547,193,37,1181,661,6481,398581,16493,271,21523361,

%T 1021,530713,101917,42521761,2269,570461,23535794707,769,22996651,

%U 4795973261,19927,647753,5385997,47763361,22434744889,926510094425921

%N Largest prime factor of 3^n + 1.

%H <a href="/A074476/b074476.txt">Table of n, a(n) for n = 0..691</a>

%H S. S. Wagstaff, Jr., <a href="http://www.cerias.purdue.edu/homes/ssw/cun/index.html">The Cunningham Project</a>

%F a(n) = A006530(A034472(n)). - _Amiram Eldar_, Feb 01 2020

%t Table[FactorInteger[3^n + 1][[-1, 1]], {n, 0, 40}] (* _Vincenzo Librandi_, Aug 23 2013 *)

%o (PARI) for(n=0,35, v=factor(3^n+1); print1(v[matsize(v)[1],1],","))

%o (Magma) [Maximum(PrimeDivisors(3^n+1)): n in [0..40]]; // _Vincenzo Librandi_, Aug 23 2013

%Y Cf. A006530, A034472, A074477 (largest prime factor of 3^n - 1), A002587 (largest prime factor of 2^n + 1), A074478 (largest prime factor of 5^n + 1).

%K nonn

%O 0,1

%A _Rick L. Shepherd_, Aug 23 2002

%E Terms to a(100) in b-file from _Vincenzo Librandi_, Aug 23 2013

%E a(101)-a(658) in b-file from _Amiram Eldar_, Feb 01 2020

%E a(659)-a(691) in b-file from _Max Alekseyev_, Apr 25 2022, Jul 25 2023