Showing posts with label Wolfram. Show all posts
Showing posts with label Wolfram. Show all posts

Wednesday, 14 June 2023

The RATS Sequence Revisited

It was on Saturday, 26th September 2020, that I first wrote about the RATS sequence, the acronym standing for Reverse --> Add --> Then Sort. On that occasion I was looking at the number 26109 that is a member of OEIS A114613:


A114613

Starting numbers for which the RATS sequence has eventual period 3.      


Yesterday the number associated with my diurnal age, 27099, is the next member of that sequence. The sequence runs (permalink):

20169, 20709, 21159, 22149, 23139, 24129, 25119, 26109, 27099, 28089, 29079, 30159, 30168, 30708, 30789, 31149, 31158, 31779, 32139, 32148, 32769, 33129, 33138, 33759, 34119, 34128, 34749, 35109, 35118, 35739, 36108, 36729, 37098, 37719, 38088, 38709, 39078, 39699, ...

As can be seen, the members of this sequence are few and far between. Up to 40,000, there are only 38 terms. In the case of 27099 the progression is:

27099, 111267, 337788, 1122255, 4446666, 1111113, 2222244, 4446666

There are sequences with different periods but for most numbers the progression is infinite. See Table 1:


Table 1

The original post contains more information that I won't repeat here. Using my diurnal age today (27100) as an example, we see the divergent period-2 pattern emerging, with the red showing the progression of this period-2 pattern (permalink).

27100
22277
49999
134999
113344
555566
1111222
2333333
5566666
11222333
44444455
88889999
178888888
156777779
113344555
666677888
1444555555
167999
116677
238889
1122277
4448888
12333337
55666688
133333444
556667777
1233334444
5566667777
12333334444
55666667777
123333334444
556666667777
1233333334444
5566666667777
12333333334444
55666666667777
123333333334444
556666666667777
1233333333334444
5566666666667777

It won't be until I turn 28089 days old that I'll meet this sequence again. The Wolfram Demonstration Project also features the RATS sequence and displays the progression of terms up till the start of the period-2 pattern. See Table 2.


Table 2

Wednesday, 13 April 2022

Mathematica and the Raspberry Pi


Figure 1

When I first looked at the applications that are preinstalled on my recently purchased Raspberry Pi, I noticed an icon for Mathematica but assumed it was just a promotional link. I'd completely forgotten that Mathematica comes preinstalled with every Raspberry Pi. As it says on this site:

Mathematica is a computational programming tool used in science, maths, computing and engineering. It was first released in 1988. It is proprietary software that you can use for free on the Raspberry Pi and comes bundled for free with Raspbian. Mathematica is generally used for coding projects at university level and above.

Figure 1 shows a screenshot of the setup on my laptop. So far I've been using SageMath for my mathematical calculations but it will be interesting to experiment with Mathematica now that I have acquired it for free. Figure 2 shows a detail from Figure 1.


Figure 2

So far I've only taken baby steps and have learned to:

  • How to launch the Mathematica notebook and run commands
  • How to use variables
  • How to use symbolic values for irrational numbers like Pi
  • How to use lists, ranges, tables and loops
  • How to use and and search for built-in functions
  • How to save a Wolfram script and run it from the command line
  • How to perform list operations
  • How to use Matrices
  • How to plot in 3D

I'm looking forward to becoming more proficient and hopefully I can document some of my progress in future blog posts.