OFFSET
0,4
COMMENTS
a(i) and a(j) are relative prime for all i>j>0.
An infinite coprime sequence defined by recursion.
FORMULA
a(n) = (2 * a(n - 1) * a(n - 2)^2 - a(n - 1)^2 * a(n - 4) - a(n - 2)^3 * a(n - 3)) / (a(n - 2) - a(n - 3) * a(n - 4)).
a(n) = b(n) + b(n-1) * a(n-2) where b(n) = A064184(n).
MATHEMATICA
nxt[{a_, b_}]:={b, 1+a/b}; NestList[nxt, {0, 1}, 20][[All, 1]]//Numerator (* Harvey P. Dale, Sep 26 2016 *)
PROG
(PARI) {a(n) = if( n<4, max(0, n) - (n>1), (2 * a(n-1) * a(n-2)^2 - a(n-1)^2 * a(n-4) - a(n-2)^3 * a(n-3)) / (a(n-2) - a(n-3) * a(n-4)))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Dec 21 2001
STATUS
approved