OFFSET
1,1
MATHEMATICA
a = {2, 2}; Do[AppendTo[a, FactorInteger[1 + a[[n - 1]] a[[n - 2]]][[-1, 1]]], {n, 3, 26}]; a (* Michael De Vlieger, Aug 05 2015 *)
nxt[{a_, b_}] := {b, FactorInteger[a*b + 1][[-1, 1]]}; NestList[nxt, {2, 2}, 30][[All, 1]] (* Harvey P. Dale, Aug 03 2018 *)
PROG
(Sage)
def gpf(n):
return (factor(n)[-1])[0]
def A259828vec(m): # m>2=f
f=2
v=[2, 2]
for i in range(f, m):
v.append(gpf(1+v[i-1]*v[i-2]))
return v
(PARI) gpf(n)=my(f=factor(n)[, 1]); f[#f];
first(m)=my(v=vector(m)); v[1]=2; v[2]=2; for(i=3, m, v[i]=gpf(1+v[i-1]*v[i-2])); v;
CROSSREFS
KEYWORD
nonn
AUTHOR
Anders Hellström, Aug 05 2015
EXTENSIONS
Terms a(20)-a(26) from Michael De Vlieger, Aug 05 2015
STATUS
approved