An Interesting Property of Champernowne's Number

February 11, 2010

What is it?

Most have probably never heard of Champernowne’s Number. I hadn’t either until recently.

Champernowne’s Number is constructed of all the integers in lexicographical order. It looks like this in base 10: 0.123456789101112131415161718192021… and like this in base 2: 0.11011100101110111100010011010… and on and on.

It’s interesting for a few reasons. First, it’s a transcendental number. It’s also a normal number (meaning the distribution of finite sequences in the number are uniform). It never repeats. It was the first constructed normal number. It’s normal in both base 10 and base 2.

OK, the interesting monkey bits

A normal number will have a finite pattern (any finite pattern) occurring at the expected statistical frequency. In other words, 0-9 will occur ten percent of the time, two digit sequences will each occur one percent of the time, etc. Go out far enough, and a normal number will have every finite sequence at some point. Almost surely.

This is not unlike Infinite Monkey Theorem. Go out far enough with a random generator like a monkey, and you’ll get the complete works of Shakespeare. Some funny experiments have been tried with this. Six Celebes Crested Macaques came up with a whole lot of “S” in 2003. Some guy in 2004 came up with 19 characters from “The Two Gentleman of Verona” after 42 billion billion billion monkey years at the keyboard. Not too efficient.

Champernowne’s is normal too, but it’s constructed. That leads to two interesting properties.

First, it’s trivial to prove that every finite sequence occurs an infinite number of times. 123 occurs lexicographically as part of 1,230, 12,300, 123,000, 1,230,000…

There are also an infinite number of finite sequences. Although I don’t have the mathematical formality to say this properly, I assume that a difference in counting methods shouldn’t change on an infinite sequence. Since we can easily map the digits of Champernowne’s, they are countably infinite. Using Cantor’s rational method, we see that an infinite number of an infinite number of finite sequences is also countably infinite.

Grand Finale

Here’s the really neat one (I think). Since Champernowne’s Number is constructed in a very simple way, it’s easy to determine placement of at least one example of any finite sequence. I wrote a little code to do that.

12 occurs at position 14.
88 occurs at position 166.
456789 occurs at position 2629624.

You get the idea. These aren’t necessarily the first example, just one. 121 occurs before you get to 120121122, for example.

Let’s try some strings next, using the base 2 Champernowne’s Number.

“In the beginning God created the heavens and the earth.” is the binary string “01001001011011100010000001110100011010000110010100100000011000100110010101100111011010010110111001101110011010010110111001100111001000000100011101101111011001000010000001100011011100100110010101100001011101000110010101100100001000000111010001101000011001010010000001101000011001010110000101110110011001010110111001110011001000000110000101101110011001000010000001110100011010000110010100100000011001010110000101110010011101000110100000101110” and occurs at position 356097852926316301782000102588819045493701611164202427122434254428939928079886027311725449606685211370794850357286008341442499782289123

Shakespeare’s Sonnet XXIX occurs at position 5529689623442590254574150273622870930477009689745295553272317177923334410243942867212435413472990214204117697023582577597024319981507651525891954744420171739681013615081499744127027422417850816243779057866672504572411426319212214341453610738885077145076381082112221030629420879064726311885666690802013895255917873537980635956179092077972758806639907649358338519614120761340015690023856894195136558150347686286184639086300904028644600572531198585888382917386848250227708137657303671135661371669978917986946993771614375499423877134759409577881421814002203102421742525445271088729041201973377273583476981958654509315767510322607639266836464503193407388510208172703229120521354189608490930620735341202187468393443931375621533184076967152859242841992031042842880147923621694522404862749657474767304140422130924495567161027482276647076263584997585592575720631743357517192079957456970128843588191975533796845658799066936113950108688236628566318083146466774569873139724263211635683295455519216760085266643551338233431082628428526545049668907625363102688922765065887095964453374115640070410059383395867073497768505677867555395050755086313311409000249164902292914257203605003560287529012213411366603812111816500372066875911802215443842310508125224920102268462950192614621304932404225986488836763314215591988547000427071115808237125924231577442449346217195108071908457777118385934850281146836764584043701640790932369419148605873504050538158605384891871865207592932698243695417064054971346321507105233244652242489713126204925935899443905100198274782838225231343907

