login
This site is supported by donations to The OEIS Foundation.

 

Logo

"Email this user" was broken Aug 14 to 9am Aug 16. If you sent someone a message in this period, please send it again.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A039941 Alternately add and multiply. 9
0, 1, 1, 1, 2, 2, 4, 8, 12, 96, 108, 10368, 10476, 108615168, 108625644, 11798392572168192, 11798392680793836, 139202068568601556987554268864512, 139202068568601568785946949658348, 19377215893777651167043206536157390321290709180447278572301746176 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..27

A. V. Aho and N. J. A. Sloane, Some doubly exponential sequences, Fib. Quart., 11 (1973), 429-437.

FORMULA

a(2n) = a(2n-1) + a(2n-2); a(2n+1) = a(2n-1)*a(2n); a(0) = 0; a(1) = 1

a(n) = {a(n-1) + a(n-2), n even, a(n-1)*a(n-2), n odd}; a(0)=0; a(1)=1.

MATHEMATICA

nxt[{n_, a_, b_}]:={n+1, b, If[EvenQ[n], a+b, a*b]}; Join[{0}, Transpose[ NestList[ nxt, {0, 0, 1}, 20]][[3]]] (* Harvey P. Dale, Aug 23 2013 *)

PROG

(PARI) a(n)=if(n<2, n>0, if(n%2, a(n-1)*a(n-2), a(n-1)+a(n-2)))

(Haskell)

a039941 n = a039941_list !! (n-1)

a039941_list = 0 : 1 : zipWith3 ($)

   (cycle [(+), (*)]) a039941_list (tail a039941_list)

-- Reinhard Zumkeller, May 07 2012

CROSSREFS

A001696(n)=A039941(2*n), A001697(n)=A039941(2*n+1).

Cf. A077753

Sequence in context: A123024 A079092 A104700 * A036761 A042979 A000018

Adjacent sequences:  A039938 A039939 A039940 * A039942 A039943 A039944

KEYWORD

easy,nonn,nice

AUTHOR

Walter Carlini

EXTENSIONS

Additional comments from Michael Somos, May 19 2000

One more term from Harvey P. Dale, Aug 23 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified August 18 04:17 EDT 2017. Contains 290684 sequences.