(01-02-2021 12:57 AM)Valentin Albillo Wrote:
...
My own solutions and comments in a few days.
- P.S.: If you manage to solve them, do not spoil the fun for others: include your solutions in a CODE block leaving a number of blank lines at the beginning so that they can't be seen without willingly scrolling.
V.
Thanks for the challenge Valentin Albillo !
Code:
1) at 07.09 PM 2021/01/02
2) at 10.31 PM 2021/01/02
.
.
.
.
.
.
.
.
.
.
At first, I wanted to try some different calculation configurations
I asked help to my hp35s
.
1)
** LBL D
RCL L
STO I
CLx
STO C
STO D
007 RCL N
STO+ C
LOG
STO+ D
DSE I
GTO D007
RCL R
STO+ C
LOG
STO+ D
RCL C
RCL D
RTN
With finally :
673 STO L // L is the number of loops
3 STO N // N is the incremental constant
2 STO R // R is the residual number to reach 2021
In the spirit, XEQ D001 evaluates L * N + R (LOL)
It's quite complicated but I have been making several tests around "RCL I" instead of just "RCL N"
My approach started from the way I laid the foundations of the problem :
1a) Σ for i=1..n of the xi gives 2021 : x1 + x2 + ... + xn = 2021
1b) П for i=1..n of the xi is maximized : x1 * x2 * ... * xn is as greater as possible
It means also that LOG(П for i=1..n of xi) is as greater as possible
Or Σ for i=1..n of LOG(xi) is maximized
I have tested several configurations but it seems to me that 673x3 + 2 gives the best result
With a result of 2021 and 2,5329955 x 10^321 [it is ALOG(LOG(3)x673 + LOG(2)) ]
2)
For this time, I'm already waiting after my hp35s result !!
I'm sorry it's INTEGRATING !!!
See you later !
------------------------------------------------------------------------
So, I'm coming back
With my first generation of program, the hp35s didn't gives any satisfying result...
I've made a second approach :
- where SIN(π) gives -2,06761537357 x 10^-13 in RAD MODE on the hp35s, SIN(180) gives 0 in DEG MODE !
--> I prefered to make my calculations in DEG MODE
- because 2.021 x COS(180°) x SIN(180°) gives 0
--> I prefered to insert a test in my function on the hp35s, of course to avoid the error of division by 0
There is the program I used in the spirit of the HP15C :
** LBL I
STO A
RCL A
SIN
STO I
LASTx
COS
STO J
RCL I
ABS
RCL E
y^x
2
÷
RCL J
2
1/x
RCL I
x
RCL E
x√y
+
ABS
RCL E
y^x
+
LOG
RCL E
RCL J
x
RCL I
x
x=y?
GTO I037
÷
RTN
037 1
RTN
With this usage :
- 2.021 [blue] STO E
- [yellow] FN= I
- MODE 1 DEG
- 0 ENTER 180
- [yellow] ∫ A
==> INTEGRATING and ∫= 180 in DEG MODE
Since then, in RAD MODE, I think the expected result would be π...
Now, what I can regret, while wishing my answers are correct with with theory and not just by practice, is not being able to prove what I am saying in mathematical terms.
I am impatiently awaiting the answers of the specialists!