%I #2 Mar 30 2012 17:30:31
%S 1,2,3,4,5,6,11,17,28,39,50,89,139,189,239,378,428,667,906,1284,1712,
%T 2618,3046,3952,5664,6948,9994,12612,15658,18276,28270,35218,50876,
%U 56540,72198,79146,130022,145680,217878,246148,318346,334004,551882
%N a(n) = a(n-1) + a(n - 1 minus the number of terms of a(k) == (mod 6) so far).
%t m[ 1 ] = 1; m[ 2 ] = 2; m[ 3 ] = 3; m[ 4 ] = 4; m[ 5 ] = 5; m[ 6 ] = 6; m[ n_Integer ] := m[ n ] = Block[ {a = b = c = d = e = f = 0}, Do[ Switch[ Mod[ m[ k ], 6 ], 0, a++, 1, b++, 2, c++, 3, d++, 4, e++, 5, f++ ], {k, 1, n - 1} ]; Switch[ Mod[ n, 6 ], 0, m[ n - 1 ] + m[ n - 1 - a ], 1, m[ n - 1 ] + m[ n - 1 - b ], 2, m[ n - 1 ] + m[ n - 1 - c ], 3, m[ n - 1 ] + m[ n - 1 - d ], 4, m[ n - 1 ] + m[ n - 1 - e ], 5, m[ n - 1 ] + m[ n - 1 - f ] ] ]; Table[ m[ n ], {n, 1, 45} ]
%K nonn
%O 1,2
%A _Robert G. Wilson v_, Apr 22 2001