OFFSET
1,2
MATHEMATICA
f[s_] := Join[s, {Mod[Total @ Select[s, EvenQ] * Total @ Select[s, OddQ], Length[s] + 1]}]; Nest[f, {1, 2}, 100] (* Amiram Eldar, Mar 01 2020 *)
PROG
(Python)
a = [1, 2]
s0 = 2
s1 = 1
for n in range(3, 1000):
v = s0 * s1 % n
a.append(v)
if v&1: s1 += v
else: s0 += v
print(a)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Feb 29 2020
STATUS
approved