Finished my 6-second game trailer for my Asteroids (1979)-clone in virtual reality:
Maclaurin series of n^n:
f(0) + f'(0)*x + f''(0)*x^2/2 + f'''(0)*x^3/6 + f''''(0)*x^4/24 + f'''''(0)*x^5/120 + f''''''(0)*x^6/720 + f'''''''(0)*x^7/5040
0^0 (1, e.g. use the limit) + [n*n^(n-1)]*n + [n^n]*n^2/2 + [n^n]*n^3/6 + ... (giving up here)
Interestingly, n! doesn't grow fast enough (at all).
I might try to find the Maclaurin (Taylor) series of n^n and try to reverse engineer the inverse of n^n.
The reason I got started on this idea was the concept of using a Taylor series for lg(v)/lg(n) and v^(1/n), but that isn't going to work most likely because Taylor series seem to take a single variable.
I'm sort of curious how you might speed up convergence using non-mathematical techniques (although this is sort of statistical to be fair).
Try to compute values n0 to n99
Compute approximate n0,
Using n_i approximate n_i+1 (only one iteration) i=1 to 99.
Knowing the data is monotonically increasing, average neighboring values that are inverted.
Smooth out / massage the data based on the rate of change.
Repeat until happy with results.
I'm also sort of curious about http://oeis.org/A085892
I found it because I was thinking about how to calculate the inverse of n^n on my own.
My thought process was to first approximate using n! (by using a cross between gallop mode division and https://www.cs.cmu.edu/~cburch/survey/recurse/fastexp.html and interpolating on any remainder) then using f(n) = n^n implies f(n)^(1/n) = n to converge on the exact value.
I've been curious about the ridiculous growth of the Stieltjes constants, I think it may be because n! should be n^n instead (related to Stirling's approximation).
There's some implications here, but I think it could have a relationship to higher order functions like the Ackermann function (and its inverse).
I think making a Sacks spiral with the inverse of n^n would be incredibly useful.
Primes follow a pattern up to ~5^2 and ~7! (could be reading into this too much)
I'm sort of intrigued by https://en.m.wikipedia.org/wiki/Stieltjes_constants
In particular the Matsuoka bound uses 10^-4, which could be related to 1/7! (1/5040). (Definitely a hot take.)
Maybe a Sacks spiral with n^(1/e) and n^0.75679 and n^(1-0.75679) would work.
Or the Euler-Mascheroni constant might make more sense. I was studying that a lot back in the day albeit I remember using 2*.577... (and mistaking it for another constant).
Additionally, the Euler-Mascheroni constant has some similarity to the Riemann Hypothesis and it's close to .5 (the square root).
Other things to test: 1/3, 1/6, 1/sqrt(6)
I should also consider whether a primorial tree would be better (because this is a worse version of a super well-known optimization that I found).
It could still be useful, but mathematicians would definitely call my finding trivial or definitional or something.
I think the patterns work better in the factorial tree but I could be overlooking something.
Addendum: for factorials you use a vector array with gallop search.
Also, while it may appear you need to cache a bunch of squares / hexagonal numbers / octagonal numbers / etc you only need to do ~k operations for k! elements (~k times)
So the work required is maybe ~k^2/k!
Additionally the perfect hashes that store the square numbers and onward can be put in an array (which is obvious-ish but worth mentioning).
Hmmm, if I'm right on this there's an incredible amount of caching optimizations available:
Static cache (perfect hash) of first e.g. 2^(32-1) primes
Dynamic cache (vector array with gallop search) -- recently used primes updated at end of algorithm
Memoization (splay tree sorting values over course of algorithm)
You can do the same techniques for:
Factorials (perfect hash)
Squares (perfect hash)
Hexagonal numbers (perfect hash)
Programming a *2D virtual reality* game (Invertigo):
Game development! Discussions about game development and related fields, and/or by game developers and related professions.