|
|
A137403
|
|
A multiswitched integer differential-type sequence designed to be mostly odd: two types of integer differential sequences are switched in a way that is made odd: 1) a(n)=2*a(n-1)-a(n-2); 2) a(n)=3*a(n-1)-3*a(n-2)+a(n-3); the one back versions are 3) a(n)=2*a(n-2)-a(n-3); 4) a(n)=3*a(n-2)-3*a(n-3)+a(n-4).
|
|
0
|
|
|
2, 3, 5, 4, 3, 3, 3, 4, 3, 5, 2, 7, 12, 17, 17, 22, 27, 27, 27, 22, 27, 17, 32, 7, -18, -43, -43, -68, -93, -93, -93, -68, -93, -43, -118, 7, 132, 257, 257, 382, 507, 507, 507, 382, 507, 257, 632, 7, -618, -1243
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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]}]].
|
|
LINKS
|
|
|
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
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|