Saturday, May 18, 2024

[xxrrzgip] some numbers less than a decillion

maximal integers strictly less than 10^33, of some nice compactly expressible categories:

? allbefore(10^33)
618033988749894848204586834365638 = floor(N/phi)
757791618667731139247631372100066 = fibonacci(159)
649037107316853453566312041152512 = 2^109
834385168331080533771857328695283 = 3^69
324518553658426726783156020576256 = 4^54
710542735760100185871124267578125 = 5^47
481229803398374426442198455156736 = 6^42
909543680129861140820205019889143 = 7^39
324518553658426726783156020576256 = 8^36
278128389443693511257285776231761 = 9^34
100000000000000000000000000000000 = 10^32
191943424957750480504146841291811 = 11^31
237376313799769806328950291431424 = 12^30
201538126434611150798503956371773 = 13^29
852226929923929274082183837890625 = 15^28
324518553658426726783156020576256 = 16^27
433595865796975883590475106484224 = 18^26
335544320000000000000000000000000 = 20^25
480250763996501976790165756943041 = 23^24
20880467999847912034355032910567 = 23^23
265252859812191058636308480000000 = 30!
774327632846470705223111406467256 = binomial(113,56)
827103710671265770756367677038144 = binomial(114,51)

Pari/GP code:

fibonaccibefore(target)= my(a,b,c); a=0; b=1; for(i=1,+oo, c=a+b; if(target<=c, return(i)); a=b; b=c);

onepowerbefore(base,target)= my(p=1); for(e=0,+oo, my(t=p*base); if(target<=t, return(e)); p=t);

powersbefore(target)= for(base=2,+oo, my(a= onepowerbefore(base,target)); if(a<=base, break); if((base+1)^a < target, next); print(base^a," = ",base,"^",a));

factorialbefore(target)= my(p=1); for(e=1,+oo, my(t=p*e); if(target<=t, return(e-1)); p=t);

centralbinomialbefore(target)= for(n=1,+oo, my(c=binomial(n,floor(n/2))); if(target<=c, return(n-1)));

pascalbefore(n,target)= for(k=0,n/2, if(target<=binomial(n,k), return(k-1))); -1;

selfpowerbefore(target)= for(n=1,+oo, if(target<=n^n, return(n-1)));

binomialsbefore(target)= my(n= centralbinomialbefore(target)); my(k=floor(n/2)); print(binomial(n,k)," = binomial("n","k")"); n+=1; k= pascalbefore(n,target); print(binomial(n,k)," = binomial("n","k")");

allbefore(target)= my(f=fibonaccibefore(target)); my(fx= fibonacci(f)); print(floor(target*fx/fibonacci(f+1))," = floor(N/phi)",); print(fx," = fibonacci(",f,")"); powersbefore(target); my(x=selfpowerbefore(target)); print(x^x," = ",x,"^",x); x= factorialbefore(target); print(x!," = ",x,"!"); binomialsbefore(target);

inspired by espeak-ng which in English can speak short scale numbers up to 10^33-1 (decillion minus one, or nine hundred ninety-nine nonillion, etc.).  (its range in long scale European languages is surprisingly much less.)

perhaps espeak-ng could be modified to handle up to undecillion minus one.

? allbefore(10^36)
618033988749894848204586834365638117 = floor(N/phi)
638817435613190341905763972389505493 = fibonacci(173)
664613997892457936451903530140172288 = 2^119
608266787713357709119683992618861307 = 3^75
332306998946228968225951765070086144 = 4^59
444089209850062616169452667236328125 = 5^51
623673825204293256669089197883129856 = 6^46
311973482284542371301330321821976049 = 7^42
166153499473114484112975882535043072 = 8^39
202755595904452569706561330872953769 = 9^37
100000000000000000000000000000000000 = 10^35
255476698618765889551019445759400441 = 11^34
410186270246002225336426103593500672 = 12^33
442779263776840698304313192148785281 = 13^32
338820052976784335907174521413566464 = 14^31
191751059232884086668491363525390625 = 15^30
481968572106750915091411825223071697 = 17^29
638411683925748518131605316913942641 = 19^28
501096025171921401632658604207540941 = 21^27
768231807465763655682670928358014976 = 24^26
88817841970012523233890533447265625 = 25^25
263130836933693530167218012160000000 = 32!
760401738905937245009910944207609328 = binomial(123,61)
854159945008278200822615808394097481 = binomial(124,56)

Bernoulli numbers (future post fiijydon) not done by the above script:

29149963634884862421418123812691 = numerator(bernfrac(54) < 10^33
84483613348880041862046775994036021/354 = 238654274996836276446459819192192 + 53/354 = bernfrac(58) < 10^33
84483613348880041862046775994036021 = numerator(bernfrac(58) < 10^36
-(10^36) < -1215233140483755572040304994079820246041491/56786730 = -(21399949257225333665810744765191097 + 22298681/56786730) = bernfrac(60)

No comments :