Frost’s Two Roads Diverged occurs at position 511304836022795797236271493420774376985829232815738775545390091018356464265435491324622681971805104005473490495736529345510884697627959983081091145901475786150475137779524707907360975975058188729616125993838489077364868205418021477541303218667427715113174783399912831817003124189282555594056735605218825030198863628933131877676620881673421145701322208528163237988366813460554484276331172005299259750398136690358265416039620564506583080524181913992578773748715545702252515409651654398446033437185004239285075265457671453400592859188212473319685998322474915761447480916093571224616636793837949515075858684409316027335642736733524083717086129894992308162979369298231885365144207236315014988110241291607094296660978538076611844530045920123432149297850040436327762062382057598667810582320690692017372314842899639650934941320732062561193849028628717417479503344478270909386309858808976821604845307679021497522079561999729888169032758108779381580081266925766246998123308745238496600089994084409024896728893198194262255014813525881552523042748646179620212021762080409911531701810773119940404911894610810936438362664990444087186954942123211747768638135517506232950823043615359313152115305923819720856135472552689233506654219694187038628026448579958309078143726390927896171237217781921841914449483283944844554029981211377041714959932690076287204369600402197838045549488198109650568979003493340389080184215287705017519018964961192859225236512155400956375667716305539572318863003133483852089010272843609840872218351712690205451968076921921685601696944230154406269875172431399848598216308145197247077487721215307593952644586811140898047068520666663737826115986465159273633492945964785438318303631209954110929004401155719032781625610078718748231951883989023803617001164367457699

Seriously.

But wait, binary numbers are technically base 10 too, I bet they occur there!

“In the beginning God created the heavens and the earth.” occurs at position 438328332722761793278889376222793722278937183322832788893717932837183323271837622722283327227618372276183722283327227618371837618327888932793762272276622718327893278889371793722761832837183323271789332762227937183323271832789327888937622279372227893718332283278889372227893718332327178933276227183718332327227618376183718327888937178933272276183718327893278889376222793722278937183322832788893718332327178933276183283762227937222788933276179

Sonnet XXIX occurs at position 5193889818513319454670838851897624031889455133708851897624031889454670324551337088976755184675981897670375461940884624551846708337031889459818981851337088981332455133189403188945467546755190281897670375981332459813838851897675467083370318894546194088518976754670319403188945518513884670838851897624602813318889454675981897675467031889454670838902767088467083889767546194083318940833703703703703188945461940885184624551846194031889454619408851846245519028185189767546708337031889454624037546708388981898184670838846708388976188940318894551851389027670370318894551902818981383889813324546245518461940889767551898133194031889459767551898133245461940889813324546708337088461889408337031894088518976754670319403188945981332459767037551902818981383884624037551846245467083370318894546703245467083884619408846754624031889455133194546708388461940889818467546708388518976240318894598189818513370889813324551331894031889455185138902767037031889454624037551902818519028189813324551846245467083889767551897675467031889454624551897670375513370884670838897675467088461889408337031894088518976754670319403188945518462455190281851902818513884670318894598138388976189455190281851897624031889455185138902767088976755184670838851846245467546240884619403188945461940885189767546703194031889454624551898138388976703759767551846708337031889455185138902767037031889454675467546194088981332454670833708846188940833708388981851337088976755185133194551337088518976754675976703188945518513884670833703188945518462455133708851388518467083370318894598133245519027670318894551902818518976754670833703188945518513885190281897670375467083370318894597670375513370884624551851331894031889455133708851897624031889455133194551902818976189454670833708846188940833703245467546708388461940889813324598138388976703246028133188894546759818467031940318894551846245513370885138851846708337031889455133194551337088518513370884619403188945518462455133708851388518467083370318894551331945513370885185133703188945981898185133708898133245513318940318894546754675976703755133708846708388518976754670324597675467031889459761894551902818976755189767551846708388976755189767546760281331888945467598184670319408846188940833703240324546708388976755185133708897670375513370885189767546759767031889459813324551331945513370889767546703188945518513884619408851897624602813318889454675981897675467031889454619408897670375981331940884619403188945461940885189767546703194031889459813324551331945461940889813319403188945518513884619408851897624602813318889454675981897675467031889459767551846245518519028189761894546708337088461889408337083889818513370889813324551331894031889459818981851331945461940889813319403188940370370370318894551851388519028189767551898133194031889454670838851897675513833755190281902767037031889454624551851902818518976759813324546708388518976759813324546708388467031940318894551846245467083884619408897675518981331945981846194083370884670884670838898133194031889455133708851897624031889459813324551331945467083889767551846708337031889459813324551331945519028189813838846759818513319459813324597675467031889455185138902767088976755184670838851846245467546240318894546194088518462455185138851902818976755189813319403188945467032454670838897675518976189455133708897675518513370885189767546759767088461889408337037031945461940889761894551846246027670370318894037037037031889459813324551331945513370885189767551388467031889455190281851897624031889459813324551331945467083884670833708846194602813318889455184624546194088518976754670319403188945981332455133194546708388518976240318894551851389027670370318894597675518981332454619408898133245467083370884618894083370375462455133708851388518467083370318894598133245519027670318894598133245513319454670833703188945518462454619408897670375513884670318894546194088981331940318894546240375976703754670838846194088513884670318894551902818467546240318894546703245461940890276703703188945461940889767037551337088976755185133708851897675467597619408337032454675976703755190281851851337031889459767551898138388518462455184624546708388518976240318894546708388461940889767037598133245513318940884619403188945976755185133708851897675467598189767546703188945513319460276708851851388518976759767546703188945461940889813319403188945513319454670838846194088981846754670838851897624602813318889454675981897675467031889454675981846194088981332454670833759818461940833703245467551902818976703240318894598133245513319460276703703188945976755189818981846708388467083889813319403188945518462455190281898184675467083370318894597670375467083885185138846708388518513884624037546708388976703246028133188894546759818467031940318894597675518981383884624551851331894031889459818981846708388461940885184624598133245513318940318894546240375976703755133708851897675467598189767546194083370838332455133194546194088981331940318894598133245513319454670838851897624031889403703703703188945976755184624551851902818976703755189762403188945981332455190276703188945462455185133194546194088518976754675981846708337031889455185138902767037031889459767551898133245461940889813324546708337031889459818981851337088981332455133189403188945513885185133708851897675467598189767546708897619

