Skip to main content

Order and chaos

It is 317am and I have decided to write. I have been thinking about prime numbers. There is no known pattern or simple function to generate primes. Primes look chaotic. Primes are the gaps left when we eliminate the multiples up till n. Primes are building blocks. Primes are mysterious. Except 2 and 5, all primes end in 1,3,7 and 9. 1 repeated 19 times is a prime. The most wanted prime is of the form 1,2,3,4 ... 10,11,12 ... n. None has been found to date and up to n=1 million has been checked. What about primes in the form 10^n + 1. It is 122am the next day. I have 53 percent battery left. 12253 is prime. A nice coincidence. All this has me thinking that order produces chaos and then about entropy. We cannot have order without chaos. There would be nothing to order.

Maybe primes are not chaotic. Maybe we just do not understand them enough yet. My friend Chatty tells me that prime numbers appear chaotic only because we have not yet uncovered the deeper structure that governs them. Although their spacing looks irregular, primes follow precise global laws like the Prime Number Theorem, distribute cleanly in modular patterns, create structured visual forms like the Ulam spiral, and behave in ways predicted by deep theories such as the Riemann Hypothesis and random matrix models. These clues suggest primes are not truly random but "pseudo-random"—complex patterns produced by simple, deterministic rules we have not fully understood yet. In other words, what looks like chaos may simply be order we have not learned to see.

I was looking at the digital roots of prime numbers and this is what I learnt. Structural rule: primes (>!3) can only have digital roots 1,2,4,5,7 and 8 (missing is 3,6 and 9). Statistical rule: asymptotically those six roots occur with about equal density (deep theorem). Practical note: for small lists you’ll see random-ish fluctuations; for very large samples the counts settle toward equality.

My friend Gemini tells me that humans are pattern seeking machines. Is it possible to have no pattern? Is no pattern a pattern in itself? My friend Chatty tells me that true randomness with no pattern can exist in mathematics, but the human mind is built to seek structure, so even “no pattern” becomes a kind of pattern once we describe it. In other words, something can be genuinely patternless, yet we can only understand it by placing it inside a conceptual category, which itself acts like a pattern. Thus, the world may contain true chaos, but our minds inevitably shape it into meaning.

My friend Chatty tells me that a pattern is a simplification — a way to predict, describe, or compress information because something repeats or follows a rule. This has me thinking that if there are infinite patterns then everything can be described by a pattern. But there are simple and complex patterns and what we are looking for are simple patterns. Simple being subjective and changing and within our limits. Some things may just be beyond human capability or understanding. We may find ourselves building things that function beyond human understanding. My friend Chatty says that it is a humbling and exciting thought: the universe might be both entirely patterned and still endlessly mysterious. A question for another time, which came first, order or chaos, both or neither, or only one of them exists and the other is just the absence of the other?

Comments

Popular posts from this blog

Hobby project - Store and view exchange rates

The next step in my project was to test out being able store and display the rates in a database. I decided to use nodejs and supabase for this. Everything worked beautifully. Only hickup was the following error due to my package.json not being correct. SyntaxError: Cannot use import statement outside a module Added this to package.json   "type": "module" This works beautifully. Right now I am just testing fragments of what could be part of a bigger system to see what is possible and what works and how easy to code on a mobile. There is no fully functioning integrated end to end system just yet. This is also what I tested. A serverless append-only database using GitHub + Actions + Pages. That’s basically a lightweight backend system. This was the ChatGPT prompt I used. Guide me through each step. This is what I want. A manually run github actions that adds to docs/data.json with the current date and time. docs/index.html displays all the entries in data.json. Make s...

Running php and apache on termux

This was my experience getting php and apache to run on termux apt update && apt upgrade -y apt install php-apache I was following an old blog post that used php 7 and got these errors Can't locate API module structure `php7_module' in file /data/data/com.termux/files/usr/libexec/apache2/libphp.so: undefined symbol: php7_module Cannot load /data/data/com.termux/files/usr/libexec/apache2/libphp7.so Corrected in apache config file vim $PREFIX/etc/apache2/httpd.conf LoadModule php_module /data/data/com.termux/files/usr/libexec/apache2/libphp.so Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP. Comment out mpm_worker and use mpm_prefork #LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so This still does not work as apache (httpd) was failing silently. According to Chatty LoadModule php_module ...libphp.so often fails in Termux becau...

Stuck running sftp server on termux alpine for multi-user setup

The below is my journey trying to get multi-user sftp working using alpine on termux pkg update && pkg upgrade pkg install proot-distro openssh proot-distro install alpine proot-distro login alpine apk update apk upgrade apk add openssh shadow sudo apk add vim vim /etc/ssh/sshd_config Port 8022 PermitRootLogin no PasswordAuthentication yes Subsystem sftp internal-sftp Match Group sftpusers     ChrootDirectory /sftp/%u     ForceCommand internal-sftp     X11Forwarding no     AllowTcpForwarding no addgroup sftpusers adduser user1 adduser user1 sftpusers mkdir -p /sftp/user1/upload chown root:root /sftp/user1 chmod 755 /sftp/user1 chown user1:sftpusers /sftp/user1/upload How I run my server each time pkill sshd rm -f /etc/ssh/ssh_host_* ssh-keygen -A /usr/sbin/sshd -D -d -d -d From another termux session sftp -P 8022 user1@127.0.0.1 Connection reset by 127.0.0.1 port 8022 Connection closed Some troubleshooting steps mkdir -p /run/sshd chmod 75...