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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320603 a(0) = 1; if n is odd, a(n) = Product_{i=0..n-1} a(i); if n is even, a(n) = Sum_{i=0..n-1} a(i). 2
1, 1, 2, 2, 6, 24, 36, 20736, 20808, 8947059130368, 8947059171984, 716210897494804754044764041567551881216, 716210897494804754044764059461670225184 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Next term is too large to include.

Odd terms are the product of previous terms and even terms are the sum of previous terms.

LINKS

Iain Fox, Table of n, a(n) for n = 0..18

Iain Fox, Table of n, a(n) for n = 0..32

FORMULA

a(n) = a(n-1) + 2*a(n-2), for even n > 2.

a(n) = a(n-1) * a(n-2)^2, for odd n > 1.

EXAMPLE

5 is odd, so a(5) = 1 * 1 * 2 * 2 * 6 = 24.

6 is even, so a(6) = 1 + 1 + 2 + 2 + 6 + 24 = 36.

MATHEMATICA

a[0]:= 1; a[n_]:= If[OddQ[n], Product[a[j], {j, 0, n-1}], Sum[a[j], {j, 0, n -1}]]; Table[a[n], {n, 0, 15}] (* G. C. Greubel, Oct 19 2018 *)

PROG

(PARI) first(n) = my(res = vector(n, i, 1)); for(x=3, n, res[x]=if(x%2, sum(i=1, x-1, res[i]), prod(i=1, x-1, res[i]))); res

(PARI) first(n) = my(res = vector(n, i, 1)); res[3]++; for(x=4, n, res[x]=if(x%2, res[x-1]+2*res[x-2], res[x-1]*res[x-2]^2)); res

CROSSREFS

Cf. A039941, A077753, A122961.

Sum of previous terms: A011782.

Product of previous terms: A165420.

Sequence in context: A143084 A188962 A076741 * A276409 A093453 A301381

Adjacent sequences:  A320600 A320601 A320602 * A320604 A320605 A320606

KEYWORD

nonn

AUTHOR

Iain Fox, Oct 17 2018

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 18 18:52 EDT 2019. Contains 324215 sequences. (Running on oeis4.)