Dr. B. Dachshund

Critical Sniffing, Burrowing and Barking Laboratory

This isn't my usual research field but I am here to give you a demo of the tapestry theme, a Zola theme for academic and industry researcher profile websites. It has been derived from and mostly backward-compatible with the terminus theme.

A woof woof hello world of sorts in Python

I was told to explain something complex, beyond using my exceptional barking skills, and also write it out in code. So, here it is.

The Collatz conjecture is a famous unsolved problem in mathematics. It is named after the German mathematician Lothar Collatz, who first proposed it in 1937. It states something along the following lines.

Start with any positive integer $n$. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half of the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. No matter what value of $n$ you start with, the conjecture is that you will always eventually reach 1.

Despite its simple definition, the conjecture has proven to be very difficult to prove or disprove, and it remains an open question in mathematics. Following is a simple function implementation in the Python language that prints the numbers of the Collatz sequence given an initial positive integer n.

def collatz(n):
                if not isinstance(n, int) or n < 1:
                    raise ValueError("n must be a positive integer")
                while n != 1:
                    print(n)
                    n = n // 2 if n % 2 == 0 else 3 * n + 1
                print(1)

As you may have noticed, this simple introduction shows some important features, such as blockquotes and code blocks. Please feel free to look around by browsing the other pages from the navigation menu.

Presentation style and colour palette

Style: scholarly · Variant: contemporary-research-lab

Light mode

bg-primary
#fbfaf8
text-heading
#1e1521
accent-primary
#a8481f
accent-secondary
#1f5c50

Dark mode

bg-primary
#1a1420
text-heading
#faf7f5
accent-primary
#e8916b
accent-secondary
#6cb5a4