This post continues my previous posts "AI-generated fun with vibe coding, math and physics" (Part 1, Part 2).
With my vibe coding, math and physics exercises I follow the progress of artificial intelligence (AI), and also reflect on interesting math and its physical implications. I started this project when I stumbled upon a paper that suggested fractional calculus could be the “natural” calculus appropriate to fractal phenomena.
Fractional calculus and fractal geometry (see the previous articles in this series for simple definitions and references) find useful applications to the same things. This suggests there must be a deep link between the two. But at a first glance, fractional calculus and fractal geometry seem disconnected: why should one have anything to do with the other? So I set the goal to find and illustrate an intuitive geometric interpretation of fractional calculus related to fractal geometry.
First I had Grok develop Matlab code to confirm that the Riemann-Liouville fractional integral of order alpha (0 < alpha < 1) of a smooth function can be interpreted as the integral of the function restricted to a fractal subset of the x axis with fractal dimension alpha. I illustrated this interpretation with fractal subsets of the x axis constructed as Cantor set-like fractals with dimension alpha. This interpretation has been suggested by Nigmatullin, who "interpreted the fractional integral in terms of the fractal Cantor set... the fractional index of integration equals the fractal dimension of the Cantor set" (see this textbook and references therein).
Then in my last exercises I’ve been using Gemini besides Grok and Python besides Matlab because both Grok and Gemini can directly execute Python code, which saves time. I still prefer Matlab, but its full power comes from the dozens of toolboxes, and those are expensive. Python’s public libraries are less polished, but often get the job done.
Intuitively, fractional integration of order alpha (0 < alpha < 1) is something in between no integration (order zero) and full integration (order one). No integration returns a one-dimensional line (the function itself), and full integration returns a two-dimensional area. Fractional integration returns a fractal with dimension 1 + alpha, in between a line and an area. Or alternatively (but equivalently), fractional integration should be viewed as partial (as opposed to full) integration restricted to only a subset of the real line, and a fractal subset seems the most general and robust choice.
Then I wanted to generalize the argument and illustrations from Cantor set-like fractals to less specific - random - fractal subsets of the real line.
From Cantor sets to fractional Brownian motion
A Cantor set-like fractal is created by repeatedly removing a part of a line segment. By choosing that part (the middle third in the standard Cantor set), one can tune the fractal dimension of the set between zero and one. The set is a cloud of points that is neither a solid line nor nothingness - it is something in between. But while Cantor set-like fractals are elegant, they are rigid and deterministic. Random fractal subsets of the real line are more general - more fluid and representative of the chaos found in nature.
The zero set of a fractional Brownian motion (fBm) is a random fractal subset of the real line.
Fractional Brownian motion is a generalization of Brownian motion (see Mandelbrot’s seminal book “The Fractal Geometry of Nature”) first introduced by Mandelbrot and van Ness.
Imagine the path of a particle driven by random forces. Standard Brownian motion is the "gold standard" for randomness - every step is independent of the last. But nature often has a long memory. With fBm, Mandelbrot introduced a "persistence" or "memory" into this random motion, parametrized by a real number between zero and one called the Hurst parameter (H).
If H is high, fBm is "persistent" - if it’s been going up, it wants to keep going up. It looks like rolling, smooth hills. If H is low, fBm is "anti-persistent," jagged, and nervous, constantly reversing itself. The difference is evident in the images below, which show fBm-generated fractal surfaces for low and high H.


fBm is often treated technically, with lots of math, but some of Mandelbrot’s writings give narrative explanations. See for example Mandelbrot’s “The (Mis)behavior of Markets.”
The zero-set of a fBm is formed by the points where it returns to the value of zero. These moments form a fractal pattern on the timeline, whose fractal dimension is alpha = 1 - H. My last exercise assisted by Gemini and Grok confirms that the Riemann-Liouville fractional integral of order alpha (0 < alpha < 1) of a smooth function can be interpreted as the expected value (over many fBm realizations) of the integral of the function restricted to the zero set of fBm with Hurst parameter H = 1 - alpha. Since fBm is random, this holds in the limits of averaging over very many fBm realizations, and convergence can be slow.
An intuitive interpretation
Fractional calculus behaves as if it has a memory that fades according to a power-law. This is often treated as abstract math, useful for physics but hard to visualize.
This exercise suggests that fractional calculus is simply performing "incomplete" integration. Imagine trying to integrate a function using a "stencil" that is a fractal. You only "see" the function through the tiny, jagged slits in that stencil. Because the stencil is fractal, it has "holes" of all sizes. When you average out the results of many different random "stencils" (realizations of fBm), the "gaps" in the geometry perfectly match the "memory" of fractional calculus. The fractional integral is what you get when you integrate over a lacunary fractal subset of the real line.
This suggests a simple explanation of the “memory” of fractional calculus operators. In standard calculus, a derivative is strictly local - it only cares about what is happening right now. But if there is a fractal stencil, the operators can’t always see "right now." Sometimes they’re looking at a gap, and are forced to look across the gap.
When we see a system behaving according to "fractional" rules, like heat diffusing strangely or electricity flowing through complex materials in strange ways, it might be because the system is following fractal paths.
AI-written paper and AI referee report
My interaction with Gemini and Claude followed the patterns outlined in my previous articles in this series. The intuitive insight of using random fractal subsets of the real line defined by fBm came from me, and all formal elaboration and code development came from them (with many iterations and clarifications requested by me). Again, I got the impression of raw brilliance spoiled by occasional blunders and apparent inability to follow simple instructions. However, my overall impression is that AI assistants are becoming more brilliant and less prone to blunders and misunderstandings.
I invited both AI assistants to co-author a joint arXiv-style paper. A coin toss determined which AI assistant would write the initial draft. This document was then passed back and forth between Gemini and Grok, iterating through four cycles of critique and refinement. The paper, included in this subrepository, is titled "The Fractal Geometry of Fractional Calculus: Riemann-Liouville Integrals as Expected Local Times of Fractional Brownian Motion" and authored by Gemini and Grok “with human assistance” from me.
Then I asked Claude to evaluate the paper. My exact prompt was “Please act as a referee tasked with evaluating the pdf paper for publication.” Claude gave me a long referee report and this Referee Report Summary:
“The paper presents an intriguing geometric interpretation of Riemann-Liouville fractional integrals through fractional Brownian motion: the fractional integral is understood as the expected value of a function sampled over the fractal zero-set of fBm paths, with Hurst parameter H = 1 - α. The visualizations are beautiful and conceptually insightful. However, major revision is required due to: (1) No rigorous proof of the central representation (Equation 2) - the claim is stated and cited but not derived; (2) Severely limited scope - numerical validation only for linear functions f(t) = a + bt, despite claims of general validity; (3) Incomplete literature review with insufficient discussion of how this extends Nigmatullin's fractal interpretation; (4) No quantitative error analysis, convergence studies, or comparison between the two numerical methods. The core idea linking fractional calculus to stochastic geometry has genuine merit, but needs substantial mathematical rigor and broader numerical validation before publication in a research journal. Rating: 5/10 - Major Revision Required.”
It would be fun to revise this paper as suggested and turn it into a real scientific paper worthy of publication in a journal. But I started this project to find a simple visual interpretation of fractional calculus and its connection with fractal geometry, and now I have one: fractional integrals can be interpreted as integrals restricted to lacunary fractal subsets of the real line with fractal dimension equal to the order of fractional integration. So this particular project is concluded.
However, now I find these vibe coding, math and physics exercises so fun that I guess I’ll start other projects. In particular, I wish to explore the idea that the fundamental physics of particles and fields in what we call empty space might be following fractal paths.