|
|
A122961
|
|
Alternately form product and sum of all previous terms.
|
|
2
|
|
|
1, 1, 1, 3, 3, 9, 81, 99, 649539, 649737, 274124633198656977, 274124633199956451, 20598907656583661830059012023854018733151994905840579, 20598907656583661830059012023854019281401261305753481
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Note that definition does not make a(1) a special case; it is the empty product, which is 1. If we started with addition, the sequence would be all zeros.
|
|
LINKS
|
Iain Fox, Table of n, a(n) for n = 1..18
Iain Fox, Table of n, a(n) for n = 1..34
|
|
FORMULA
|
a(1) = a(2) = 1. For n > 1, a(2n-1) = a(2n-3)^2 * a(2n-2), a(2n) = 2 * a(2n-2) + a(2n-1).
|
|
PROG
|
(PARI) first(n) = my(res = vector(n, i, 1)); for(x=4, n, res[x]=if(x%2, prod(i=1, x-1, res[i]), sum(i=1, x-1, res[i]))); res \\ Iain Fox, Oct 29 2018
(PARI) first(n) = my(res = vector(n, i, 1)); for(x=4, n, res[x]=if(x%2, res[x-1]*res[x-2]^2, res[x-1]+2*res[x-2])); res \\ Iain Fox, Oct 29 2018
|
|
CROSSREFS
|
Cf. A039941, A000004, A320603.
Sequence in context: A334774 A257627 A115564 * A165421 A227432 A100731
Adjacent sequences: A122958 A122959 A122960 * A122962 A122963 A122964
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Franklin T. Adams-Watters, Oct 26 2006
|
|
STATUS
|
approved
|
|
|
|