Think Frink

Inky Bloaters (1987) is the name of an album by psycho-songstress Danielle Dax. Frinky growthers are those who are interested in frincremental growth. That’s growth by fractions, as in the equation x = x + 1/x. If the initial x = 1, its frincremental growth looks like this:

1
1 + 1/1 = 1 + 1 = 2
2 + 1/2 = 2_1/2
2_1/2 + 1/2_1/2 = 2_9/10
2_9/10 + 1/2_9/10 = 3_71/290
3_71/290 + 1/3_71/290 = 3_150911/272890
3_150911/272890 → 3_220789390391/264588959090 → 4_25570190327910692085061/268440386798659418988490 → 4_100170363026578204006507990129853967021051645381/295105036840595214385430531020664149472669868290

As you can see, the numerators and denominators of the fractional part of x get very large very quickly. So you can’t track the frincremental growth of x with perfect accuracy. Even the most compendious computer will run out of space. But representing x as a decimal is usually enough for us frinky growthers:

1 + 1 = 2
2 + 1/2 = 2 + 0.5 = 2.5
2.5 + 1/2.5 = 2.9
3.244827586206896551724137931…
3.553010370478947561288431236…
3.834461842815967366750790750…
4.095254632258778985771918456…
4.339439692724345181049239663…
4.569884190357676650018985962…
4.788708116379690742064597208…
4.997532704493448986664559639…
5.197631445038131469095668466…
5.390026771750770995914851381…
5.575554607204394029915651664…
5.754908962142979073283550015…
5.928673657045750549124213874…
6.097345447373015508408978797…
6.261351244425377152997703626…
6.421061179383957004641284553…
6.576798676981813718180627345…

The larger x gets, the slower it grows. But it never stops growing and will pass any finite integer in finite time. I was interested in the fractional part of x += 1/x (a shorthand for x = x + 1/x). Plainly, it’s almost unique for every integer seed (the fractional part is identical, just displaced by one step, for initial x = 1 = 2). I graphed the fractional part of x += 1/x for 1, 2, 3, 4, 5… and discovered some interesting patterns:

frac(x) of x += 1/x for x = 1, 2, 3, 4, 5…


Later frac(x) of x += 1/x





In time, the rounded patterns disappear for lower initial x. But you also get symmetrical patterns for x += sqrt(x), that is, x = x + square_root(x). And they last longer:

frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #1


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #2


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #3


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #4


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #5


Here’s an animation of the first fifty steps of x += sqrt(x):

animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (animated at EZgif) (click for larger image)


And what about x += ln(x), or x = x + natural_logarithm(x)? The patterns are both more dynamic and longer-lasting for lower initial x:

frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #1


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #2


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #3


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #4


And two animations of x += ln(x), one slower, one faster:

animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (EZgif) (click for larger)


faster animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (click for larger)


Sprime Time

All fans of recreational math love palindromic numbers. It’s mandatory, man. 101, 727, 532235, 8810188, 1367755971795577631 — I love ’em! But where can you go after palindromes? Well, you can go to palindromes in a higher dimension. Numbers like 101, 727, 532235 and 8810188 are 1-d palindromes. That is, they’re palindromic in one dimension: backwards and forwards. But numbers like 181818189 and 646464640 aren’t palindromic in one dimension. They’re palindromic in two dimensions:


1 8 1
8 9 8
1 8 1

n=181818189


6 4 6
4 0 4
6 4 6

n=646464640



They’re 2-d palindromes or spiral numbers, that is, numbers that are symmetrical when written as a spiral. You start with the first digit on the top left, then spiral inwards to the center, like this for a 9-digit spiral (9 = 3×3):


And this for a 36-digit spiral (36 = 6×6):


Spiral numbers are easy to construct, because you can reflect and rotate the numbers in one triangular slice of the spiral to find all the others:


You could say that the seed for the spiral number above is 7591310652, because you can write that number in descending lines, left-to-right, as a triangle.

Here are some palindromic numbers with nine digits in base 3 — as you can see, some are both palindromic numbers and spiral numbers. That is, some are palindromic in both one and two dimensions:

1  0  1

0  1  0

1  0  1

n=101010101


1  0  1

0  2  0

1  0  1

n=101010102


1  1  1

1  0  1

1  1  1

n=111111110


1  1  1

1  1  1

1  1  1

n=111111111


2  0  2

0  1  0

2  0  2

n=202020201


2  0  2

0  2  0

2  0  2

n=202020202


2  2  2

2  1  2

2  2  2

n=222222221


2  2  2

2  2  2

2  2  2

n=222222222


But palindromic primes are even better than ordinary palindromes. Here are a few 1-d palindromic primes in base 10:

101
151
73037
7935397
97356765379
1091544334334451901
1367755971795577631
70707270707
39859395893
9212129
7436347
166000661
313
929


And after 1-d palindromic primes, you can go to 2-d palindromic primes. That is, to spiral primes or sprimes — primes that are symmetrical when written as a spiral:

3 6 3
6 7 6
3 6 3

n=363636367 (prime)
seed=367 (see definition above)


9 1 9
1 3 1
9 1 9

n=919191913 (prime)
seed=913


3 7 8 6 3 6 8 7 3
7 9 1 8 9 8 1 9 7
8 1 9 0 9 0 9 1 8
6 8 0 5 5 5 0 8 6
3 9 9 5 7 5 9 9 3
6 8 0 5 5 5 0 8 6
8 1 9 0 9 0 9 1 8
7 9 1 8 9 8 1 9 7
3 7 8 6 3 6 8 7 3

n=378636873786368737863687378636879189819189819189819189819090909090909090555555557 (prime)
seed=378639189909557 (l=15)


And why stop with spiral numbers — and sprimes — in two dimensions? 363636367 is a 2-sprime, being palindromic in two dimensions. But the digits of a number could be written to form a symmetrical cube in three, four, five and more dimensions. So I assume that there are 3-sprimes, 4-sprimes, 5-sprimes and more out there. Watch this space.