mathe 发表于 2021-1-4 21:40:53

阶乘和开平方

从整数3出发,经过若干次阶乘或开平方并取整操作,可以达到哪些整数呢?这些整数各自最少需要多少次操作来达到呢?
比如
3本身0次操作。
1只需要一次开平方
2需要阶乘在开平方两次操作。

lsr314 发表于 2021-1-4 22:18:51

本帖最后由 lsr314 于 2021-1-4 22:25 编辑

任意正整数都可以通过一个整数的阶乘和若干次开平方得到(从而可以建立数据库,从$3$经过若干次迭代得到目标值)。
假设$a^(2^k)<n!<(a+1)^(2^k)$,那么$=a$
$lna<1/2^klnn!<ln(a+1)$
对于确定的$a$,只要增大$k$,就可以使中间的增量$1/2^klnn$足够小,从而介于$lna$和$ln(a+1)$之间,这个区间长度是$ln(1+1/a)≈1/a$.
大致估计$nlnn-n+1/2ln(2pin)≈2^kln(a+1/2)$,
$n≈(2^klna)/(kln2),lnn/2^k≈(kln2)/2^k<1/a,2^k>kaln2$.
当然这个估计很粗糙,只是用来大概估计$k$的大小,$n$的大小要用其他方式求解。
比如$a=100$,取$k=10$.从图像中得到$n≈825$,检验$825!^(1/2^10)=100.369$,满足条件。

.·.·. 发表于 2021-1-5 00:46:09

先把几个简单的东西算出来好了
首先,0次阶乘,得到3
1次阶乘,得到6,(2)
2次阶乘,新得到720,26,5
3次阶乘,(720!~...6636426 2576 50 7 (2)) (26!~4481307 2116 46 (6)) 120 10 (3)
---
10以内: 1 2 3 5 6 7
4次阶乘:7:5040 70 8 (2)
10:3628800 1904 43 (6)
那些大数的阶乘实在不敢碰瓷,就这样好了……

mathe 发表于 2021-1-5 09:13:15

不知道有没有算错
C=0,from start
C=1,from start
C=1,from 3!
C=2,from 3!
C=3,from 6!
C=4,from 6!
C=6,from 5!
C=8,from 20082117944246!
C=9,from 10!
C=13,from 10!
C=13,from 2117!
C=14,from 2117!
C=14,from 46!
C=15,from 43!
C=16,from 7!
C=17,from 7!
C=19,from 101652092779175702171!
C=20,from 101652092779175702171!
C=20,from 8!
C=20,from 954331!
C=21,from 4!
C=21,from 285810!
C=21,from 1524875271235439076315!
C=23,from 17!
C=23,from 10461675836172505677753392!
C=25,from 829459657340921965209631!
C=26,from 24!
C=26,from 23!
C=26,from 301130983!
C=27,from 63!
C=27,from 10720!
C=28,from 18859677!
C=29,from 11!
C=30,from 10720!
C=31,from 10720!
C=31,from 10461675836172505677753392!
C=31,from 3959527!
C=31,from 272359434134765!
C=32,from 5247735!
C=33,from 29!
C=33,from 246798!
C=33,from 21!
C=33,from 613051585639!
C=34,from 31!
C=35,from 1143536!
C=35,from 13205921705294205!
C=36,from 291!
C=36,from 31845!
C=37,from 4574144!
C=37,from 1408!
C=38,from 22!
C=38,from 47!
C=38,from 63258!
C=38,from 396456!
C=39,from 54529900!
C=39,from 6229207!
C=39,from 7954595733146159116169!
C=40,from 3938427356615!
C=42,from 70471434!
C=43,from 28!
C=43,from 218!
C=45,from 30367975900570699949054263!
C=48,from 23756255408!
C=49,from 713127013002609!
C=50,from 1879!
C=52,from 543934966!
C=53,from 789601361368458493843521408503!
C=53,from 55530!
C=53,from 127841!
C=54,from 117!
C=54,from 128!
C=54,from 239746665881036229693480449219!
C=54,from 110605661!
C=55,from 83!
C=55,from 6532027380665612!
C=55,from 1384703!
C=55,from 3052!
C=56,from 4010005!
C=56,from 201!
C=57,from 3476996840!
C=57,from 7147792818!
C=57,from 153!
C=58,from 410554433466463042!
C=58,from 3476996840!
C=58,from 301130983!
C=60,from 17182339742875652406!
C=60,from 395!
C=61,from 48!
C=61,from 22914738!
C=61,from 230!
C=62,from 243!
C=63,from 49008!
C=63,from 6318!
C=64,from 405081!
C=65,from 372!
C=67,from 27564!
C=68,from 16343219991!
C=70,from 163535604025!
C=75,from 114659752566747097777!
C=86,from 3649!

