login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A062097
a(1) = 1; a(n) = sum of the sum and the product of all previous terms.
2
1, 2, 5, 18, 206, 37312, 1383566504, 1914204327753559888, 3664178205741957271429583378492509856, 13426201923434349344563612023870972836592501276745812341399323779519061312
OFFSET
1,2
COMMENTS
The next term has 147 digits. [From Harvey P. Dale, Nov 01 2011]
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..13
FORMULA
For n>=4, a(n) = 2*a(n-1) + a(n-2)*(a(n-1) - 2*a(n-2))*(a(n-1) -1)/(a(n-2) -1). - Leroy Quet, Nov 27 2007
EXAMPLE
a(4)=18 as 18 = {1+2+5} + {1*2*5}, where 1, 2, 5 are the previous terms.
MATHEMATICA
lf[l_List] := Append[l, Plus @@ l + Times @@ l]; Nest[f, {1}, 9] (* Harvey P. Dale, Nov 01 2011 *) and modified by Robert G. Wilson v, Sep 03 2012
PROG
(PARI) A062097(n, s=0, p=1)={for(n=2, n, p*=-s+s+=s+p); p+s} \\ - M. F. Hasler, Sep 03 2012
(Haskell)
a062097 n = a062097_list !! (n-1)
a062097_list = 1 : f 1 1 where
f u v = w : f (u + w) (v * w) where w = u + v
-- Reinhard Zumkeller, Mar 20 2014
CROSSREFS
Cf. A057194.
Sequence in context: A097584 A197855 A289126 * A356366 A323706 A125765
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jun 19 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 19 2001
More terms from Harvey P. Dale, Nov 01 2011
STATUS
approved