Pattern "inside" prime numbers
I would put this in the comments, but I don't have enough points.
The patterns you are seeing are Moiré patterns. From wikipedia:
In mathematics, physics, and art, a moiré pattern (/mwɑːrˈeɪ/; French: [mwaʁe]) or moiré fringes are large scale interference patterns that can be produced when an opaque ruled pattern with transparent gaps is overlaid on another similar pattern. For the moiré interference pattern to appear, the two patterns must not be completely identical in that they must be displaced, rotated, etc., or have different but similar pitch.
This is a broad topic with lots of different approaches and applications, so I encourage you to research it.
In terms of finding equations to the patterns you are seeing, Mathematica is great for this. If you don't have Mathematica, you can use Wolfram Alpha. Here is an example with a list of numbers using findsequencefunction. You can also provide a list of points (generally, wolfram alpha needs five or more points to find a sequence):
findsequencefunction[{{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}}, n]
Hope this helps!