lsr314 发表于 2021-1-5 10:27:03

mathe 发表于 2021-1-5 09:13
不知道有没有算错
C=0,from start
C=1,from start


建议用0表示阶乘,正整数表示开平方的次数,默认每一步都取整。比如26=(0,0,1),这样计算括号里的数字之和加上0的个数就是操作的步数。

mathe 发表于 2021-1-5 12:11:44

C=0 by
C=1 by
C=1 by
C=2 by
C=3 by
C=4 by
C=6 by
C=8 by
C=9 by
C=13 by
C=13 by
C=14 by
C=14 by
C=15 by
C=16 by
C=17 by
C=19 by
C=20 by
C=20 by
C=20 by
C=21 by
C=21 by
C=21 by
C=23 by
C=23 by
C=25 by
C=26 by
C=26 by
C=26 by
C=27 by
C=27 by
C=28 by
C=29 by
C=30 by
C=31 by
C=31 by
C=31 by
C=31 by
C=32 by
C=33 by
C=33 by
C=33 by
C=33 by
C=34 by
C=35 by
C=35 by
C=36 by
C=36 by
C=37 by
C=37 by
C=38 by
C=38 by
C=38 by
C=38 by
C=39 by
C=39 by
C=39 by
C=40 by
C=42 by
C=43 by
C=43 by
C=45 by
C=48 by
C=49 by
C=50 by
C=52 by
C=53 by
C=53 by
C=53 by
C=54 by
C=54 by
C=54 by
C=54 by
C=55 by
C=55 by
C=55 by
C=55 by
C=56 by
C=56 by
C=57 by
C=57 by
C=57 by
C=58 by
C=58 by
C=58 by
C=60 by
C=60 by
C=61 by
C=61 by
C=61 by
C=62 by
C=63 by
C=63 by
C=64 by
C=65 by
C=67 by
C=68 by
C=70 by
C=75 by
C=86 by

mathe 发表于 2021-1-5 13:36:02

弄错了一点,舍去弄成四舍五入了
C=0 by
C=1 by
C=1 by
C=2 by
C=3 by
C=4 by
C=6 by
C=8 by
C=9 by
C=13 by
C=13 by
C=14 by
C=14 by
C=15 by
C=16 by
C=17 by
C=19 by
C=20 by
C=20 by
C=20 by
C=21 by
C=21 by
C=21 by
C=23 by
C=23 by
C=25 by
C=26 by
C=26 by
C=26 by
C=27 by
C=27 by
C=28 by
C=28 by
C=29 by
C=30 by
C=31 by
C=31 by
C=31 by
C=31 by
C=32 by
C=32 by
C=33 by
C=33 by
C=33 by
C=33 by
C=34 by
C=35 by
C=35 by
C=36 by
C=36 by
C=36 by
C=36 by
C=36 by
C=37 by
C=38 by
C=38 by
C=38 by
C=38 by
C=39 by
C=40 by
C=41 by
C=42 by
C=43 by
C=45 by
C=45 by
C=46 by
C=46 by
C=47 by
C=49 by
C=50 by
C=50 by
C=51 by
C=52 by
C=52 by
C=53 by
C=53 by
C=54 by
C=54 by
C=54 by
C=55 by
C=56 by
C=57 by
C=58 by
C=58 by
C=59 by
C=61 by
C=61 by
C=61 by
C=62 by
C=63 by
C=63 by
C=66 by
C=66 by
C=68 by
C=68 by
C=69 by
C=69 by
C=74 by
C=74 by
C=75 by

lsr314 发表于 2021-1-5 18:50:35

一点想法:随意选取一个比较大的整数,每次开平方以后长度减半(或加一位后减半),最后总会落到个位数,反过来是两位数、四位数(或三位数)等等,假设一个充分大的数$n$,其阶乘一直开平方以后必然经过10到99之间的一个数$a$,由于$n$充分大,可以认为$a$在10到99之间的分布是随机的(甚至是均匀的),这样只要选取的n足够多,总会铺满所有10到99之间的两位数。同理,三位数、四位数也可以铺满。
所以我有一个想当然的猜想:任何正整数$a$都可以表示成的形式。

mathe 发表于 2021-1-5 20:11:20

竟然有人已经算过了:
https://oeis.org/A139003

wayne 发表于 2021-1-6 11:35:04

这么冷僻的操作都有人计算出来,:lol
页: [1] 2
查看完整版本: 阶乘和开平方