OEIS featured in The New York Times
|
07-27-2024, 07:25 PM
(This post was last modified: 07-27-2024 07:51 PM by C.Ret.)
Post: #18
|
|||
|
|||
RE: OEIS featured in The New York Times
Bonjour à toutes et à tous.
I would like to intervene on behalf of Gil and John. Even though their discussion regarding the use this really esoteric language has made a small digression; their interventions allowed me to notice this very interesting subject that I had not seen last year. Determining The Sisyphus sequence seems easy with a machine equipped with a JPC-ROM that, like other specific pocket computers, allows you to easily have the prime numbers in sequence. But what about a machine without this very opportunistic feature? This is the question I asked myself and to try to explore the possible methods, I took my SHARP PC-1211 out of its hard case. The first program proposed by Valentin led me to this adaptation: 1: D=4.2424626 , W=10-Ǣ-7 , N=1 , P=1 2: PRINT N : N=N/2 : IF N>INT N GOSUB 5 : N=2N+P 3: GOTO 2 5: IF P<7 LET P=1+P+(P>2 : RETURN 6: P=P+INT D , D=10D-W*INT D , F=5 7: F=F+2 , Q=P/F : IF Q<F RETURN 8: GOTO 6+(Q>INT Q where Ǣ stand for the Exp key (10-exponentiation key) As the SHARP PC-1211 is not fast, I tried to optimize things by determining the next prime number from a rudimentary generator of quasi-prime numbers. In reality, integers that are not multiples of 2, 3 or 5. Which facilitates primality tests based on divisibility by odd factors, thus starting only from 7. My code seems to work and list the integers of the sequence quite quickly (for this SHARP). But I have trouble finding an efficient method to adapt the codes given by Valentin later. In particular, how to find with a PC-1211 the results obtained by an HP-71B without having to wait a century? Any ideas or suggestions are of course welcome |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)