# Digit Sums

2019-09-07, post № 219

mathematics, #base ten, #factorid, #Jack Reacher

Interessant war es auch, drei aufeinanderfolgende Zahlen zu nehmen, von denen die größte durch drei teilbar sein musste, sie zu addieren und aus dem Ergebnis so lange die Quersumme zu bilden, bis eine einstellige Zahl übrig blieb. Diese Zahl war immer sechs.
— Child, Lee: Der Anhalter. München: Blanvalet, 2015; p. 73

Jack Reacher’s at most tangentially to interpreting the sergeant’s reply related base ten factoid’s formal form is

where $\mathrm{fds}_{10}$ represents the final digit sum in base ten.

A proof of the above claim together with the underlying digit sum results is presented in digit-sums.pdf [1] (source: digit-sums.tex).

# Short brainfuck Primes

2019-08-10, post № 218

brainfuck, programming,

>[-]+>>[-]++>[-]<<<[>[-]+>>>>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-][-]+[>>>>[-]<[-]<<<<<[>>>>>>+<+<<<<<-]>>>>>>[<<<<<<+>>>>>>-]<<[-]+>[<->[-]]<[<<<->>>[-]]<<<<->>>>>[-]<[-]<<<<<<[>>>>>>>+<+<<<<<<-]>>>>>>>[<<<<<<<+>>>>>>>-]>[-]<[-]<<<<<<[>>>>>>>+<+<<<<<<-]>>>>>>>[<<<<<<<+>>>>>>>-][-]>[-]>[-]>>[-]<[-]<[>>+<+<-]>>[<<+>>-]>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]>[-]<[-]<<<<<<<<<<<[>>>>>>>>>>>>+<+<<<<<<<<<<<-]>>>>>>>>>>>>[<<<<<<<<<<<<+>>>>>>>>>>>>-]>[-]<[-]<<<<<<<<[>>>>>>>>>+<+<<<<<<<<-]>>>>>>>>>[<<<<<<<<<+>>>>>>>>>-]<<<<<[-]>>>[>>>>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]<<[-]+>[<->[-]]<[<<<<<[-]+>>>>>[-]]<-<-]>[-]<[-]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<<<<<<+>>>>>>-]>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<<<[-]>[>>>>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]<<[-]+>[<->[-]]<[<<<[-]+>>>[-]]<-<-]>[-]<[-]<[>>+<+<-]>>[<<+>>-]<[<<<+++++++>>>[-]]<[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<[<+>-]<.[-]++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++>>>[-]<[-]<<<<[>>>>>+<+<<<<-]>>>>>[<<<<<+>>>>>-]>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<<<[-]>[>>>>[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]<<[-]+>[<->[-]]<[<<<[-]+>>>[-]]<-<-]>[-]<[-]<[>>+<+<-]>>[<<+>>-]<[<<<+++++++>>>[-]]<[-]<[-]<<[>>>+<+<<-]>>>[<<<+>>>-]<[<+>-]<.<<[-]++++++++++.<[-]]<<+>>>>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<<[-]+>[<->[-]]<[<+>[-]]<<<<[-]+>>>>>>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<<[-]+>[<->[-]]<[>>>[-]<[-]<<<[>>>>+<+<<<-]>>>>[<<<<+>>>>-]<<[-]+>[<->[-]]<[<<<<<[-]>>>>>[-]]<[-]]<<<<]

Try it online.

# Mandelbrot set sketch in Scratch

2019-07-13, post № 217

art, mathematics, programming, #fractal

Despite my personal disbelieve in and dislike of the colored blocks dragging simulator 3, I nevertheless wanted to extract functionality other than the hardcoded cat mascot path tracing from the aforementioned software; one of the most efficient visual result to build effort ratio yields a simple plot of the Mandelbrot set, formally known as

where the iterator is defined as

The render resolution is kept at a recognizable minimum as not to overburden the machine tasked with creating it.
Source: mandelbrot-set-sketch-in-scratch.sb3

Jonathan Frech's blog; built 2021/04/16 21:21:49 CEST