[VA] SRC #012c - Then and Now: Sum
|
11-27-2022, 10:20 PM
Post: #1
|
|||
|
|||
[VA] SRC #012c - Then and Now: Sum
Hi, all, After the nice solutions posted for Problem 2 and the 2,500 views mark exceeded (plus no less than three other related threads created by Albert Chan, Thomas Klemm and J-F Garnier,) now's the time for the next part of my SRC #012 - Then and Now, where I'm showing that vintage HP calcs which were able problem-solvers back THEN in the 80's can NOW solve recent tricky problems intended to be tackled with fast modern computers, never mind slow ancient pocket calcs. In the next weeks I'm proposing six increasingly harder such problems for you to try and solve using your vintage HP calcs while abiding by the mandatory rules summarized here:
On the plus side, you may use any official/popular modules, pacs or libraries available at the time, such as the Math Pac, HP-IL and JPC ROMs for the HP-71B, the Advantage Module, PPC ROM and Extended Memory for the HP-41, and assorted libraries for the RPL models, to name a few. That said, I'm done with holding back so here you are, a new problem which deals with the sum of an infinite series, namely:
where f(n) is defined thus: if n < 3 then f(n) = n else f(n) = n * f(d(n)), where d(n) = number of binary digits of n. An example will make it clear; to compute f(10) we proceed as follows: We need f(10), which is 10 * f(d(10)) = 10 * f(4) {as 10 = 10102 which has 4 binary digits} and now we need f(4), which is 4 * f(d(4)) = 4 * f(3) {as 4 = 1002 which has 3 binary digits) and now we need f(3), which is 3 * f(d(3)) = 3 * f(2) {as 3 = 112 which has 2 binary digits) and now we need f(2), which is 2 by definition and backtracking we have f(3) = 3*2 = 6 and then f(4) = 4*6 = 24 and finally f(10) = 10*24 = 240. Some useful advice is to try and find the correct balance between the program doing all the work with no help from you (i.e. sheer brute force, which might take substantial running time,) or else using some insight to help speed up the process. Your choice. If I see interest, in a week or so I'll post my own original solution for the HP-71B, which is a 6-line program that does the job. In the meantime, let's see your very own clever solutions AND remember the above rules, please. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)