OFFSET
1,1
COMMENTS
Each term is composite.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MAPLE
A175459 := proc(n) option remember; if n =1 then 4; else if isprime( procname(n-1)+n) then procname(n-1)*n; else procname(n-1)+n ; end if; end if; end proc:
seq(A175459(n), n=1..120) ; # R. J. Mathar, May 28 2010
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[CompositeQ[a+n+1], a+n+1, a(n+1)]}; NestList[nxt, {1, 4}, 40][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 11 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 20 2010
EXTENSIONS
More terms from R. J. Mathar, May 28 2010
STATUS
approved