Message Boards Message Boards

3
|
9200 Views
|
7 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Prime Chunk Decomposition

Posted 9 years ago

Irrational and transcendental real numbers do not have a decomposition into prime factors. But one can give them a split into prime chunks.

Clear[primeStop]
primeStop[x_, n_: 1] := Block[{l = If[IntegerQ[x],
      IntegerDigits[x], First[RealDigits[N[x, n]]]], o, r = {}},
    While[Length[l] > 0,
     {o, l} = {{First[l]}, Rest[l]};
     While[Length[l] > 0 && ! PrimeQ[FromDigits[o]],
      {o, l} = {Join[o, {First[l]}], Rest[l]}
     ];
     r = Join[r, {o}]
    ];
    If[PrimeQ[Last[#]], #, Most[#]] &[FromDigits /@ r]
   ] /; x \[Element] Reals && n >= 1

with that one can look at $\pi$

In[98]:= primeStop[\[Pi], 3100 - 18]
Out[98]= {3, 14159, 2, 653, 5, 89, 7, 9323, \
8462643383279502884197169399375105820974944592307816406286208998628034\
8253421170679821480865132823066470938446095505822317253594081284811174\
5028410270193852110555964462294895493038196442881097566593344612847564\
8233786783165271201909145648566923460348610454326648213393607260249141\
2737245870066063155881748815209209628292540917153643678925903600113305\
3054882046652138414695194151160943305727036575959195309218611738193261\
1793105118548074462379962749567351885752724891227938183011949129833673\
3624406566430860213949463952247371907021798609437027705392171762931767\
5238467481846766940513200056812714526356082778577134275778960917363717\
8721468440901224953430146549585371050792279689258923542019956112129021\
9608640344181598136297747713099605187072113499999983729780499510597317\
3281609631859502445945534690830264252230825334468503526193118817101000\
3137838752886587533208381420617177669147303598253490428755468731159562\
8638823537875937519577818577805321712268066130019278766111959092164201\
9893809525720106548586327886593615338182796823030195203530185296899577\
3622599413891249721775283479131515574857242454150695950829533116861727\
8558890750983817546374649393192550604009277016711390098488240128583616\
0356370766010471018194295559619894676783744944825537977472684710404753\
4646208046684259069491293313677028989152104752162056966024058038150193\
5112533824300355876402474964732639141992726042699227967823547816360093\
4172164121992458631503028618297455570674983850549458858692699569092721\
0797509302955321165344987202755960236480665499119881834797753566369807\
4265425278625518184175746728909777727938000816470600161452491921732172\
1477235014144197356854816136115735255213347574184946843852332390739414\
3334547762416862518983569485562099219222184272550254256887671790494601\
6534668049886272327917860857843838279679766814541009538837863609506800\
6422512520511739298489608412848862694560424196528502221066118630674427\
8622039194945047123713786960956364371917287467764657573962413890865832\
6459958133904780275900994657640789512694683983525957098258226205224894\
0772671947826848260147699090264013639443745530506820349625245174939965\
1431429809190659250937221696461515709858387410597885959772975498930161\
7539284681382686838689427741559918559252459539594310499725246808459872\
7364469584865383673622262609912460805124388439045124413654976278079771\
5691435997700129616089441694868555848406353422072225828488648158456028\
5060168427394522674676788952521385225499546667278239864565961163548862\
3057745649803559363456817432411251507606947945109659609402522887971089\
3145669136867228748940560101503308617928680920874760917824938589009714\
9096759852613655497818931297848216829989487226588048575640142704775551\
3237964145152374623436454285844479526586782105114135473573952311342716\
6102135969536231442952484937187110145765403590279934403742007310578539\
0621983874478084784896833214457138687519435064302184531910484810053706\
1468067491927819119793995206141966342875444064374512371819217999839101\
5919561814675142691239748940907186494231961567945208095146550225231603\
88193014209376213785595663893778708303906979207, 7, 3, 467, 2, 2}

interesting how long a prime number appears between shorter ones in $\pi$. With the $e$ it looks as

In[99]:= primeStop[E, 2630 - 6]
    Out[99]= {2, 7, \
    1828182845904523536028747135266249775724709369995957496696762772407663\
    0353547594571382178525166427427466391932003059921817413596629043572900\
    3342952605956307381323286279434907632338298807531952510190115738341879\
    3070215408914993488416750924476146066808226480016847741185374234544243\
    7107539077744992069551702761838606261331384583000752044933826560297606\
    7371132007093287091274437470472306969772093101416928368190255151086574\
    6377211125238978442505695369677078544996996794686445490598793163688923\
    0098793127736178215424999229576351482208269895193668033182528869398496\
    4651058209392398294887933203625094431173012381970684161403970198376793\
    2068328237646480429, 5, 3, 11, 80232878250981945581530175671, 7, 3, \
    61, 3, 3, 2, 6981125099618188159304169035159888851934580727386673, \
    8589422879228499892086805825749279610484198444363463244968487560233624\
    8270419786232090021609902353043699418491463140934317381436405462531520\
    9618369088870701676839642437814059271456354906130310720851038375051011\
    5747704171898610687396965521267154688957035035402123407849819334321068\
    1701210056278802351930332247450158539047304199577770935036604169973297\
    2508868769664035557071622684471625607988265178713419512466520103059212\
    3667719432527867539855894489697096409754591856956380236370162112047742\
    7228364896134225164450781824423529486363721417402388934412479635743702\
    6375529444833799801612549227850925778256209262264832627793338656648162\
    7725164019105900491644998289315056604725802778631864155195653244258698\
    2946959308019152987211725563475463964479101459040905862984967912874068\
    7050489585867174798546677575732056812884592054133405392200011378630094\
    5560688166740016984205580403363795376452030402432256613527836951177883\
    8638744396625322498506549958862342818997077332761717839280349465014345\
    5889707194258639877275471096295374152111513683506275260232648472870392\
    0764310059584116612054529703023647254929666938115137322753645098889031\
    3602057248176585118063036442812314965507047510254465011727211555194866\
    8508003685322818315219600373562527944951582841882947876108526398139559\
    9006737648292244375287184624578036192981971399147564488262603903381441\
    8232625150974827987779964373089970388867782271383605772978824125611907\
    1766394650706330452795466185509666618566470971134447401607046262156807\
    1748187784437143698821855967095910259686200235371858874856965220005031\
    1734392073211390803293634479727355955277349071783793421637012050054513\
    2638354400018632399149070547977805669785335804896690629511943247309958\
    7655236812859041383241160722602998330535370876138939639177957454016137\
    2236187893652605381558415871869255386061647798340254351284396129460352\
    9133259427949043372990857315802909586313826832914771, 163, 96337}

for the Euler constant primeStop[E,10500] was not able the get the next prime number, i.e. the next prime number appearing has at least

In[146]:= 10500 - 2630 + 6
Out[146]= 7876

digits. Should one expect that the prime number chain primeStop produces out of a transcendental number is never-ending?

One can also decompose the prime numbers themselfes into prime chunk decompositions: Between the first 10000 prime numbers are 6132 which contain non-prime chunks:

In[88]:= Select[Prime /@ Range[10000], FromDigits[primeStop[#]] != # &] // Length
Out[88]= 6132

There are 3170 primes under the first 10000 ones which are also chunk-prime:

In[89]:= Select[Prime /@ Range[10000], (First[primeStop[#]] == # &&  Length[primeStop[#]] == 1) &] // Length
Out[89]= 3170 

Last but not least there are 698 primes under the first 10000 ones which are chunk-composed of primes:

In[90]:= Select[Prime /@ Range[10000], (FromDigits[primeStop[#]] == # && Length[primeStop[#]] > 1) &] // Length
Out[90]= 698
POSTED BY: Udo Krause
7 Replies

but what is the measure of such numbers?

Udo, does your code answer that question?

Even if primeChunkFree[n] would produce for a given $0 < n < \infty$ after $\alpha 10^n$ calls all prime chunk free numbers, where $\alpha$ is a positive finite real constant, one still needs a topology to measure them in the $n$-digit integers.The point-topology (counting) will do it for a fixed $n$: one has to estimate $\alpha$ as $\alpha(n)$. In the case of an infinite $n$ and prime chunk free numbers $\xi$ between 0 and 1 it is not clear to me whether some, all, or none of them are transcendental much less how to measure them in the reals.

POSTED BY: Udo Krause

Here is a simple example of a transcendental number that has no prime chunks (using a Liouville number)

4/9+Sum[2/(10^(n!)),{n,1, Infinity}] \[TildeEqual] .664446444444444444444446444444444444444444444444

but what is the measure of such numbers?

Udo, does your code answer that question?

The prime number theorem suggests that the chances improve when adding a digit to a number that one of those 10 numbers will be prime (maybe by a factor of 2), so it becomes unlikely for a random sequence of digits to not become prime, but on the other hand the integer lengths of these numbers can be large.

RandomChunkPrime[init_] := Module[{n = init}, While[Not[PrimeQ[n]], n = 10 n + RandomInteger[{0, 9}]]; n]

50 random chunked primes

POSTED BY: Todd Rowland

Here is the Euler constant's prime content for more digits

primeStop[E, 26300]

{2, 7, 182818284590452353602874713526624977572470936999595749669676277\
2407663035354759457138217852516642742746639193200305992181741359662904\
3572900334295260595630738132328627943490763233829880753195251019011573\
8341879307021540891499348841675092447614606680822648001684774118537423\
4544243710753907774499206955170276183860626133138458300075204493382656\
0297606737113200709328709127443747047230696977209310141692836819025515\
1086574637721112523897844250569536967707854499699679468644549059879316\
3688923009879312773617821542499922957635148220826989519366803318252886\
9398496465105820939239829488793320362509443117301238197068416140397019\
83767932068328237646480429, 5, 3, 11, 80232878250981945581530175671, \
7, 3, 61, 3, 3, 2, \
6981125099618188159304169035159888851934580727386673, \
8589422879228499892086805825749279610484198444363463244968487560233624\
8270419786232090021609902353043699418491463140934317381436405462531520\
9618369088870701676839642437814059271456354906130310720851038375051011\
5747704171898610687396965521267154688957035035402123407849819334321068\
1701210056278802351930332247450158539047304199577770935036604169973297\
2508868769664035557071622684471625607988265178713419512466520103059212\
3667719432527867539855894489697096409754591856956380236370162112047742\
7228364896134225164450781824423529486363721417402388934412479635743702\
6375529444833799801612549227850925778256209262264832627793338656648162\
7725164019105900491644998289315056604725802778631864155195653244258698\
2946959308019152987211725563475463964479101459040905862984967912874068\
7050489585867174798546677575732056812884592054133405392200011378630094\
5560688166740016984205580403363795376452030402432256613527836951177883\
8638744396625322498506549958862342818997077332761717839280349465014345\
5889707194258639877275471096295374152111513683506275260232648472870392\
0764310059584116612054529703023647254929666938115137322753645098889031\
3602057248176585118063036442812314965507047510254465011727211555194866\
8508003685322818315219600373562527944951582841882947876108526398139559\
9006737648292244375287184624578036192981971399147564488262603903381441\
8232625150974827987779964373089970388867782271383605772978824125611907\
1766394650706330452795466185509666618566470971134447401607046262156807\
1748187784437143698821855967095910259686200235371858874856965220005031\
1734392073211390803293634479727355955277349071783793421637012050054513\
2638354400018632399149070547977805669785335804896690629511943247309958\
7655236812859041383241160722602998330535370876138939639177957454016137\
2236187893652605381558415871869255386061647798340254351284396129460352\
9133259427949043372990857315802909586313826832914771, 163, 96337, \
9240031689458636060645845925126994655724839186564209752685082307544254\
5993769170419777800853627309417101634349076964237222943523661255725088\
1477922315197477806056967253801718077636034624592787784658506560507808\
4421152969752189087401966090665180351650179250461950136658543663271254\
9639908549144200014574760819302212066024330096412704894390397177195180\
6990869986066365832322787093765022601492910115171776359446020232493002\
8040186772391028809786660565118326004368850881715723866984224220102495\
0551881694803221002515426494639812873677658927688163598312477886520141\
1741109136011649950766290779436460058519419985601626479076153210387275\
5712699251827568798930276176114616254935649590379804583818232336861201\
6243736569846703785853305275833337939907521660692380533698879565137285\
5938834998947074161815501253970646481719467083481972144888987906765037\
9590366967249499254527903372963616265897603949857674139735944102374432\
9709355477982629614591442936451428617158587339746791897571211956187385\
7836447584484235555810500256114923915188930994634284139360803830916628\
1881150371528496705974162562823609216807515017772538740256425347087908\
9137291722828611515915683725241630772254406337875931059826760944203261\
9242853170187817729602354130606721360460003896610936470951414171857770\
1418060644363681546444005331608778314317444081194942297559931401188868\
3314832802706553833004693290115744147563139997221703804617092894579096\
2716622607407187499753592127560844147378233032703301682371936480021732\
8573493594756433412994302485023573221459784328264142168487872167336701\
0615094243456984401873312810107945127223737886126058165668053714396127\
8887325273738903928905068653241380627960259303877276977837928684093253\
6588073398845721874602100531148335132385004782716937621800490479559795\
9290591655470505777514308175112698985188408718564026035305583737832422\
9241856256442550226721559802740126179719280471396006891638286652770097\
5276706977703643926022437284184088325184877047263844037953016690546593\
7461619323840363893131364327137688841026811219891275223056256756254701\
7250863497653672886059667527408686274079128565769963137897530346606166\
6980421826772456053066077389962421834085988207186468262321508028828635\
9746839654358856685503773131296587975810501214916207656769950659715344\
7634703208532156036748286083786568030730626576334697742956346437167093\
9719306087696349532884683361303882943104080029687386911706666614680001\
5121143442256023874474325250769387077775193299942137277211258843608715\
8348356269616619805725266122067975406210620806498829184543953015299820\
9250300549825704339055357016865312052649561485724925738620691740369521\
3533732531666345466588597286659451136441370331393672118569553952108458\
4072443238355860631068069649248512326326995146035960372972531983684233\
6390463213671011619282171115028280160448805880238203198149309636959673\
5832742024988245684941273860566491352526706046234450549227581151709314\
9218795927180019409688669868370373022004753143381810927080300172059355\
3052070070607223399946399057131158709963577735902719628506114651483752\
6209565346713290025994397663114545902685898979115837093419370441155121\
9201171648805669459381311838437656206278463104903462939500294583411648\
2411496975832601180073169943739350696629571241027323913874175492307186\
2454543222039552735295240245903805744502892246886285336542213815722131\
1632881120521464898051800920247193917105553901139433166815158288436876\
0696110250517100739276238555338627255353883096067164466237092264680967\
1254061869502143176211668140097595281493907222601112681153108387317617\
3232352636058381731510345957365382235349929358228368510078108846343499\
8351840445170427018938199424341009057537625776757111809008816418331920\
1962623416288166521374717325477727783488774366518828752156685719506371\
9365653903894493664217640031215278702223664636357555035655769488865495\
0027085392361710550213114741374410613444554419210133617299628569489919\
3369184729478580729156088510396781959429833186480756083679551496636448\
9655929481878517840387733262470519450504198477420141839477312028158868\
4570729054405751060128525805659470304683634459265255213700806875200959\
3453607316226118728173928074623094685367823106097921599360019946237993\
4342106878134973469592464697525062469586169091785739765951993929939955\
6754271465491045686070209901260681870498417807917392407194599632306025\
4707901774527513186809982284730860766536866855516467702911336827563107\
2233467261137054907953658345386371962358563126183871567741187385277229\
2259474337378569553845624680101390572787101651296663676445187246565373\
0402443684140814488732957847348490003019477888020460324660842875351848\
3649591950828883232065221281041904480472479492913422849519700226013104\
3006241071797150279343326340799596053144605323048852897291765987601666\
7811937932372453857209607582277178483361613582612896226118129455927462\
7671377944875867536575448614076119311259585126557597345730153336426307\
6798544338576171533346232527057200530398828949903425956623297578248873\
5029259166825894456894655992658454762694528780516501720674785417887982\
2768065366506419109734345288783386217261562695826544782056729877564263\
2532159429441803994321700009054265076309558846589517170914760743713689\
3319469090981904501290307099566226620303182649365733698419555776963787\
6249188528656866076005660256054457113372868402055744160308370523122425\
8722343885412317948138855007568938112493538631863528708379984569261998\
1794523364087429591180747453419551420351726184200845509170845682368200\
8977394558426792142734775608796442792027083121501564063413416171664480\
6981548376449157390012121704154787259199894382536495051477137939914720\
5219529079396137621107238494290616357604596231253506068537651423115349\
6656837151166042207963944666211632551577290709784731562782775987881364\
9195125748332879377157145909106484164267830994972367442017586226940215\
9407924480541255360431317992696739157542419296607312393763542139230617\
8767539587114361040894099660894714183406983629936753626215452472984642\
1375289107988438130609555262272083751862983706678722443019579379378607\
2107254277289071732854874374355781966511716618330881129120245204048682\
2000723440350254482028342541878846536025915064452716577000445210977355\
8589762265548494162171498953238342160011406295071849042778925855274303\
5221396835679018076406042138307308774460170842688272261177180842664333\
6517800021719034492342642662922614560043373838683355553434530042648184\
7398921562708609565062934040526494324426144566592129122564889356965500\
9154306426134252668472594914314239398845432486327461842846655985332312\
2104662598901417121034460842716166190012571958707932175696985440133976\
2209674945418540711844643394699016269835160784892451405894094639526780\
7354579700307051163682519487701189764002827648414160587206184185297189\
1540196882532893091496653457535714273184820163846448324990378860690080\
7270932767312758196656394114896171683298045513972950668760474091542042\
8429993541025829113502241690769431668574242522509026939034814856451303\
0699251995904363840284292674125734224477655841778861717372654620854982\
9449894678735092958165263207225899236876845701782303809656788311228930\
5809140572610865884845873101658151167533327674887014829167419701512559\
7825727074064318086014281490241467804723275976842696339357735429301867\
3943971638861176420900406866339885684168100387238921448317607011668450\
3887212364367043314091155733280182977988736590916659612402021778558854\
8761761619893707943800566633648843650891448055710397652146960276625835\
9905198704230017946553678856743028597460014378548323706870119007849940\
4930918919181649327259774030074879681484882342932023012128032327460392\
2196875283405169069741942576146739781107154641862733690915849731850111\
8396048253351874843892317729261354302493256289637136197728545662292446\
1644497284597867711574125670307871885109336344480149675240618536569532\
0741705334867827548278154155619669110551014727990403868972204655508331\
7078239480878599050194756310898412414467282186545997159663901564194175\
1820935932616316888380132758752601460507676098392625726411120135288591\
3178482994756824725648855333572797722055435681263025357482165854140008\
0531482069713726214975557605189048162237679041492674260007104592269531\
4835188137463887104273544767623577933993970632396604969145303273887874\
5579059349377723201429548033450006952569809352828877837106705855677494\
8137385863038576282304069400566534058488752700530883245918218349431804\
9834199639981458773435863115940570443683515285383609442955964360676090\
2217418968835481316439974377641583652422346426195973904554506806952328\
5075186871944906476779188672030641863075105351214985105120731384664871\
7547518382979990189317751550639981016466414592102406838294603208535554\
0581471592732206775676692136640815059008069525406106285364082932766219\
3193993386162383606911176778544823612932685819996523927548842743541440\
2884536455595124735546139403154952097397051896240157976832639450633230\
4521926450496517354667756992957189896904709027302885449454166997919929\
4803825498028594602905276314558031651406622917122342937580614399348491\
4362107993576737317948964252488813720435579287511385856973381976083524\
4232404667780209483996399466848337747067254836188482730006483191638260\
2211055522124673332318446300550448184991699662208774614021615702102960\
3318588727333298779352570182393861244026868339555870607758169954398469\
5685406711744449324795195721594196458637361269155264575747869859642421\
7659289686238350637043393981167139754473622862550680368266413554144804\
8997721373174119199970017293907303350869020922519124447393278376156321\
8108428982077069741387070532661176836986477417871802027294129823108887\
9683188085436732780687977165911165422445380662586171172949803824887998\
6504061563975629936962809358189761491017145343556659542757064194408833\
8168411111662007597872441370823339178861147082286575310785366746950184\
6214073649391736625493778301407430266842215033511773647185387232404042\
1037907750266020114814935482228916663640782450166815341213505278578539\
3326061102498022730936367402135153864316930152674605360643517321547010\
9144065087882363676423683118739093746423260902164636562755397683401948\
2932795750624399645272578624400375983422050808935129023122475970644105\
6783618708771723335554654825989068612014101072224659040085537982352538\
8517162351825651848220312521495070037830041121621212605272605994432044\
3056274522916128891766814160639131235975350390320077529587392412476451\
8508091639114592960711563442043471335447209811784614510778723991406062\
9022827666430926490059224981029106875943453385833039117874757597706595\
3570979640012224092199031158229259667913153991561438070129260780197022\
5896629233681543124994122594600233994722281710566039318772268004938331\
4898033854890946868513078929206424281917479586619994441119620873049806\
4385006852620258432842085582338566936649849720817046135376163584015342\
8406741185875815465145982702286766718553093119233401912861706133648731\
, 83, 19, 7, 5, \
6081256946008940295309442911959029596856392303768997632746228390073545\
7144596414108229285922239332836210192822937243590283003884445701383771\
6320565183519701001157220109569978904849644534346121292249647323561263\
2195115570156582442766159932646315580667205312759694853805736420838491\
8887095176052287817339462747644656858900936266123311152910816041524100\
2141959373497864316615567327027921095935430555797326605546779635520053\
7830461954063697184291616858273412221714588587081427409024818544642177\
4876925093328785670674677381226752831653559245204578070541352576903253\
5227389638474956462559403789249250076243868937764753101023237467337714\
7458162553069803249903367645543030527456151296121458594443215074905149\
1453950981001388737926379964873728396416897555132275962011838248650746\
9854920380976919326064376087432093856028156428497565493079097338541855\
8351578940981400769189238906309054253488389683176290412021294916719581\
1935791203162514344096503132835216728021372415947344095498316138322505\
4867081722214751384251667904454166173032008203309028954888085167972584\
9581340713218053398882813934604985053234047259509721433149258660424851\
1405819579711564191458842833000525684776874305916390494306871343118796\
1896374755033628209399493436903210319768981120555953694654247041733238\
9539404603532539675835439535051672026164796134779091232799526492904515\
1148307923369382166010702872651938143844844532639517394110131152502750\
4657493430637665418661289152644469262228843662994627324679587363835019\
3714278647139805403821551346322370207153313488708317414659149240635949\
3020921122052610312390682941345696785958518393491382340884274312419099\
1528708043328091329930789368671274139228900330699958759218152976124824\
0911695158778996409035257734593824823205305556723809502226679043961423\
1852991989181065554412477204508510210071522352342792531266930108270633\
9423217625700763231391593497099469332410139087791616512268044148097656\
1897973504315139606691325837903374862083669547508328031878670775117752\
5663963479259219733577949555498655214193398170268639987388347010255262\
0523123172152540625716367712700107609122815283265089843595689759610383\
7215772683117073455225019412170154131879365181850202087732690613359218\
2000762327269503283827391243828198170871168108951187896746707073377869\
5925655427133400523267060400043488434329027603604980278621607494696549\
8921047444392787193453670179867392080384563372331198385586263800851634\
5597194441994344624761123844617615736242015935078520825600604101556889\
899501732554337298073561699861101908472096600708320280569, \
9170425901038769286583365577287586842504926903709342620280223998618034\
0021132074219864291738367, \
9176232826444645756330336556777374808644109, 969141827, 7, 7, 4253, \
41, 7, 109, \
8843585318933917593451157402384729290901546855916379269619684100067659\
839974497204728788183120023338329803, 5, 67, 86548087147, \
6464512824264478216644266616732096012564794514827125671326697067367144\
6177956437523917429285039870225837340698523091904649672602434112703456\
1, 11, 14149, 83, 5, 7, 83, 9017934997, 13, 7, 9091, 3, 6967, \
649763712724846661, 3, 2, 7, \
9908254305449295528594932793818341607827091326680865655921102733746700\
1325834287152408356615221655749984312362782871066494015646701419437138\
2386345472960697869333597310953712649941628265646370849058015153820533\
8326511289504938566468752921135932220265681856418260827538790002407915\
8926460284908949222999661674377313477761341509652624483327093438984120\
5692614510885781224913961691253420291813989868390133579585762443519400\
8943955180554746554000051766240202825944828833811886381749594284892013\
5200909510078649418682560092739776675856425983785874977766695633501707\
4857902724870137026420328396575634801081835618237217708223642318659159\
5883669487322411726504487268392328453010991677518376831599821263237123\
8543573126812024451754018521326637405388029012497281808950215531006735\
981, 8443, 4291052884593230647255904423559605519788393259, 3, 3, 3, \
957293466305516043092378567722929353720841669313, 457, 5, 2, 84011, \
8737, 468546916206489911647269094289, 829, 7, \
10656068018058078436004618662235628745913851859, \
4416250663222249561448724413813849763797, 10267, \
6020845531824111963927941069619465426480006761727618115630063644321116\
2248373791056236113588363345501022861705178904405704195778598333484633\
1792190449465292302146925975656638996589374772875139337710556980245575\
7436190501772466214587592374418657530064998056688376964229825501195065\
83784312523213530937123524396914966231011032824357006578148767, 7, 2, \
991}

and this is a glimpse of trends in the beginning of the primes themselfes:

In[446]:= (* prime numbers with non-prime chunk *)
Length[Select[Prime /@ Range[#], FromDigits[primeStop[#]] != # &]] & /@
  Range[10000, 200000, 10000]

Out[446]= {6132, 12712, 22590, 29751, 37964, 43936, 49911, 53868, \
61031, 66240, 73932, 77912, 82766, 89274, 97632, 107632, 117535, \
127443, 137355, 147317}

In[447]:= (* chunk prime prime numbers *)
Length[Select[Prime /@ Range[#], (First[primeStop[#]] == # && 
       Length[primeStop[#]] == 1) &]] & /@ Range[10000, 200000, 10000]

Out[447]= {3170, 6111, 6111, 8562, 10092, 13666, 17248, 22657, 25124, \
29441, 31455, 36855, 41511, 44643, 46082, 46082, 46082, 46082, 46082, \
46082}

In[448]:= (* chunk prime concatenated prime numbers *)
Length[Select[Prime /@ Range[#], (FromDigits[primeStop[#]] == # && 
       Length[primeStop[#]] > 1) &]] & /@ Range[10000, 200000, 10000]

Out[448]= {698, 1177, 1299, 1687, 1944, 2398, 2841, 3475, 3845, 4319, \
4613, 5233, 5723, 6083, 6286, 6286, 6383, 6475, 6563, 6601}

In[456]:= ListLinePlot[{%446/Range[10000, 200000, 10000],
  %447/Range[10000, 200000, 10000],
  %448/Range[10000, 200000, 10000]}, Filling -> Axis, 
 PlotLegends -> {"chunk non-prime concat", "chunk primes", 
   "chunk prime concat"},
 PlotLabel -> "Prime Chunk Decompositions", 
 AxesLabel -> {"N [10'000]", "#/N"}]

enter image description here

POSTED BY: Udo Krause

I am not sure what this question means.

The following was meant: Generate prime chunk free numbers (* edited: previous implementation was too naive *)

primeS[x_List, y_List] := Block[{lx = Length[x], ly = Length[y],
   o = {{0, 2, 4, 5, 6, 8}, {}, {0, 1, 2, 4, 5, 6, 8}, {}, {}, {}, {0, 1, 2, 3, 4, 5, 6, 8}, {}, {0, 1, 2, 3, 4, 5, 6, 7, 8}}},
   If[ly - lx == 1,
     FromDigits[Join[x, {RandomChoice[o[[Last[y]]]]}]],(* else *)
     FromDigits[Join[x, RandomChoice /@ Join[Range[0, #] & /@ Most[Take[y, lx - ly]], {o[[Last[y]]]}]]]
   ]
] /; OddQ[Last[y]]
primeChunkFree[n_: 100] := Nest[primeS[IntegerDigits[#], IntegerDigits[NextPrime[10 #]]] &, RandomChoice[{1, 4, 6, 8, 9}], n] /; n > 0

    In[457]:= primeChunkFree[353]
    Out[457]= \
    4480002164448166816835233834856248182100560864148426666035478738640830\
    6138244588338574501232610148028215848684505224462448060654066314841828\
    1383630005655116410864436565542000405136626656086585231486685862320488\
    2550526040244688627620125182586218625602450000021072438006826543408360\
    0126444682828401442035786862852486656110406850450685174364001101042178\
    3625

    In[458]:= primeStop[%]
    Out[458]= {}

If the irrational or transcendental number under prime chunk decomposition - say $\xi$ - would consist after a prime chunk exclusively of digits from a prime chunk free number (ad infimum), the prime chunk decomposition of $\xi$ would consist of finite many prime numbers.


By the way, my wife calls the prime chunk decomposition the alphabet of primes. Each prime is a letter and the operation is concatenation, as usual in alphabet driven languages. Zeroes at the beginning of a prime chunk get lost - they could be considered as punctuation.

POSTED BY: Udo Krause

Change the test

Clear[squareStop]
squareStop[x_, n_: 1] := Block[{l = If[IntegerQ[x],
      IntegerDigits[x], First[RealDigits[N[x, n]]]], o, r = {}},
   While[Length[l] > 0,
    {o, l} = {{First[l]}, Rest[l]};
    While[Length[l] > 0 && ! SameQ[Head[Sqrt[FromDigits[o]]], Integer],
     {o, l} = {Join[o, {First[l]}], Rest[l]};
    ];
    r = Join[r, {o}]
   ];
   If[SameQ[Head[Sqrt[Last[#]]], Integer], #, Most[#]] &[FromDigits /@ r]
  ] /; x \[Element] Reals && n >= 1

Under this test 0 and 1 are perfect squares. But there are far to few square numbers

In[40]:= squareStop[FromDigits[Flatten[IntegerDigits /@ (Range[2, 100]^2)]]]
Out[40]= {4, 9, 1, 625, 36, 4, 9, 64, 81, 1, 0, 0, 1}

In[43]:= squareStop[FromDigits[Flatten[IntegerDigits /@ (Range[1, 100]^2)]]]
Out[43]= {1, 4, 9, 1, 625, 36, 4, 9, 64, 81, 1, 0, 0, 1}

In[46]:= FromDigits[Flatten[IntegerDigits /@ (Range[1, 100]^2)]]
Out[46]= 1491625364964811001211441691962252562893243614004414845295766\
2567672978484190096110241089115612251296136914441521160016811764184919\
3620252116220923042401250026012704280929163025313632493364348136003721\
3844396940964225435644894624476149005041518453295476562557765929608462\
4164006561672468897056722573967569774479218100828184648649883690259216\
94099604980110000

to generate long decompositions. No consecutive, from the left starting range of digits of

2114416919622525628932436140044148452957662567672978484190096110241089\
1156122512961369144415211600168117641849193620252116220923042401250026\
0127042809291630253136324933643481360037213844396940964225435644894624\
4761490050415184532954765625577659296084624164006561672468897056722573\
96756977447921810082818464864988369025921694099604980110000

is a square anymore. Square numbers are too seldom for chunk decompositions.

In[44]:= squareStop[E, 2630 - 6]
Out[44]={}

In[45]:= squareStop[\[Pi], 3100 - 18]
Out[45]= {}
POSTED BY: Udo Krause

I am not sure what this question means.

"Should one expect that the prime number chain primeStop produces out of a transcendental number is never-ending?"

If you are asking whether there will be infinitely many primes, the answer is yes. Do there have to be infinitely many distinct primes? Probably, but I don't have a proof offhand.

POSTED BY: Daniel Lichtblau
Posted 9 years ago

Interesting, could your code be altered to find say blocks that were perfect squares?

POSTED BY: Paul Cleary
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract