%I #30 Oct 23 2023 02:23:14
%S 2,3,5,7,17,59,167,821,2539,1042259,508903,5765312303,1461701,
%T 1404527126434567,2034580216153,97552206663238517,3105563257,
%U 46137561830961960349,9777395920402541,6719860896292085951563127,5367788603966004659,33011914147
%N a(n) is the greatest prime factor of a(n-2)*a(n-1)-1.
%H Tyler Busby, <a href="/A034970/b034970.txt">Table of n, a(n) for n = 0..35</a> (terms 0..34 from Sami Liedes)
%p with(numtheory):
%p a:= proc(n) option remember; `if`(n<2, n+2,
%p max(factorset(a(n-2)*a(n-1)-1)[]))
%p end:
%p seq(a(n), n=0..22); # _Alois P. Heinz_, Feb 03 2014
%t a[0] = 2; a[1] = 3; a[n_] := a[n] = FactorInteger[ a[n-2]*a[n-1] - 1][[-1, 1]]; Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Mar 09 2012 *)
%t nxt[{a_,b_}]:={b,FactorInteger[a*b-1][[-1,1]]}; Transpose[NestList[nxt,{2,3},25]][[1]] (* _Harvey P. Dale_, Apr 05 2014 *)
%o (PARI) A034970(a,b) = {local(f);f=factor(a*b-1);f[matsize(f)[1],1]}
%o a=2;b=3;print(a);print(b)
%o for(n=2,28,c=A034970(a,b);print(c);a=b;b=c)
%o (Haskell)
%o a034970 n = a034970_list !! n
%o a034970_list = 2 : 3 : (map (a006530 . (subtract 1)) $
%o zipWith (*) a034970_list $ tail a034970_list)
%o -- _Reinhard Zumkeller_, Feb 23 2012
%Y Cf. A006530, A031441.
%K nonn,easy,nice
%O 0,1
%A _Erich Friedman_.
%E More terms from _James A. Sellers_
%E Terms corrected by _Michael B. Porter_, Mar 14 2010