(33s) OEIS A4186: Digits in Descending Order
|
09-24-2022, 07:41 AM
(This post was last modified: 09-24-2022 12:46 PM by C.Ret.)
Post: #2
|
|||
|
|||
RE: (33s) OEIS A4186: Digits in Descending Order
Hello,
Since I still have no HP-35S, here is a version for an HP-41C without any extra RAM or ROM module: Code: 001 LBL "4186 // real integer input N in register X: [ ][RTN] 1234 [R/S] ... goose ... goose ... goose ... 4321. 10477 [R/S] ... goose ... goose ... goose ... 77410. This is a simplified version from a code published as one of the numerous solutions of the code challenge Re: Misez p'tit, Optimisez - N°85 (L'Algorithme de Kaprekar) on the French Forum Silicium (20 août 2018). A close related code may produce both decreasing and increasing digits sorted integers from the input: Code: X: N=hdebcijadf [ ][RTN] 1342 [R/S] ... goose ... goose ... goose ... 1234. [X<>Y] 4321. 10477 [R/S] ... goose ... goose ... goose ... 1477. [X<>Y] 77410. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(33s) OEIS A4186: Digits in Descending Order - Gerald H - 09-22-2022, 03:33 AM
RE: (33s) OEIS A4186: Digits in Descending Order - C.Ret - 09-24-2022 07:41 AM
RE: (33s) OEIS A4186: Digits in Descending Order - Gerald H - 09-24-2022, 11:32 AM
RE: (33s) OEIS A4186: Digits in Descending Order - Gerald H - 09-24-2022, 11:56 AM
RE: (33s) OEIS A4186: Digits in Descending Order - C.Ret - 09-24-2022, 12:44 PM
RE: (33s) OEIS A4186: Digits in Descending Order - C.Ret - 09-25-2022, 04:18 PM
|
User(s) browsing this thread: 1 Guest(s)