OFFSET
1,1
FORMULA
a(n) = Product_{k=1..n-1} a(k) - Sum_{k=1..n-1} a(k) with a(1) = 2, a(2) = 5.
EXAMPLE
a(4) = a(1)*a(2)*a(3) - (a(1) + a(2) + a(3)) = 2*5*3 - (2 + 5 + 3) = 20.
MATHEMATICA
PROG
(Python)
a, n, p, s = [2, 5], 2, 2, 2
while n < 10:
p, s, n = p*a[len(a)-1], s+a[len(a)-1], n+1
a = a+[p-s]
for n in range(1, 11): print(a[n-1], end=', ') # A.H.M. Smeets, Aug 22 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher C. Capobianco, Jul 11 2019
STATUS
approved