Ruud H.G. van Tol on Wed, 05 Jan 2022 09:36:42 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Collatz nature




On 2022-01-04 13:03, Ruud H.G. van Tol wrote:
On 2022-01-04 04:31, Ruud H.G. van Tol wrote:

x -> (3x+1)/2
[...]
The inverse ("(x-1)/3") is always a sequence,
in which each element is one of:
- a dead end (0 == (x % 3)) (an "empty" sequence)
- in need of multiplication (2 == (x % 3)) (a singular)
- a sequence itself (1 == (x % 3))

We started calling the sets like (3,1,2) "Cab numbers",
because (a,b,c) = (1,2,3) in the order of "(3x+1)/2"
spells cab.

There are of course already Taxicab numbers (1729, Ramanujan),
but it still feels fine as a casual name.
(cab comes from capriole, the leap of a lamb)

- - - - - - - -

I'm now building a Perl module around it,
using ideas from Math::Complex,
to facilitate exploring.

Because Perl has overload, and magic,
it is a real nice environment to build such in.

User code might then look like:

my :i(1,2,3) $x= 9;
say $x--, $x;  # 9, 7

Etc.

-- Greetings, Ruud