login
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

%I #3 Mar 30 2012 17:34:26

%S 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,

%T -43,-68,-93,-93,-93,-68,-93,-43,-118,7,132,257,257,382,507,507,507,

%U 382,507,257,632,7,-618,-1243

%N 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).

%C The object is to choose the options so that the most likely outcome is odd; 33 out of the first 50 terms are odd.

%C Apply[Plus, Table[If[Mod[a0[[n]], 2] == 1, 1, 0], {n, 1, Length[a0]}]].

%t 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}]

%K tabl,sign

%O 1,1

%A _Roger L. Bagula_, Apr 14 2008, Apr 15 2008