login
A034970
a(n) is the greatest prime factor of a(n-2)*a(n-1)-1.
2
2, 3, 5, 7, 17, 59, 167, 821, 2539, 1042259, 508903, 5765312303, 1461701, 1404527126434567, 2034580216153, 97552206663238517, 3105563257, 46137561830961960349, 9777395920402541, 6719860896292085951563127, 5367788603966004659, 33011914147
OFFSET
0,1
LINKS
Tyler Busby, Table of n, a(n) for n = 0..35 (terms 0..34 from Sami Liedes)
MAPLE
with(numtheory):
a:= proc(n) option remember; `if`(n<2, n+2,
max(factorset(a(n-2)*a(n-1)-1)[]))
end:
seq(a(n), n=0..22); # Alois P. Heinz, Feb 03 2014
MATHEMATICA
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 *)
nxt[{a_, b_}]:={b, FactorInteger[a*b-1][[-1, 1]]}; Transpose[NestList[nxt, {2, 3}, 25]][[1]] (* Harvey P. Dale, Apr 05 2014 *)
PROG
(PARI) A034970(a, b) = {local(f); f=factor(a*b-1); f[matsize(f)[1], 1]}
a=2; b=3; print(a); print(b)
for(n=2, 28, c=A034970(a, b); print(c); a=b; b=c)
(Haskell)
a034970 n = a034970_list !! n
a034970_list = 2 : 3 : (map (a006530 . (subtract 1)) $
zipWith (*) a034970_list $ tail a034970_list)
-- Reinhard Zumkeller, Feb 23 2012
CROSSREFS
Sequence in context: A231480 A040149 A168034 * A048417 A071710 A048403
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers
Terms corrected by Michael B. Porter, Mar 14 2010
STATUS
approved