OFFSET
1,1
COMMENTS
The object is to choose the options so that the most likely outcome is odd; 33 out of the first 50 terms are odd.
Apply[Plus, Table[If[Mod[a0[[n]], 2] == 1, 1, 0], {n, 1, Length[a0]}]].
MATHEMATICA
Clear[a] a[1] = 2; a[2] = 3; a[3] = 5; a[n_] := a[n] = If[Mod[3*a[n - 1] - 3*a[n - 2] + a[n - 3], 2] == 0, If[Mod[2*a[n - 1] - a[n - 2], 3] == 0, 2*a[n - 1] - a[n - 2], 2*a[n - 2] - a[n - 3]], If[Mod[3*a[n - 1] - 3*a[n - 2] + a[n - 3], 3] == 0, 3*a[n - 2] - 3*a[n - 3] + a[n - 4], 3*a[n - 1] - 3*a[n - 2] + a[n - 3]]] a0=Table[a[n], {n, 1, 50}]
CROSSREFS
KEYWORD
tabl,sign
AUTHOR
Roger L. Bagula, Apr 14 2008, Apr 15 2008
STATUS
approved