One-liner mini-challenge [HP-71B]
|
04-14-2015, 08:45 PM
(This post was last modified: 04-15-2015 12:00 AM by Gerson W. Barbosa.)
Post: #10
|
|||
|
|||
RE: One-liner mini-challenge [HP-71B]
(04-14-2015 06:55 PM)Valentin Albillo Wrote: Hi, Gerson: Hello Valentin, Congratulations for your nicer and even shorter solution! Your results match mine except for n=34 and n=30. Yours are better, BTW. I get 10.2870884151 and 9.58513017649, respectively. Here is my original HP-71B program: 1 INPUT N @ A=2*SQR(N) @ B=1/A @ C=B/(12*N) @ D=C/(16*N*N) @ A+B-C+D-1.46035450881 By removing two pairs of parentheses and the spaces it can shortened to 65 characters: 1 INPUTN@A=2*SQR(N)@B=1/A@C=B/12/N@D=C/16/N/N@A+B-C+D-1.46035450881 I won't copy your idea of replacing SQR with ^.5. Also, if you remove one pair of parentheses, your program will end up being shorter anyway :-) Here is the expression I've come up with: \[\sum_{k=1}^{n}\frac{1}{\sqrt{k}}\simeq \zeta\left ( \frac{1}{2} \right )+2\sqrt{n}+\frac{1}{2\sqrt{n}}-\frac{1}{24\sqrt{n^{3}}}+\frac{15}{8}\cdot \frac{1}{720\sqrt{n^{7}}}\] Since this was done experimentally and manually, it is possible that not all terms are correct. (*) Best regards, Gerson. P.S.: (*) Both series appear to be equivalent, at least for x >= 0: http://www.wolframalpha.com/input/?i=Sim...2%29%29%5D (somewhat lazy to check it by hand) WP 34s program: Code:
This was actually my first program, the HP-71B being a straightforward conversion. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)