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”).

A332659
Alternate multiplying and adding prime numbers: a(2n) = a(2n-1) + prime(2n+1) and a(2n-1) = a(2n) * prime(2n-2) for n >= 1.
3
6, 11, 77, 88, 1144, 1161, 22059, 22082, 640378, 640409, 23695133, 23695174, 1018892482, 1018892529, 54001304037, 54001304096, 3294079549856, 3294079549923, 233879648044533, 233879648044606, 18476492195523874, 18476492195523957, 1644407805401632173
OFFSET
1,1
EXAMPLE
a(1) = 2 * 3 = 6;
a(2) = 6 + 5 = 11;
a(3) = 11 * 7 = 77.
PROG
(Python)
from sympy import primerange
p = list(primerange(1, 1000))
def a(n):
out = p[0] * p[1]
for i in range(1, n):
if i % 2:
out += p[i + 1]
else:
out *= p[i + 1]
return out
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adnan Baysal, Feb 18 2020
STATUS
approved