A few good looking recursive functions

Jon Maiga, 2019-06-11

Every now and then I run into functions that makes me go “wow this looks different”!

In this post I will list a few simple recursive formulas that yield somewhat surprising graphs. I will settle with noting they look nice and leave further analysis to the reader.

1 - the braid

Let’s start with a simple

(1)a(n)=na(n1)a(n2)a(n)=\frac{n-a(n-1)}{a(n-2)} \tag{1}

With the initial values of a(0)=a(1)=1a(0)=a(1)=1 we get

enter image description here

The simple recursive function (1) creates a braid that seems to follow n\sqrt n. What are the upper and lower bounds?

Now if we take the first differences of (1) (a(n)a(n1))(a(n)-a(n-1)) we get it centered around the x-axis

enter image description here

2 - the weirdo

Changing the initial values of (1) dramatically changes the function, for example

a(0)=1,a(1)=3a(0)=1, a(1)=3 gives us

enter image description here

Note that this graph has some extreme values that have been omitted. Taking the first differences gives us

enter image description here

3 - the Enterprise

Another remarkable plot is


With a(0)=1a(0)=1 and a(1)=3a(1)=3 we get

enter image description here

4 - ten curves in one

Another noteworthy is


With a(0)=a(1)=a(2)=1a(0)=a(1)=a(2)=1 we get

enter image description here

5 - heaps of primes

Finally, let’s look at one involving the primes


With a(0)=3a(0)=3 and a(1)=1a(1)=1 we have

enter image description here


My gut feeling is that those are more the kind of function you look at than get anything sensible out of. Although I would be grateful for any feedback on those. I don’t even know (and haven’t looked much) if they have been studied?

All sequences was found while I was browsing sequencedb.net, a machine generated database with decimal and integer sequences.

Written with StackEdit.