Desigur ca nu este tocmai cinstit sa dam aici solutia...
Miza este relativ mare, nu exact nota este miza, ci modul cinstit de a trece prin viata...
Pentru a face ceva cinstit, sa incercam sa facem ceva impreuna.
Incercati de exemplu sa tipariti tot enuntul in LaTeX...
(Cel ce va raspunde va avea de lucru mult mai mult.)
Incercati sa ne spuneti ce ati incercat, pentru ca ceva trebuie sa incercati...
Ceea ce fac pana una alta este sa programez sirul dat, doar asa ca sa vedem cum stau lucrurile "cand avem si numere"...
Codul folosit este cod sage, mathsage este un program liber pe care il recomand pentru a asista matematica si fizica de la clasa a V-a pana la facultate...
x = {} # dictionar
x[1] = 1.0
for n in [1..99]:
x[n+1] = x[n] + n^2 / sum( [ x[k] for k in [1..n] ] )
for n in [1..100]:
print x[n] / n
EDIT...
OBTINEM... (A se da un clic aici...)
Si obtinem:
sage: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:x = {} # dictionar
:x[1] = 1.0
:for n in [1..99]:
: x[n+1] = x[n] + n^2 / sum( [ x[k] for k in [1..n] ] )
:
:for n in [1..100]:
: print x[n] / n
:--
1.00000000000000
1.00000000000000
1.11111111111111
1.18859649122807
1.23948478791917
1.27395878533316
1.29826571243483
1.31604082056042
1.32945258423154
1.33984439312208
1.34808028281683
1.35473521873954
1.36020350690476
1.36476281985715
1.36861331302430
1.37190227299437
1.37474008807332
1.37721085876649
1.37937960784367
1.38129728035964
1.38300427542969
1.38453298293117
1.38590963344756
1.38715566630368
1.38828875424819
1.38932358005087
1.39027243151747
1.39114566199872
1.39195205015364
1.39269908347057
1.39339318353188
1.39403988636279
1.39464398785695
1.39520966183260
1.39574055647904
1.39623987362112
1.39671043423145
1.39715473286636
1.39757498312804
1.39797315581501
1.39835101108365
1.39871012567896
1.39905191608638
1.39937765829356
1.39968850472229
1.39998549878838
1.40026958746496
1.40054163215915
1.40080241815821
1.40105266285858
1.40129302295547
1.40152410074199
1.40174644964316
1.40196057909028
1.40216695882517
1.40236602271009
1.40255817210801
1.40274377888849
1.40292318810631
1.40309672039367
1.40326467410085
1.40342732721545
1.40358493908660
1.40373775197662
1.40388599245997
1.40402987268674
1.40416959152559
1.40430533559947
1.40443728022552
1.40456559026948
1.40469042092336
1.40481191841440
1.40493022065238
1.40504545782115
1.40515775292033
1.40526722226157
1.40537397592418
1.40547811817358
1.40557974784642
1.40567895870511
1.40577583976480
1.40587047559521
1.40596294659945
1.40605332927203
1.40614169643771
1.40622811747288
1.40631265851101
1.40639538263337
1.40647635004641
1.40655561824668
1.40663324217449
1.40670927435709
1.40678376504223
1.40685676232287
1.40692831225367
1.40699845895994
1.40706724473958
1.40713471015858
1.40720089414048
1.40726583405032
Putem desigur incepe si cu x[1] = 100...
Obtinem...
REZULTATE
sage: x[1] = 100.
sage: %cpaste
Pasting code; enter '--' alone on the line to stop or use Ctrl-D.
:
:for n in [1..99]:
: x[n+1] = x[n] + n^2 / sum( [ x[k] for k in [1..n] ] )
:
:for n in [1..100]:
: print x[n] / n
:--
100.000000000000
50.0050000000000
33.3433330000167
25.0149987501708
20.0199970007564
16.6916608356462
14.3157042914105
12.5349842621514
11.1510878011612
10.0449670416278
9.14086416063101
8.38827386117462
7.75223086254389
7.20775989482458
6.73654569564152
6.32485175814536
5.96217363855665
5.64034116121694
5.35290413785461
5.09470237108975
4.86155851409836
4.65005469583920
4.45736741797620
4.28114372758485
4.11940710842284
3.97048508961257
3.83295294129533
3.70558943551367
3.58734176002548
3.47729744936513
3.37466174861198
3.27873922146101
3.18891870228897
3.10466090374588
3.02548814876677
2.95097581392148
2.88074516033566
2.81445729657748
2.75180807033651
2.69252372635570
2.63635719979276
2.58308493910557
2.53250417225993
2.48443054573075
2.43869607830647
2.39514738179154
2.35364410885604
2.31405759490650
2.27626966626051
2.24017159134231
2.20566315526880
2.17265184121563
2.14105210446003
2.11078472708661
2.08177624308976
2.05395842507283
2.02726782497951
2.00164536233601
1.97703595436705
1.95338818310028
1.93065399521434
1.90878843093349
1.88774937874149
1.86749735309041
1.84799529262789
1.82920837676668
1.81110385867977
1.79365091303032
1.77682049694129
1.76058522288079
1.74491924228824
1.72979813889697
1.71519883082340
1.70109948059349
1.68747941236538
1.67431903568563
1.66159977518473
1.64930400567895
1.63741499219948
1.62591683451747
1.61479441577648
1.60403335488178
1.59361996232931
1.58354119918787
1.57378463897473
1.56433843218908
1.55519127328941
1.54633236992051
1.53775141421297
1.52943855599403
1.52138437776271
1.51357987129497
1.50601641575616
1.49868575720853
1.49157998941091
1.48469153581644
1.47801313268179
1.47153781320852
1.46525889264349
1.45916995427133
sage:
Desigur ca putem face acelasi lucru pana la 10000...
Plec cu o valoare mai mare, cu 20162016 de exemplu
Daca tot trebuie sa fac asa ceva, prefer sa iau un program care calculeaza si mai exact. Desigur ca ajunge sa tinem minte "la un punct n" doar ultimul termen si suma pana la el...
Cod pari / gp:
{
x = 20162016. ;
s = x ;
for( n=2, 10000,
x = x + n^2 / s;
s = x + s;
if( (n<100) + (10000-n<100), print( "n=", n, " :: x(n) / n ~ ", x/n ) ) )
}
Obtinem:
REZULTATE
n=2 :: x(n) / n ~ 10081008.000000099196429563392867062500
n=3 :: x(n) / n ~ 6720672.0000001405282752148061956395930
n=4 :: x(n) / n ~ 5040504.0000001715271594533658802671353
n=5 :: x(n) / n ~ 4032403.2000001992194960398122420808858
n=6 :: x(n) / n ~ 3360336.0000002255341044378778961050306
n=7 :: x(n) / n ~ 2880288.0000002511795305730156206325952
n=8 :: x(n) / n ~ 2520252.0000002764657632876109892362505
n=9 :: x(n) / n ~ 2240224.0000003015453367739489513824498
n=10 :: x(n) / n ~ 2016201.6000003264999306317691756677755
n=11 :: x(n) / n ~ 1832910.5454548968307004705616461992335
n=12 :: x(n) / n ~ 1680168.0000003762019521628915382104994
n=13 :: x(n) / n ~ 1550924.3076927086870474971943406683170
n=14 :: x(n) / n ~ 1440144.0000004257657204628425046414845
n=15 :: x(n) / n ~ 1344134.4000004505222835076072264679154
n=16 :: x(n) / n ~ 1260126.0000004752694032221843214412094
n=17 :: x(n) / n ~ 1186000.9411769705987180028946474945525
n=18 :: x(n) / n ~ 1120112.0000005247478793859593827966639
n=19 :: x(n) / n ~ 1061158.7368426547463989977778441954122
n=20 :: x(n) / n ~ 1008100.8000005742177261865064318174956
n=21 :: x(n) / n ~ 960096.00000059895215046029990395625037
n=22 :: x(n) / n ~ 916455.27272789641435997257070048517206
n=23 :: x(n) / n ~ 876609.39130499624902341153143777282967
n=24 :: x(n) / n ~ 840084.00000067315997300534303176258680
n=25 :: x(n) / n ~ 806480.64000069789838114938097287654567
n=26 :: x(n) / n ~ 775462.15384687648443293966016539950293
n=27 :: x(n) / n ~ 746741.33333408071307014680126483183277
n=28 :: x(n) / n ~ 720072.00000077212278905536211108839744
n=29 :: x(n) / n ~ 695241.93103527962606557979573164120139
n=30 :: x(n) / n ~ 672067.20000082161369477714508878515762
n=31 :: x(n) / n ~ 650387.61290407216796742432207820852860
n=32 :: x(n) / n ~ 630063.00000087111087563629692385055258
n=33 :: x(n) / n ~ 610970.18181907767991718637148343640375
n=34 :: x(n) / n ~ 593000.47058915590816943277103162758856
n=35 :: x(n) / n ~ 576057.60000094536777896792207868250103
n=36 :: x(n) / n ~ 560056.00000097012286951805158149179142
n=37 :: x(n) / n ~ 544919.35135234623062682544657619035648
n=38 :: x(n) / n ~ 530579.36842207226852792941602866485074
n=39 :: x(n) / n ~ 516974.76923181362661201955797825063380
n=40 :: x(n) / n ~ 504050.40000106915591059769517316602931
n=41 :: x(n) / n ~ 491756.48780597196588780748820202749865
n=42 :: x(n) / n ~ 480048.00000111867938924461706901439320
n=43 :: x(n) / n ~ 468884.09302439925666764052321546998786
n=44 :: x(n) / n ~ 458227.63636480457067774027920450126289
n=45 :: x(n) / n ~ 448044.80000119297233183738620190424197
n=46 :: x(n) / n ~ 438304.69565339165159152110018602549402
n=47 :: x(n) / n ~ 428979.06383102973969662872680829100249
n=48 :: x(n) / n ~ 420042.00000126727361556284076029212940
n=49 :: x(n) / n ~ 411469.71428700632811392326148966053381
n=50 :: x(n) / n ~ 403240.32000131681197489136906416320451
n=51 :: x(n) / n ~ 395333.64706016511172308841813612953992
n=52 :: x(n) / n ~ 387731.07692444327645721060411293160326
n=53 :: x(n) / n ~ 380415.39622780621949405627202915930881
n=54 :: x(n) / n ~ 373370.66666808256427432121196968512468
n=55 :: x(n) / n ~ 366582.10909234976162411955744829076775
n=56 :: x(n) / n ~ 360036.00000146544445276520987547369817
n=57 :: x(n) / n ~ 353719.57894885863985078233067729010046
n=58 :: x(n) / n ~ 347620.96551875637303984185496412755433
n=59 :: x(n) / n ~ 341729.08474730248109049761004428602381
n=60 :: x(n) / n ~ 336033.60000156454526814576437331524492
n=61 :: x(n) / n ~ 330524.85246060571527937900092643667939
n=62 :: x(n) / n ~ 325193.80645322700213965885321994051401
n=63 :: x(n) / n ~ 320032.00000163887648215997015245348726
n=64 :: x(n) / n ~ 315031.50000166365452515833005292166519
n=65 :: x(n) / n ~ 310184.86154014997148858192334053112850
n=66 :: x(n) / n ~ 305485.09091080412106360076587516449250
n=67 :: x(n) / n ~ 300925.61194203649881031197110598328978
n=68 :: x(n) / n ~ 296500.23529588041819680433301686666727
n=69 :: x(n) / n ~ 292203.13043657016002612924208913053520
n=70 :: x(n) / n ~ 288028.80000181233191238739479860038562
n=71 :: x(n) / n ~ 283972.05633986528188559601996878431391
n=72 :: x(n) / n ~ 280028.00000186189419614970128373092481
n=73 :: x(n) / n ~ 276192.00000188667587507821564204486239
n=74 :: x(n) / n ~ 272459.67567758713357320172840283347958
n=75 :: x(n) / n ~ 268826.88000193624025315297804416441007
n=76 :: x(n) / n ~ 265289.68421248733872150243239086698844
n=77 :: x(n) / n ~ 261844.36363834944228824982472367064974
n=78 :: x(n) / n ~ 258487.38461739520460635435550304375078
n=79 :: x(n) / n ~ 255215.39240709866395383181315900915009
n=80 :: x(n) / n ~ 252025.20000206015669469403908256687454
n=81 :: x(n) / n ~ 248913.77777986271863167031485605338921
n=82 :: x(n) / n ~ 245878.24390454874967458297150303195140
n=83 :: x(n) / n ~ 242915.85542382125696643050159622226655
n=84 :: x(n) / n ~ 240024.00000215929492903590263471149142
n=85 :: x(n) / n ~ 237200.18823747819777606078046048290132
n=86 :: x(n) / n ~ 234442.04651383677254836708614722725347
n=87 :: x(n) / n ~ 231747.31034706123745728473790580906177
n=88 :: x(n) / n ~ 229113.81818407661897720171911377624749
n=89 :: x(n) / n ~ 226539.50562026075138135017812334340011
n=90 :: x(n) / n ~ 224022.40000230800964187329669095023175
n=91 :: x(n) / n ~ 221560.61538694818081999749370967356809
n=92 :: x(n) / n ~ 219152.34782844453949597587216055357330
n=93 :: x(n) / n ~ 216795.87097012430542935777064045596523
n=94 :: x(n) / n ~ 214489.53191730077413456014303964801117
n=95 :: x(n) / n ~ 212231.74737085299710429748105509577560
n=96 :: x(n) / n ~ 210021.00000245673201904726747034791812
n=97 :: x(n) / n ~ 207855.83505402791150025974246068530305
n=98 :: x(n) / n ~ 205734.85714536345051133025190702726811
n=99 :: x(n) / n ~ 203656.72727525836846154288921456019132
n=9901 :: x(n) / n ~ 2036.3618252488139829375863239268587339
n=9902 :: x(n) / n ~ 2036.1561737305269997277828079749539743
n=9903 :: x(n) / n ~ 2035.9505637454204842726709241030173167
n=9904 :: x(n) / n ~ 2035.7449952809137074321794706550469443
n=9905 :: x(n) / n ~ 2035.5394683244310206231842711798532497
n=9906 :: x(n) / n ~ 2035.3339828634018532551244943254650971
n=9907 :: x(n) / n ~ 2035.1285388852607101671720475278869035
n=9908 :: x(n) / n ~ 2034.9231363774471690669529472478843278
n=9909 :: x(n) / n ~ 2034.7177753274058779708195693953347268
n=9910 :: x(n) / n ~ 2034.5124557225865526456726844657323944
n=9911 :: x(n) / n ~ 2034.3071775504439740523321827976887510
n=9912 :: x(n) / n ~ 2034.1019407984379857904553962437149178
n=9913 :: x(n) / n ~ 2033.8967454540334915450019234292192913
n=9914 :: x(n) / n ~ 2033.6915915047004525342438666564966457
n=9915 :: x(n) / n ~ 2033.4864789379138849593203893915287389
n=9916 :: x(n) / n ~ 2033.2814077411538574553355041516601900
n=9917 :: x(n) / n ~ 2033.0763779019054885439980014916583376
n=9918 :: x(n) / n ~ 2032.8713894076589440878024316643126861
n=9919 :: x(n) / n ~ 2032.6664422459094347457500514095792050
n=9920 :: x(n) / n ~ 2032.4615364041572134306086492033279679
n=9921 :: x(n) / n ~ 2032.2566718699075727677101631730102058
n=9922 :: x(n) / n ~ 2032.0518486306708425552850067630236050
n=9923 :: x(n) / n ~ 2031.8470666739623872263320181072234091
n=9924 :: x(n) / n ~ 2031.6423259873026033120229499399023761
n=9925 :: x(n) / n ~ 2031.4376265582169169066404177496457095
n=9926 :: x(n) / n ~ 2031.2329683742357811340482247527585127
n=9927 :: x(n) / n ~ 2031.0283514228946736156929831344639117
n=9928 :: x(n) / n ~ 2030.8237756917340939401359518767805503
n=9929 :: x(n) / n ~ 2030.6192411682995611341140123619094748
n=9930 :: x(n) / n ~ 2030.4147478401416111351287038090932910
n=9931 :: x(n) / n ~ 2030.2102956948157942655622414712556910
n=9932 :: x(n) / n ~ 2030.0058847198826727083194413852877930
n=9933 :: x(n) / n ~ 2029.8015149029078179839944763366200223
n=9934 :: x(n) / n ~ 2029.5971862314618084295613885647052621
n=9935 :: x(n) / n ~ 2029.3928986931202266785872856012415223
n=9936 :: x(n) / n ~ 2029.1886522754636571429671464973811862
n=9937 :: x(n) / n ~ 2028.9844469660776834961791665598098109
n=9938 :: x(n) / n ~ 2028.7802827525528861580595695784312378
n=9939 :: x(n) / n ~ 2028.5761596224848397810958173904682266
n=9940 :: x(n) / n ~ 2028.3720775634741107382371474870797280
n=9941 :: x(n) / n ~ 2028.1680365631262546122213702291080523
n=9942 :: x(n) / n ~ 2027.9640366090518136864168580983023504
n=9943 :: x(n) / n ~ 2027.7600776888663144371786602693197948
n=9944 :: x(n) / n ~ 2027.5561597901902650277176766459833946
n=9945 :: x(n) / n ~ 2027.3522829006491528034818263626763073
n=9946 :: x(n) / n ~ 2027.1484470078734417890481466083775765
n=9947 :: x(n) / n ~ 2026.9446520994985701865247584866942282
n=9948 :: x(n) / n ~ 2026.7408981631649478754616374803203679
n=9949 :: x(n) / n ~ 2026.5371851865179539142691269426561164
n=9950 :: x(n) / n ~ 2026.3335131572079340431431338928486850
n=9951 :: x(n) / n ~ 2026.1298820628901981884959472432753901
n=9952 :: x(n) / n ~ 2025.9262918912250179688916194404747288
n=9953 :: x(n) / n ~ 2025.7227426298776242024848533517475440
n=9954 :: x(n) / n ~ 2025.5192342665182044159623370800965857
n=9955 :: x(n) / n ~ 2025.3157667888219003549854702398501855
n=9956 :: x(n) / n ~ 2025.1123401844688054961334260742250890
n=9957 :: x(n) / n ~ 2024.9089544411439625603454946442254959
n=9958 :: x(n) / n ~ 2024.7056095465373610278616531656508159
n=9959 :: x(n) / n ~ 2024.5023054883439346546603104175943331
n=9960 :: x(n) / n ~ 2024.2990422542635589903921729916596405
n=9961 :: x(n) / n ~ 2024.0958198320010488978091819962021428
n=9962 :: x(n) / n ~ 2023.8926382092661560736874696742198804
n=9963 :: x(n) / n ~ 2023.6894973737735665712432862370721819
n=9964 :: x(n) / n ~ 2023.4863973132428983240408480589969590
n=9965 :: x(n) / n ~ 2023.2833380153986986713910592194285936
n=9966 :: x(n) / n ~ 2023.0803194679704418852400592213890820
n=9967 :: x(n) / n ~ 2022.8773416586925266985465505547361715
n=9968 :: x(n) / n ~ 2022.6744045753042738351468606128044060
n=9969 :: x(n) / n ~ 2022.4715082055499235411066933099690458
n=9970 :: x(n) / n ~ 2022.2686525371786331175585265858995184
n=9971 :: x(n) / n ~ 2022.0658375579444744550236128197491309
n=9972 :: x(n) / n ~ 2021.8630632556064315692175400142520084
n=9973 :: x(n) / n ~ 2021.6603296179283981383383124456673617
n=9974 :: x(n) / n ~ 2021.4576366326791750418359103107259933
n=9975 :: x(n) / n ~ 2021.2549842876324679006622887361951810
n=9976 :: x(n) / n ~ 2021.0523725705668846190007773503864849
n=9977 :: x(n) / n ~ 2020.8498014692659329274738424488873641
n=9978 :: x(n) / n ~ 2020.6472709715180179278281746190025149
n=9979 :: x(n) / n ~ 2020.4447810651164396390960655188453091
n=9980 :: x(n) / n ~ 2020.2423317378593905452320383377243666
n=9981 :: x(n) / n ~ 2020.0399229775499531442236972944258983
n=9982 :: x(n) / n ~ 2019.8375547719960974986757623591997446
n=9983 :: x(n) / n ~ 2019.6352271090106787878662562137167739
n=9984 :: x(n) / n ~ 2019.4329399764114348612738112909782284
n=9985 :: x(n) / n ~ 2019.2306933620209837935750655641244734
n=9986 :: x(n) / n ~ 2019.0284872536668214411111165793121563
n=9987 :: x(n) / n ~ 2018.8263216391813189998220040533057675
n=9988 :: x(n) / n ~ 2018.6241965064017205646481921811627574
n=9989 :: x(n) / n ~ 2018.4221118431701406903980236233814522
n=9990 :: x(n) / n ~ 2018.2200676373335619540801179651287586
n=9991 :: x(n) / n ~ 2018.0180638767438325186996882626708150
n=9992 :: x(n) / n ~ 2017.8161005492576636985177501138950561
n=9993 :: x(n) / n ~ 2017.6141776427366275257721985108373681
n=9994 :: x(n) / n ~ 2017.4122951450471543188597285524138489
n=9995 :: x(n) / n ~ 2017.2104530440605302519775769151039047
n=9996 :: x(n) / n ~ 2017.0086513276528949262240617981407392
n=9997 :: x(n) / n ~ 2016.8068899837052389421568998778374683
n=9998 :: x(n) / n ~ 2016.6051690001034014738082796230128589
n=9999 :: x(n) / n ~ 2016.4034883647380678441556711400807775
n=10000 :: x(n) / n ~ 2016.2018480655047671020473535322325849
?
Si desigur ca daca tot am scris asa ceva nu e greu de vazut cum stau lucrurile la pasul n = 10^6, 10^7...
{
x = 20162016. ; s = x ; N = 10^6 ;
for( n=2, N, x = x + n^2 / s; s = x + s; );
print( "n=", N, " :: x(n) ~ ", x, " :: x(n) / n ~ ", x/N );
}
Obtinem:
n=1000000 :: x(n) ~ 20186810.099768716208968163585602977545 :: x(n) / n ~ 20.186810099768716208968163585602977545
{
x = 20162016. ; s = x ; N = 10^7 ;
for( n=2, N, x = x + n^2 / s; s = x + s; );
print( "n=", N, " :: x(n) ~ ", x, " :: x(n) / n ~ ", x/N );
}
Obtinem:
? #
timer = 1 (on)
n=10000000 :: x(n) ~ 22592823.103122178346761913721420134440 :: x(n) / n ~ 2.2592823103122178346761913721420134440
time = 5,125 ms.
Ma opresc aici.
Incercati sa dati solutia!
N.B. Este bine sa mentionati mereu nivelul propriu, cadrul in care a aparut problema, propriile incercari, ...