login
A309080
Product minus sum of all previous terms in the sequence, starting with a(1) = 2 and a(2) = 5.
1
2, 5, 3, 20, 570, 341400, 116758458000, 13632577445813641200000, 185847167817698504752014113195034069600000000, 34539169785859790805229099212216829464451540660176789302662465332580254227520000000000000
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
x1 = 2; x2 = 5; p = x1 * x2; s = x1 + x2; x = p - s; A309080 = {x1, x2, x}; Do[p = p * x; s = s + x; x = p - s; AppendTo[A309080, x], {n, 16}]
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
Cf. A123702.
Sequence in context: A285743 A077216 A227617 * A058357 A176613 A097754
KEYWORD
nonn
AUTHOR
STATUS
approved