Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Periodic Strings
#1
Here's a challenge that requires a little detective work with number sequences.

Suppose you have a string of two one's (11) and cause the string to grow by application of a simple rule: Add the rightmost two digits of the string, and append the sum to the end of the string. Continue this process and you make the string as long as you like. For example, the first few iterations are 11, 112, 1123, 11235, 112358, 11235813, 112358134, etc. Soon it looks like this:1123581347*1123581347*1123581347*1123581347*1123...
The asterisks show that the string is periodic from the beginning with a repeat or period of 10 digits.

Now if you start with three one's (111) and append the sum of the rightmost 3 digits you get:111359171715139131371191*111359171715139131371191*111359171715139131371191*11135917171513...
This string is also periodic from the beginning, this time with a period of 24.

When you use four one's (1111) as the starting string, a curious thing happens. The string does not become periodic until position 26 (shown by **) and has a period of 86.
11114713151071311611917181**7171615131059152081514117131271313815171413917
2010348151815151291719181919201258162091*717161513105915208151411713127131
38151714139172010348151815151291719181919201258162091*71716151310591520815
141171312713138151714139172010348151815151291719181919201258162091*7171615
13105915208151411713127131381517141391720103481518151512917191819192012581
62091*71716151...




THE CHALLENGE:
Find the starting point and period length for string lengths 5 (11111) through 12 (111111111111).



The 9 length string appears to be a particularly tough one. I could not find any periodicity in this sequence. I looked far enough to get "out of string space" errors in my QBasic application. It seems unlikely, however, that such a simple rule would create a sequence that doesn't eventually result in some pattern. Here are the first 1000 digits of the 9-string:
11111111191723263235333028293535374544403637363637444340353430252529323031
28312323252929374243433939403842423632342934363640383740353336343030252625
25293842403740322526312427323024273023232628283640394340332937343438444034
34342932343434353130262729323337394236403839384442454338373945454849524647
49504140343019252733323634343129353434343837394445474748475046454338374340
35373634343841363638423641373837423845444135383738414240332928333336403328
32312529353232343429323232302724252731333027293029343942364338423538394542
43423734323128332933343838444038423735354032322728293742444340322628302631
31272530242631262632312631272731322835343131312422192528353744413940363433
35303024232218242832323431292935384245433841343534353131283026263030222422
17222426283534374138384139404033273224263130232424212020171923253032292935
35404033272829364243413633293434373844403740342932343030272425252938403842
41342937353743444034332831273332322631252629363642413837383945504442373431
31273125252835333638423739454542434031...
Reply


Messages In This Thread
Periodic Strings - by whodat - 10-20-2005, 09:43 PM
Periodic Strings - by Antoni Gual - 10-21-2005, 05:05 AM
Periodic Strings - by whodat - 10-21-2005, 06:51 AM
Periodic Strings - by Mango - 10-21-2005, 07:00 AM
Periodic Strings - by Antoni Gual - 10-21-2005, 01:05 PM
Periodic Strings - by Quibbler - 10-22-2005, 01:14 AM
Periodic Strings - by whodat - 10-23-2005, 02:00 AM
Periodic Strings - by Quibbler - 10-24-2005, 07:02 PM
Periodic Strings - by Quibbler - 10-25-2005, 01:16 AM
Periodic Strings - by whodat - 10-25-2005, 01:46 AM
Periodic Strings - by Antoni Gual - 10-25-2005, 02:42 AM
Periodic Strings - by whodat - 10-25-2005, 05:35 AM
Periodic Strings - by Antoni Gual - 10-25-2005, 04:10 PM
Periodic Strings - by Agamemnus - 10-31-2005, 09:30 AM
solution for order 9 string - by whodat - 11-02-2005, 04:17 AM
Periodic Strings - by Agamemnus - 11-02-2005, 06:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)