OFFSET
1,1
FORMULA
a(k) = 0 for k >= 85. - Jinyuan Wang, Aug 26 2019
5 is one of the first starting values that produces rather long sequence until collapses to zero.
MATHEMATICA
a[1] = 5; a[n_] := a[n] = Mod[a[n - 1] * (n - 1), a[n - 1] + n - 1]; Array[a, 100] (* Amiram Eldar, Aug 29 2019 *)
PROG
(Python)
def k(a, b):
return (a*b)%(a+b)
a = [5]
for n in range(1, 100):
a.append(k(a[-1], n))
print(a)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefan Gog, Aug 23 2019
STATUS
approved