%I #3 Mar 30 2012 17:34:19
%S 3,6,11,16,20,24,28,31,36,41,46,51,56,60,65,70,75,79,84,89,94,99,103,
%T 108,113,118,122,127,132,137,142,146,149,154,158,161,165,168,172,177,
%U 180,185,190,195,199,202,206,211,216,220,224,227,230,235,238,241,246
%N Three-step constructive order sequence.
%C Average=4.32323
%F g[n]=switch between states[0, 1, 2] f[n]=5-Mod[g[n]-g[n-1], 3] a(n) = a[n-1]+f[n]
%e Modeled on construction of twos order sequence for Fibonacci substitution,
%e this construction of an order sequences produces a lower average than the
%e actual tribonacci ones order sequence.
%t beta = x /. NSolve[x^3 - x^2 - x - 1 == 0, x][[3]]; a[1] = 0; a[2] = 4; a[n_] := a[n] = If[Mod[a[n - 1] - a[n - 2], 3] == 0, Ceiling[(n - 1)*beta^3] - 4, If[Mod[a[n - 1] - a[n - 2], 3] == 1, Ceiling[(n-1)*beta] - 1, Ceiling[(n - 1)*beta^2] - 2] ] aa = Table[a[n], {n, 1, 100}]; b = Table[5 - Mod[a[n] - a[n - 1], 3], {n, 2, Length[aa]}]; F[1] = 3; F[n_] := F[n] = F[n - 1] + b[[n]] c = Table[F[n], {n, 1, Length[b] - 1}]
%K nonn,uned
%O 0,1
%A _Roger L. Bagula_, Jun 13 2005