|
|
A329681
|
|
a(1)=1, a(2)=2; for n > 2, a(n) = max(sum0, sum1) mod n, where sum0 is the sum of all previous even terms, sum1 is the sum of all previous odd terms.
|
|
1
|
|
|
1, 2, 2, 0, 4, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 5, 9, 17, 7, 12, 10, 8, 6, 4, 2, 0, 32, 28, 18, 33, 30, 18, 32, 19, 14, 23, 18, 31, 26, 0, 42, 30, 4, 1, 46, 33, 26, 45, 38, 12, 16, 24, 40, 11, 2, 58, 44, 14, 18, 26, 42, 5, 64, 47, 36, 61, 50, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For n > 34, sum0 > sum1.
For all n > 140, a(n) = 24.
Indices of zeros: 4, 33, 47, 93.
|
|
LINKS
|
|
|
MATHEMATICA
|
f[s_] := Join[s, {Mod[Max[Total@Select[s, EvenQ], Total@Select[s, OddQ]], Length[s] + 1]}]; Nest[f, {1, 2}, 100] (* Amiram Eldar, Mar 01 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|