login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A259828
a(1)=a(2)=2; thereafter, a(n)=gpf(1+a(n-1)a(n-2)), where gpf is greatest prime factor.
1
2, 2, 5, 11, 7, 13, 23, 5, 29, 73, 353, 859, 8423, 92761, 856717, 126948763, 122613509, 2102184467, 2530079, 2659346387041447, 334098941853251, 148080802321968921649521449033, 6863460080030077, 1678153631189331624730247, 7109839787546601453693131222417760271, 5808110138398623777046165714073
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
Sequence in context: A233018 A209100 A208864 * A366094 A104080 A375317
KEYWORD
nonn
AUTHOR
Anders Hellström, Aug 05 2015
EXTENSIONS
Terms a(20)-a(26) from Michael De Vlieger, Aug 05 2015
STATUS
approved