2018-12-01, post № 207

**Haskell**, **mathematics**, **programming**, #diagonalization

## Theoretical Framework

Let be the two-dimensional complex vector space of sequences adhering to the Fibonacci recurrence relation with basis .

Let furthermore be the sequence shift endomorphism represented by the transformation matrix

By iteratively applying the sequence shift a closed-form solution for the standard Fibonacci sequence follows.

2018-11-03, post № 206

**C**, **mathematics**, **programming**, #integer, #list, #primes, #representation

Since ancient times humanity knew that there are infinitely many primes — though countable, writing a complete list of every prime is impossible if one intends to finish.

However, in practice one often only considers a minute subset of the naturals to work with and think about. When writing low-level languages like C, one is nearly forced to forget about almost every natural number — the data type `u_int_32`

, for example, is only capable of representing .

Therefore, it is possible to produce a complete list of every prime representable in thirty-two bits using standard bit pattern interpretation — the entirety of the first 𝟤𝟢𝟥 𝟤𝟪𝟢 𝟤𝟤𝟣 primes.

Generating said list took about two minutes on a 4GHz Intel Core i7 using an elementary sieve approach written in C compiled with `gcc -O2`

.

All primes are stored in little-endian format and packed densely together, requiring four bytes each.

Using the resulting file, one can quickly index the primes, for example (using zero-based indexing). Since each prime is stored using four bytes, the prime’s index is scaled by a factor of four, resulting in its byte index.

dd status=none ibs=1 count=4 if=primes.bin skip=40000000 | xxd
00000000: b3cd b10a ....

Source code: prime-intirety.c

Prime list (gzipped and split): prime-intirety_primes.bin.gz.parts

2018-10-31, post № 205

**art**, **haiku**, **poetry**, #bat

Tiny droplet falls.

A bat’s screech echoes through the cave.

Flowstone grew again.

Posts:

243-241, 240-238, 237-235, 234-232, 231-229, 228-226, 225-223, 222-220, 219-217, 216-214, 213-211, 210-208, **207-205**, 204-202, 201-199, 198-196, 195-193, 192-190, 189-187, 186-184, 183-181, 180-178, 177-175, 174-172, 171-169, 168-166, 165-163, 162-160, 159-157, 156-154, 153-151, 150-148, 147-145, 144-142, 141-139, 138-136, 135-133, 132-130, 129-127, 126-124, 123-121, 120-118, 117-115, 114-112, 111-109, 108-106, 105-103, 102-100, 99-97, 96-94, 93-91, 90-88, 87-85, 84-82, 81-79, 78-76, 75-73, 72-70, 69-67, 66-64, 63-61, 60-58, 57-55, 54-52, 51-49, 48-46, 45-43, 42-40, 39-37, 36-34, 33-31, 30-28, 27-25, 24-22, 21-19, 18-16, 15-13, 12-10, 9-7, 6-4, 3-1Jonathan Frech's blog; built 2021/04/16 21:21:49 CEST