The first paragraph of “OK, the interesting bits” in my post above occurs at position 270189159459188918651892486519195189245948651649216219162165162191591889186518924889491921651649216221594862461921892459215918891889518951648946216516221865162191591889186489191862191621895162486246189459188918621915945918891862486248648946216518924864894621894892186246189459188918892189186219162189489218894892186246192189245948651892215918889161891918621916216518924891924594591889186248624864894621651892486489462189489218624618945918891889218918621916218948921889489218624619218924594865189221618945945918891865191951622186516221865189491921892459488924594864894621651892486248892459188918621916218948919159188918894892186489191862461894591889186246192191921918892189186246192162218651894892186246192162459191591889188924865189489218621916218948921864894621892486518948921864894621622186516219162165162191591889186248624889245948624619218922162189491921624619216518924862218651919245946218922159188891591889159459462165189221591889186519195189489218648919186246192189245921591889188951895165191951892459486245921889248624621621915918889186218891621648948892459459188918895189516489462165162218651621915918891865191951622186516221865189491921892459215918891889489218624619216518922159188918892189186246192189245948622186516246192165189248894891915918891865191951624862215918891889489218648919186246189459188918894892186489462165164921624618946216219159188918894892188951895165191924591889186245921864894621624889516489462189489191591889188924865162461921892216218949192162461921651892486221865162461921892486245918891889518951648946216516221865162191591889186246192162191621622186516489189159188918651919516221865162218651894919218924592159188918651919516518924862461894591889188921891862461921892459486221865162461921651892488948919159188918651919516248622159188918894892186489191862461894591889188948921864894621651649216246189462162191591889186246192189489218622186246218922159188891591889159218895165191924591889186519195189491921894891915918891862486248621916218924592159188918624619216518924865191951894919216248895164891891621621915918891862191621651892486245919159188918621915945918891865189248651919518924594865164921621916216516219159188918651892488949192165164921622159486246192189245921591889188951895164894621651622186516219159188918648919186219162189516248624618945918891862461921895162486246192189245948919245945918891862486248648946216518924864894621894892186246189459188918892486516246192189221621894919216246192165189248622186516246189459188918621916218948919159188918892486516519195165164921624618945918891889218918651919516489462165189248894891916218922159188891591889159189162165162218651649216519195189248651894891915918891889248651894919218924594862461921651622189192459462189219

Srsly.

So there you have it, examples of crazy strings in a normal, transcendental number. Nevermind illegal primes, most real numbers are normal, so most numbers contain everything ever written or said including the Bible, Shakespeare, the Quran, and your next sentence!

Here’s the code to do it. Just change the base or compute as a number if you prefer.


Like the content? Share it around..