On 2/21/2013 1:59 PM, Hans Havermann wrote:
Start with 0,0,...,0,1 (n-1 0's and a single 1); thereafter the next term is the sum of the previous n terms, modulus 9. The sequence will repeat; for example, n=2: 0, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 0, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 0, 1, Â… (period 24); and n=3: 0, 0, 1, 1, 2, 4, 7, 4, 6, 8, 0, 5, 4, 0, 0, 4, 4, 8, 7, 1, 7, 6, 5, 0, 2, 7, 0, 0, 7, 7, 5, 1, 4, 1, 6, 2, 0, 8, 1, 0, 0, 1, Â… (period 39). Periods can get quite large; for instance, n=24 has period 421900912158 but, empirically, periods for n= one-less-than-powers-of-three & powers-of-three appear to be not only more manageable but surprisingly regular:
{2,3} -> {24,39} {8,9} -> {240,273} {26,27} -> {2184,2271} {80,81} -> {19680,19929} {242,243} -> {177144,177879} {728,729} -> {1594320,1596513} {2186,2187} -> {14348904,14355471} {6560,6561} -> {129140160,129159849} {19682,19683} -> {1162261464,1162320519}
Can anyone come up with an exact formulation for these?
That table can be generated by the formula {3^n - 1, 3^n} -> {3^(2*n+1) - 3, 3^(2*n+1) + 3^(n+1) + 3} for n = 1, ..., 9. -- Fred W. Helenius fredh@ix.netcom.com