10,843 Pages

## J Function Sandpit $$J_3$$

The J Function is a work in progress. This sandpit defines a function called $$J_3$$ which contains ideas that will be used in the final J Function. Click here for the J Function blog.

## Summary

The $$J_3$$ function fixes some errors in the $$J_2$$ function. It still uses one real number "r" as an input parameter and can produce effectively every FGH function with ordinals up to $$\epsilon_0$$ in order of increasing size, for any number n. This makes for a useful function for referencing some very large numbers which otherwise need complex notation that is difficult to read or understand.

## Generating FGH functions

This function is similar to the $$J_2$$ function. The first difference between them is that $$J_3$$ will only use the finite ordinals from 0 to 5 when constructing FGH functions. The first FGH function that is generated is this trivial example.

$$8 = f_1^2(2) = f_2(2) = f_{\omega}(2)$$

From here the function generates FGH functions in the following sequence:

$$f_1^2(3), f_1^2(4), f_1^2(5), f_1^3(3), f_1^3(4), f_1^3(5), f_1^4(4), f_1^4(5), f_1^5(5)$$

Note only values of n = 2 to 5 and p = 2 to 5 are used to make FGH functions of the form: $$f_1^p(n)$$

## Illegal Functions

All the examples given above have n limited between p and 5. For the purposes of generating FGH functions in sequence of increasing size, if n < p then the FGH function is illegal.

At this point, the ordinal value w changes to 2 and the sequence continues for FGH functions of the form: $$f_w^p(n)$$ , however, legal functions are limited to: w = 1 to 4, p = 2 to 5 and n = max(w+1,p) to 5. Here is the continuation of the sequence:

$$f_2^2(3), f_2^2(4), f_2^2(5), f_2^3(3), f_2^3(4), f_2^3(5), f_2^4(4), f_2^4(5), f_2^5(5)$$

then

$$f_3^2(4), f_3^2(5), f_3^3(4), f_3^3(5), f_3^4(4), f_3^4(5), f_3^5(5)$$

and

$$f_4^2(5), f_4^3(5), f_4^4(5), f_4^5(5)$$

There are similar rules for higher ordinals including all nested omega ordinals up to epsilon_0. The sequence picks up with the following:

$$f_{\omega}^2(2), f_{\omega}^2(3), f_{\omega}^2(4), f_{\omega}^2(5), f_{\omega}^3(3), f_{\omega}^3(4), f_{\omega}^3(5), f_{\omega}^4(4), f_{\omega}^4(5), f_{\omega}^5(5)$$

More complicated sequences can be seen in the detailed calculations on this blog.

## Definitions

The definition of the function is accurately defined in program code (see below for code and description). A high level definition is as follows:

$$J_3(8^n) = f_{(\omega\uparrow\uparrow(n+1))}^2(n+2)$$

For example

$$J_3(8^0) = J_3(1) = f_1^2(2) = f_2(2) = f_{\omega}(2)$$

$$J_3(8^1) = J_3(8) = f_{\omega^{\omega}}^2(3)$$

and

$$J_3(8^2) = J_3(64) = f_{\omega^{\omega^{\omega}}}^2(4)$$

## Calculations

Here are detailed calculations in Compact FGH Notation and the usual math notation, for various values of $$J_3(r)$$

$$J_3(0) =$$ 0 $$= 0$$

$$J_3(0.2) =$$ 1 $$= 1$$

$$J_3(0.4) =$$ 3 $$= 3$$

$$J_3(0.6) =$$ 4 $$= 4$$

$$J_3(0.8) =$$ 6 $$= 6$$

$$J_3(1) =$$ f0.1^2(2) $$= f_{1}^2(2)$$

$$J_3(1.2) =$$ f0.1^4(4) $$= f_{1}^4(4)$$

$$J_3(1.4) =$$ f0.2^2(4) $$= f_{2}^2(4)$$

$$J_3(1.6) =$$ f0.2^4(5) $$= f_{2}^4(5)$$

$$J_3(1.8) =$$ f0.3^3(4) $$= f_{3}^3(4)$$

$$J_3(2) =$$ f0.3^5(5) $$= f_{3}^5(5)$$

$$J_3(3) =$$ f1.2+0.3^4(4) $$= f_{\omega.2+3}^4(4)$$

$$J_3(\pi) = J_3(3.14159265358979) =$$ f1.3^4(4) $$= f_{\omega.3}^4(4)$$

$$J_3(4) =$$ f2.1+1.1+0.2^5(5) $$= f_{\omega^{2}+\omega+2}^5(5)$$

$$J_3(5) =$$ f2.4+0.4^3(5) $$= f_{\omega^{2}.4+4}^3(5)$$

$$J_3(6) =$$ f3.3+0.4^3(5) $$= f_{\omega^{3}.3+4}^3(5)$$

$$J_3(7) =$$ f4.2+0.2^5(5) $$= f_{\omega^{4}.2+2}^5(5)$$

$$J_3(8) =$$ f[1.1].1^2(3) $$= f_{\omega^{\omega}}^2(3)$$

$$J_3(9) =$$ f[1.1+0.1].2+1.1+0.2^2(4) $$= f_{\omega^{\omega+1}.2+\omega+2}^2(4)$$

$$J_3(10) =$$ f[1.1+0.2].4^5(5) $$= f_{\omega^{\omega+2}.4}^5(5)$$

$$J_3(11) =$$ f[1.1+0.4].2^3(5) $$= f_{\omega^{\omega+4}.2}^3(5)$$

$$J_3(12) =$$ f[1.2].3+1.2+0.2^2(5) $$= f_{\omega^{\omega.2}.3+\omega.2+2}^2(5)$$

$$J_3(13) =$$ f[1.2+0.2].1+1.1+0.1^3(5) $$= f_{\omega^{\omega.2+2}+\omega+1}^3(5)$$

$$J_3(14) =$$ f[1.2+0.3].3^4(4) $$= f_{\omega^{\omega.2+3}.3}^4(4)$$

$$J_3(15) =$$ f[1.3].1^2(4) $$= f_{\omega^{\omega.3}}^2(4)$$

$$J_3(16) =$$ f[1.3+0.1].2+1.2+0.1^3(5) $$= f_{\omega^{\omega.3+1}.2+\omega.2+1}^3(5)$$

$$J_3(18) =$$ f[1.3+0.4].2^3(5) $$= f_{\omega^{\omega.3+4}.2}^3(5)$$

$$J_3(20) =$$ f[1.4+0.2].1+1.1+0.2^5(5) $$= f_{\omega^{\omega.4+2}+\omega+2}^5(5)$$

$$J_3(25) =$$ f[2.1+1.3+0.4].2^3(5) $$= f_{\omega^{\omega^{2}+\omega.3+4}.2}^3(5)$$

$$J_3(30) =$$ f[2.3+0.2].4+1.0+0.1^3(5) $$= f_{\omega^{\omega^{2}.3+2}.4+\omega.0+1}^3(5)$$

$$J_3(35) =$$ f[2.4+1.2+0.3].3^5(5) $$= f_{\omega^{\omega^{2}.4+\omega.2+3}.3}^5(5)$$

$$J_3(40) =$$ f[3.2+0.2].1+2.0+0.2^5(5) $$= f_{\omega^{\omega^{3}.2+2}+\omega^{2}.0+2}^5(5)$$

$$J_3(45) =$$ f[3.3+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{3}.3+\omega.3+4}.2}^4(5)$$

$$J_3(50) =$$ f[4.1].1^2(5) $$= f_{\omega^{\omega^{4}}}^2(5)$$

$$J_3(55) =$$ f[4.2+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{4}.2+\omega.3+4}.2}^4(5)$$

$$J_3(60) =$$ f[4.3+3.2+2.1+1.1+0.2].4+2.0+0.1^3(5) $$= f_{\omega^{\omega^{4}.3+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}^3(5)$$

$$J_3(64) =$$ f[[1.1].1].1^2(4) $$= f_{\omega^{\omega^{\omega}}}^2(4)$$

$$J_3(65) =$$ f[[1.1].1+1.1+0.2].1+[1.1].3+1.1+0.3^4(4) $$= f_{\omega^{\omega^{\omega}+\omega+2}+\omega^{\omega}.3+\omega+3}^4(4)$$

$$J_3(70) =$$ f[[1.1+0.1].1].3^4(4) $$= f_{\omega^{\omega^{\omega+1}}.3}^4(4)$$

$$J_3(75) =$$ f[[1.1+0.1].4+1.1+0.3].3^4(5) $$= f_{\omega^{\omega^{\omega+1}.4+\omega+3}.3}^4(5)$$

$$J_3(80) =$$ f[[1.1+0.2].4].4^5(5) $$= f_{\omega^{\omega^{\omega+2}.4}.4}^5(5)$$

$$J_3(85) =$$ f[[1.1+0.3].4].1^2(5) $$= f_{\omega^{\omega^{\omega+3}.4}}^2(5)$$

$$J_3(90) =$$ f[[1.1+0.4].3+1.1].3+[1.1+0.3].3^4(5) $$= f_{\omega^{\omega^{\omega+4}.3+\omega}.3+\omega^{\omega+3}.3}^4(5)$$

$$J_3(95) =$$ f[[1.2].3].2^3(4) $$= f_{\omega^{\omega^{\omega.2}.3}.2}^3(4)$$

$$J_3(100) =$$ f[[1.2+0.1].2+1.1+0.4].2^3(5) $$= f_{\omega^{\omega^{\omega.2+1}.2+\omega+4}.2}^3(5)$$

$$J_3(105) =$$ f[[1.2+0.2].2].3^4(4) $$= f_{\omega^{\omega^{\omega.2+2}.2}.3}^4(4)$$

$$J_3(110) =$$ f[[1.2+0.3].1+1.2+0.2].1+[1.1+0.1].2+1.1+0.2^2(5) $$= f_{\omega^{\omega^{\omega.2+3}+\omega.2+2}+\omega^{\omega+1}.2+\omega+2}^2(5)$$

$$J_3(115) =$$ f[[1.2+0.4].1].4^5(5) $$= f_{\omega^{\omega^{\omega.2+4}}.4}^5(5)$$

$$J_3(120) =$$ f[[1.3].1].1^2(4) $$= f_{\omega^{\omega^{\omega.3}}}^2(4)$$

$$J_3(140) =$$ f[[1.3+0.3].3].3^4(4) $$= f_{\omega^{\omega^{\omega.3+3}.3}.3}^4(4)$$

$$J_3(160) =$$ f[[1.4+0.2].1+1.1+0.2].4^5(5) $$= f_{\omega^{\omega^{\omega.4+2}+\omega+2}.4}^5(5)$$

$$J_3(180) =$$ f[[2.1+0.1].2+2.1+0.1].2+[2.1+0.1].2+2.1+0.1^3(5) $$= f_{\omega^{\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}^3(5)$$

$$J_3(200) =$$ f[[2.1+1.3+0.4].2].2+[2.1+0.1].2+2.1+0.1^3(5) $$= f_{\omega^{\omega^{\omega^{2}+\omega.3+4}.2}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}^3(5)$$

$$J_3(220) =$$ f[[2.2+1.1+0.2].4+1.0+0.1].2+[2.1+0.2].4+1.0+0.1^3(5) $$= f_{\omega^{\omega^{\omega^{2}.2+\omega+2}.4+\omega.0+1}.2+\omega^{\omega^{2}+2}.4+\omega.0+1}^3(5)$$

$$J_3(240) =$$ f[[2.3+0.2].4+1.0+0.1].2+[2.1+0.4].2^3(5) $$= f_{\omega^{\omega^{\omega^{2}.3+2}.4+\omega.0+1}.2+\omega^{\omega^{2}+4}.2}^3(5)$$

$$J_3(260) =$$ f[[2.4].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{2}.4}}}^2(5)$$

$$J_3(280) =$$ f[[2.4+1.2+0.3].3].4+[1.0+0.1].2+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{2}.4+\omega.2+3}.3}.4+\omega^{\omega.0+1}.2+\omega}^2(5)$$

$$J_3(300) =$$ f[[3.1+1.2].3+3.1+1.2].3+[3.1+1.2].3+3.1+1.2^4(5) $$= f_{\omega^{\omega^{\omega^{3}+\omega.2}.3+\omega^{3}+\omega.2}.3+\omega^{\omega^{3}+\omega.2}.3+\omega^{3}+\omega.2}^4(5)$$

$$J_3(320) =$$ f[[3.2+0.2].1+2.0+0.2].4+[1.0+0.3].3^4(5) $$= f_{\omega^{\omega^{\omega^{3}.2+2}+\omega^{2}.0+2}.4+\omega^{\omega.0+3}.3}^4(5)$$

$$J_3(340) =$$ f[[3.2+2.3+0.2].4+1.0+0.3].3+[1.0].3+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{3}.2+\omega^{2}.3+2}.4+\omega.0+3}.3+\omega^{\omega.0}.3+\omega}^2(5)$$

$$J_3(360) =$$ f[[3.3+1.3+0.4].2].3+[1.0].3+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{3}.3+\omega.3+4}.2}.3+\omega^{\omega.0}.3+\omega}^2(5)$$

$$J_3(380) =$$ f[[3.4+0.4].2].3+[1.0].3+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{3}.4+4}.2}.3+\omega^{\omega.0}.3+\omega}^2(5)$$

$$J_3(400) =$$ f[[4.1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{4}}}}^2(5)$$

$$J_3(420) =$$ f[[4.1+2.4+0.4].2].3+[4.1+1.1+0.2].4+2.0+0.1^3(5) $$= f_{\omega^{\omega^{\omega^{4}+\omega^{2}.4+4}.2}.3+\omega^{\omega^{4}+\omega+2}.4+\omega^{2}.0+1}^3(5)$$

$$J_3(440) =$$ f[[4.2+1.3+0.4].2].3+[4.1+2.2+0.1].2+3.0+1.3+0.4^3(5) $$= f_{\omega^{\omega^{\omega^{4}.2+\omega.3+4}.2}.3+\omega^{\omega^{4}+\omega^{2}.2+1}.2+\omega^{3}.0+\omega.3+4}^3(5)$$

$$J_3(460) =$$ f[[4.3+0.2].4+2.0+0.1].2+[3.0+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{\omega^{4}.3+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega.3+4}.2}^4(5)$$

$$J_3(480) =$$ f[[4.3+3.2+2.1+1.1+0.2].4+2.0+0.1].2+[3.0+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{\omega^{4}.3+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega.3+4}.2}^4(5)$$

$$J_3(500) =$$ f[[4.4+2.2+0.1].2+3.0+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{\omega^{4}.4+\omega^{2}.2+1}.2+\omega^{3}.0+\omega.3+4}.2}^4(5)$$

$$J_3(512) =$$ f[[[1.1].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega}}}}^2(5)$$

$$J_3(540) =$$ f[[[1.1].3+1.1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega}.3+\omega}}}^2(5)$$

$$J_3(560) =$$ f[[[1.1+0.1].1].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+1}}.3}.3}^4(5)$$

$$J_3(580) =$$ f[[[1.1+0.1].3].1+[1.1].3+1.1+0.3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+1}.3}+\omega^{\omega}.3+\omega+3}.3}^4(5)$$

$$J_3(600) =$$ f[[[1.1+0.1].4+1.1+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+1}.4+\omega+3}.3}.3}^4(5)$$

$$J_3(620) =$$ f[[[1.1+0.2].2+1.1+0.1].2+[1.1+0.2].1+1.1].3+[[1.1+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+2}.2+\omega+1}.2+\omega^{\omega+2}+\omega}.3+\omega^{\omega^{\omega+3}.3}.3}^4(5)$$

$$J_3(640) =$$ f[[[1.1+0.2].4].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega+2}.4}.4}.4}^5(5)$$

$$J_3(660) =$$ f[[[1.1+0.3].2].2+[1.1+0.2].1+1.1].3+[[1.1+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+3}.2}.2+\omega^{\omega+2}+\omega}.3+\omega^{\omega^{\omega+3}.3}.3}^4(5)$$

$$J_3(680) =$$ f[[[1.1+0.3].4].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega+3}.4}}}^2(5)$$

$$J_3(700) =$$ f[[[1.1+0.4].1+1.1+0.2].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega+4}+\omega+2}.4}.4}^5(5)$$

$$J_3(720) =$$ f[[[1.1+0.4].3+1.1].3+[1.1+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega+4}.3+\omega}.3+\omega^{\omega+3}.3}.3}^4(5)$$

$$J_3(740) =$$ f[[[1.2].1].3+[1.2+0.2].1+1.1+0.1].2+[[1.1+0.4].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.2}}.3+\omega^{\omega.2+2}+\omega+1}.2+\omega^{\omega^{\omega+4}.2}.2}^3(5)$$

$$J_3(760) =$$ f[[[1.2].3].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.2}.3}.2}.2}^3(5)$$

$$J_3(780) =$$ f[[[1.2].4+1.2+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.2}.4+\omega.2+3}.3}.3}^4(5)$$

$$J_3(800) =$$ f[[[1.2+0.1].2+1.1+0.4].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+1}.2+\omega+4}.2}.2}^3(5)$$

$$J_3(820) =$$ f[[[1.2+0.1].4+1.1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+1}.4+\omega}}}^2(5)$$

$$J_3(840) =$$ f[[[1.2+0.2].2].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+2}.2}.3}.3}^4(5)$$

$$J_3(860) =$$ f[[[1.2+0.2].4].1+[1.1+0.1].2+1.1+0.2].1+[[1.1+0.1].2+1.1+0.2].1+[1.1].3+1.1+0.3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+2}.4}+\omega^{\omega+1}.2+\omega+2}+\omega^{\omega^{\omega+1}.2+\omega+2}+\omega^{\omega}.3+\omega+3}^4(5)$$

$$J_3(880) =$$ f[[[1.2+0.3].1+1.2+0.2].1+[1.1+0.1].2+1.1+0.2].1+[[1.1+0.1].2+1.1+0.2].1+[1.1].3+1.1+0.3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+3}+\omega.2+2}+\omega^{\omega+1}.2+\omega+2}+\omega^{\omega^{\omega+1}.2+\omega+2}+\omega^{\omega}.3+\omega+3}^4(5)$$

$$J_3(900) =$$ f[[[1.2+0.3].3+1.1+0.2].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+3}.3+\omega+2}.4}.4}^5(5)$$

$$J_3(920) =$$ f[[[1.2+0.4].1].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+4}}.4}.4}^5(5)$$

$$J_3(940) =$$ f[[[1.2+0.4].3].2+[1.1+0.4].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.2+4}.3}.2+\omega^{\omega+4}.2}.2}^3(5)$$

$$J_3(960) =$$ f[[[1.3].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega.3}}}}^2(5)$$

$$J_3(980) =$$ f[[[1.3].2+1.2+0.3].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.3}.2+\omega.2+3}.3}.3}^4(5)$$

$$J_3(1000) =$$ f[[[1.3].4+1.1+0.2].1+[1.1+0.2].1+1.1].3+[[1.3].3+1.3].3+[1.3].3+1.3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.3}.4+\omega+2}+\omega^{\omega+2}+\omega}.3+\omega^{\omega^{\omega.3}.3+\omega.3}.3+\omega^{\omega.3}.3+\omega.3}^4(5)$$

$$J_3(1050) =$$ f[[[1.3+0.2].1].1].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.3+2}}}.3}^4(5)$$

$$J_3(1100) =$$ f[[[1.3+0.3].1+1.1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega.3+3}+\omega}}}^2(5)$$

$$J_3(1150) =$$ f[[[1.3+0.4].1+1.3+0.3].4+[1.2+0.1].2+1.1+0.4].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.3+4}+\omega.3+3}.4+\omega^{\omega.2+1}.2+\omega+4}.2}^3(5)$$

$$J_3(1200) =$$ f[[[1.4].2].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega.4}.2}.4}.4}^5(5)$$

$$J_3(1250) =$$ f[[[1.4+0.1].2+1.4].3+[1.3+0.4].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.4+1}.2+\omega.4}.3+\omega^{\omega.3+4}.2}.2}^3(5)$$

$$J_3(1300) =$$ f[[[1.4+0.2].3].3+[1.3+0.4].2].2^3(5) $$= f_{\omega^{\omega^{\omega^{\omega.4+2}.3}.3+\omega^{\omega.3+4}.2}.2}^3(5)$$

$$J_3(1350) =$$ f[[[1.4+0.3].3+1.3+0.2].4].4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega.4+3}.3+\omega.3+2}.4}.4}^5(5)$$

$$J_3(1400) =$$ f[[[1.4+0.4].4].3].3^4(5) $$= f_{\omega^{\omega^{\omega^{\omega.4+4}.4}.3}.3}^4(5)$$

$$J_3(1450) =$$ f[[[2.1+0.1].4+1.0+0.2].3].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}+1}.4+\omega.0+2}.3}}^2(5)$$

$$J_3(1500) =$$ f[[[2.1+0.4].1+1.0+0.1].2+[2.1+0.1].2+2.1+0.1].2+[[2.1+0.1].2+2.1+0.1].2+[2.1+0.1].2+2.1+0.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}+4}+\omega.0+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}^2(5)$$

$$J_3(1550) =$$ f[[[2.1+1.2].2+1.0+0.1].2+[2.1+0.1].2+2.1+0.1].2+[[2.1+0.1].2+2.1+0.1].2+[2.1+0.1].2+1.0+0.4^5(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}+\omega.2}.2+\omega.0+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{2}+1}.2+\omega.0+4}^5(5)$$

$$J_3(1600) =$$ f[[[2.1+1.3+0.4].2].2+[2.1+0.1].2+2.1+0.1].2+[[2.1+0.1].2+2.1+0.1].2+[2.1+0.1].2+2.1^5(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}+\omega.3+4}.2}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{\omega^{2}+1}.2+\omega^{2}+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}}^5(5)$$

$$J_3(1650) =$$ f[[[2.2].4].3+[1.0+0.3].3].3^5(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.2}.4}.3+\omega^{\omega.0+3}.3}.3}^5(5)$$

$$J_3(1700) =$$ f[[[2.2+0.3].1].2+[2.1+0.2].4+1.0+0.1].2+[[2.1+0.2].4+1.0+0.1].2+[2.1+0.1].2+2.1+0.1^4(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.2+3}}.2+\omega^{\omega^{2}+2}.4+\omega.0+1}.2+\omega^{\omega^{\omega^{2}+2}.4+\omega.0+1}.2+\omega^{\omega^{2}+1}.2+\omega^{2}+1}^4(5)$$

$$J_3(1750) =$$ f[[[2.2+1.1+0.1].1].4+[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.2+\omega+1}}.4+\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(1800) =$$ f[[[2.2+1.3].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.2+\omega.3}}}}^2(5)$$

$$J_3(1850) =$$ f[[[2.2+1.4+0.3].4+2.1+0.2].4+[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.2+\omega.4+3}.4+\omega^{2}+2}.4+\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(1900) =$$ f[[[2.3+0.1].4+2.2+1.2+0.3].3].4+[[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.3+1}.4+\omega^{2}.2+\omega.2+3}.3}.4+\omega^{\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(1950) =$$ f[[[2.3+0.4].1+2.2].3+[2.2+1.2+0.3].3].4+[[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.3+4}+\omega^{2}.2}.3+\omega^{\omega^{2}.2+\omega.2+3}.3}.4+\omega^{\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(2000) =$$ f[[[2.3+1.2].3+2.2+1.2+0.3].3].4+[[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.3+\omega.2}.3+\omega^{2}.2+\omega.2+3}.3}.4+\omega^{\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(2050) =$$ f[[[2.3+1.3+0.4].3+1.0+0.3].3].4+[[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.3+\omega.3+4}.3+\omega.0+3}.3}.4+\omega^{\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(2100) =$$ f[[[2.4].4+1.0+0.3].3].4+[[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.4}.4+\omega.0+3}.3}.4+\omega^{\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(2150) =$$ f[[[2.4+0.3].1+1.0+0.2].3].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.4+3}+\omega.0+2}.3}}^2(5)$$

$$J_3(2200) =$$ f[[[2.4+1.1+0.1].2+2.1+1.1+0.2].4+[1.0+0.1].2+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.4+\omega+1}.2+\omega^{2}+\omega+2}.4+\omega^{\omega.0+1}.2+\omega}}^2(5)$$

$$J_3(2250) =$$ f[[[2.4+1.3].2+1.0+0.1].2+[2.1+1.1+0.2].4+1.0+0.1].2+[[2.1+1.1+0.2].4+1.0+0.1].2+[2.1].2+2.1+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.4+\omega.3}.2+\omega.0+1}.2+\omega^{\omega^{2}+\omega+2}.4+\omega.0+1}.2+\omega^{\omega^{\omega^{2}+\omega+2}.4+\omega.0+1}.2+\omega^{\omega^{2}}.2+\omega^{2}+\omega}^2(5)$$

$$J_3(2300) =$$ f[[[2.4+1.4+0.4].2].2+[2.1+1.1+0.2].4+1.0+0.1].2+[[2.1+1.1+0.2].4+1.0+0.1].2+[2.1+0.1].1+1.0+0.3^3(5) $$= f_{\omega^{\omega^{\omega^{\omega^{2}.4+\omega.4+4}.2}.2+\omega^{\omega^{2}+\omega+2}.4+\omega.0+1}.2+\omega^{\omega^{\omega^{2}+\omega+2}.4+\omega.0+1}.2+\omega^{\omega^{2}+1}+\omega.0+3}^3(5)$$

$$J_3(2350) =$$ f[[[3.1+0.3].1+1.0+0.1].2+[2.0+1.3+0.4].2].2+[[2.0+1.3+0.4].2].2+[2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}+3}+\omega.0+1}.2+\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{2}}}^2(5)$$

$$J_3(2400) =$$ f[[[3.1+1.2].3+3.1+1.2].3+[3.1+1.2].3+3.1+1.2].3+[[3.1+1.2].3+3.1+1.4+0.3].1+[2.0].3+1.0+0.4^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}+\omega.2}.3+\omega^{3}+\omega.2}.3+\omega^{\omega^{3}+\omega.2}.3+\omega^{3}+\omega.2}.3+\omega^{\omega^{\omega^{3}+\omega.2}.3+\omega^{3}+\omega.4+3}+\omega^{\omega^{2}.0}.3+\omega.0+4}^2(5)$$

$$J_3(2450) =$$ f[[[3.1+1.4+0.4].1+1.0+0.3].3+[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}+\omega.4+4}+\omega.0+3}.3+\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2500) =$$ f[[[3.1+2.3+1.1].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}+\omega^{2}.3+\omega}}}}^2(5)$$

$$J_3(2550) =$$ f[[[3.2+0.1].2+3.2+0.2].1+[2.0+0.2].4+1.0+0.1].2+[[2.0+1.3+0.4].2].2+[2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.2+1}.2+\omega^{3}.2+2}+\omega^{\omega^{2}.0+2}.4+\omega.0+1}.2+\omega^{\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{2}}}^2(5)$$

$$J_3(2600) =$$ f[[[3.2+0.4].4+1.0].3+[3.1+2.3+0.2].4+1.0+0.3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.2+4}.4+\omega.0}.3+\omega^{\omega^{3}+\omega^{2}.3+2}.4+\omega.0+3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2650) =$$ f[[[3.2+1.3+0.2].3+2.0+1.3+0.4].2].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.2+\omega.3+2}.3+\omega^{2}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2700) =$$ f[[[3.2+2.2+0.2].1+2.0+0.2].4+[1.0+0.3].3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.2+\omega^{2}.2+2}+\omega^{2}.0+2}.4+\omega^{\omega.0+3}.3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2750) =$$ f[[[3.2+2.4+1.4].3+3.1+2.3+0.2].4+[1.0+0.3].3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.2+\omega^{2}.4+\omega.4}.3+\omega^{3}+\omega^{2}.3+2}.4+\omega^{\omega.0+3}.3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2800) =$$ f[[[3.3+0.3].1+3.2+0.4].2].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.3+3}+\omega^{3}.2+4}.2}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2850) =$$ f[[[3.3+1.2+0.1].2].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.3+\omega.2+1}.2}}}^2(5)$$

$$J_3(2900) =$$ f[[[3.3+1.4+0.4].3+2.0+0.2].4+[1.0+0.3].3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.3+\omega.4+4}.3+\omega^{2}.0+2}.4+\omega^{\omega.0+3}.3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(2950) =$$ f[[[3.3+2.3+1.1+0.4].2].3+[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.3+\omega^{2}.3+\omega+4}.2}.3+\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(3000) =$$ f[[[3.4+0.1].3+1.0+0.3].3+[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.4+1}.3+\omega.0+3}.3+\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(3050) =$$ f[[[3.4+0.4].4+3.2+0.2].1+[2.0+0.2].4+1.0+0.1].2+[[2.0+1.3+0.4].2].2+[2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.4+4}.4+\omega^{3}.2+2}+\omega^{\omega^{2}.0+2}.4+\omega.0+1}.2+\omega^{\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{2}}}^2(5)$$

$$J_3(3100) =$$ f[[[3.4+1.3+0.3].1+3.2+2.1+1.1+0.2].4+[1.0+0.3].3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.4+\omega.3+3}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{\omega.0+3}.3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(3150) =$$ f[[[3.4+2.2+0.3].1+3.2+2.1+1.1+0.2].4+[1.0+0.3].3].3+[[1.0].3+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{3}.4+\omega^{2}.2+3}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{\omega.0+3}.3}.3+\omega^{\omega^{\omega.0}.3+\omega}}^2(5)$$

$$J_3(3200) =$$ f[[[4.1].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}}}}}^2(5)$$

$$J_3(3250) =$$ f[[[4.1+0.4].2+4.1+1.1+0.2].4+[2.0+0.1].2+2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}+4}.2+\omega^{4}+\omega+2}.4+\omega^{\omega^{2}.0+1}.2+\omega^{2}}}^2(5)$$

$$J_3(3300) =$$ f[[[4.1+1.4].3+4.1+1.1+0.2].4+[2.0+0.1].2+2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}+\omega.4}.3+\omega^{4}+\omega+2}.4+\omega^{\omega^{2}.0+1}.2+\omega^{2}}}^2(5)$$

$$J_3(3350) =$$ f[[[4.1+2.3+1.2+0.3].3+1.0+0.2].1+[2.0+1.3+0.4].2].2+[[3.0+1.3+0.4].2].3+[1.0+0.1].1+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}+\omega^{2}.3+\omega.2+3}.3+\omega.0+2}+\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega.0+1}+\omega}^2(5)$$

$$J_3(3400) =$$ f[[[4.1+3.3+0.4].2].3+[4.1+1.1+0.2].4+2.0+0.1].2+[[3.0+1.3+0.4].2].3^5(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}+\omega^{3}.3+4}.2}.3+\omega^{\omega^{4}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{\omega^{3}.0+\omega.3+4}.2}.3}^5(5)$$

$$J_3(3450) =$$ f[[[4.2+0.2].2+1.0+0.2].1+[2.0+1.3+0.4].2].2+[[3.0+1.3+0.4].2].3+[1.0].3+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.2+2}.2+\omega.0+2}+\omega^{\omega^{2}.0+\omega.3+4}.2}.2+\omega^{\omega^{\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega.0}.3+\omega}^2(5)$$

$$J_3(3500) =$$ f[[[4.2+1.2+0.2].1+2.0+1.3+0.4].2].3+[[4.1+2.2+0.1].2+3.0+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.2+\omega.2+2}+\omega^{2}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega^{4}+\omega^{2}.2+1}.2+\omega^{3}.0+\omega.3+4}.2}^4(5)$$

$$J_3(3550) =$$ f[[[4.2+2.2].1].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.2+\omega^{2}.2}}}}^2(5)$$

$$J_3(3600) =$$ f[[[4.2+3.1+1.3+0.4].2].3+[4.1+2.2+0.1].2+3.0+1.3+0.4].2^4(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.2+\omega^{3}+\omega.3+4}.2}.3+\omega^{\omega^{4}+\omega^{2}.2+1}.2+\omega^{3}.0+\omega.3+4}.2}^4(5)$$

$$J_3(3650) =$$ f[[[4.3].1+3.0+1.3+0.4].2].3+[[4.1+3.2+2.1+1.1+0.2].4+2.0+0.1].2+[3.0+1.1].4+1.0^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.3}+\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega^{4}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega}.4+\omega.0}^2(5)$$

$$J_3(3700) =$$ f[[[4.3+0.4].3+2.0+1.3+0.4].2].3+[[4.1+3.2+2.1+1.1+0.2].4+2.0+0.1].2+[3.0+2.3+0.4].2+3.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.3+4}.3+\omega^{2}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega^{4}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega^{2}.3+4}.2+\omega^{3}}^2(5)$$

$$J_3(3750) =$$ f[[[4.3+1.4+0.1].2+3.0+1.3+0.4].2].3+[[4.1+3.2+2.1+1.1+0.2].4+2.0+0.1].2+[1.0+0.3].4+1.1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.3+\omega.4+1}.2+\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega^{4}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega.0+3}.4+\omega}^2(5)$$

$$J_3(3800) =$$ f[[[4.3+2.3+1.3+0.4].2].3+[4.1+3.2+2.1+1.1+0.2].4+2.0+0.1].2+[[3.0+1.3+0.4].3+2.0+0.3].1+[3.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.3+\omega^{2}.3+\omega.3+4}.2}.3+\omega^{\omega^{4}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{\omega^{3}.0+\omega.3+4}.3+\omega^{2}.0+3}+\omega^{\omega^{3}}}^2(5)$$

$$J_3(3850) =$$ f[[[4.3+3.3+1.2].3+4.1+3.2+2.1+1.1+0.2].4+[2.0+0.1].2+2.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.3+\omega^{3}.3+\omega.2}.3+\omega^{4}+\omega^{3}.2+\omega^{2}+\omega+2}.4+\omega^{\omega^{2}.0+1}.2+\omega^{2}}}^2(5)$$

$$J_3(3900) =$$ f[[[4.4+0.2].3].1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.4+2}.3}}}^2(5)$$

$$J_3(3950) =$$ f[[[4.4+1.2+0.2].4+2.0+0.1].2+[3.0+1.3+0.4].2].3+[[1.0+0.2].1+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.4+\omega.2+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega.0+2}+\omega}}^2(5)$$

$$J_3(4000) =$$ f[[[4.4+2.2+0.1].2+3.0+1.3+0.4].2].3+[[4.2+0.2].4+2.0+0.1].2+[3.0+1.3+0.3].4+2.0+1.1+0.3^3(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.4+\omega^{2}.2+1}.2+\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega^{4}.2+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega.3+3}.4+\omega^{2}.0+\omega+3}^3(5)$$

$$J_3(4050) =$$ f[[[4.4+3.1+2.1+1.1+0.2].4+2.0+0.1].2+[3.0+1.3+0.4].2].3+[[1.0+0.2].1+1.1].1^2(5) $$= f_{\omega^{\omega^{\omega^{\omega^{4}.4+\omega^{3}+\omega^{2}+\omega+2}.4+\omega^{2}.0+1}.2+\omega^{\omega^{3}.0+\omega.3+4}.2}.3+\omega^{\omega^{\omega.0+2}+\omega}}^2(5)$$

$$J_3(4096) =$$ f[[[[1.1].1].1].1].1^2(6) $$= f_{\omega^{\omega^{\omega^{\omega^{\omega}}}}}^2(6)$$

## VBA Program Code

The following is VBA visual basic code and will run as a macro in Microsoft Excel. These functions create a string literal of an FGH Function in either Compact FGH Notation or LaTeX math notation. The code has been simplified significantly and (hopefully) will not contain errors.

UPDATED 21 OCT 2015

Option Explicit

Dim jReal As Double, jMax As Integer

Function J_3(r As Double) As String

Dim i As Integer, j As Integer, s As String, t As String, d As Double

If r < 1 Then
J_3 = Int(r * 8)
Exit Function
Else
d = 8
j = 0
While r >= d
d = d * 8
j = j + 1
Wend

jReal = (r - 8 ^ j) / (8 ^ j * 7)
End If

jMax = j + 1

s = jOrdinal(jGet(1, 4), jGet(1, 4))
If j > 0 Then s = jRecurse(s, j)

j = jGet(2, 5)

J_3 = "f" & s & "^" & j & "(" & jGet(jMax + 1, 5) & ")"
End Function

Function jRecurse(s As String, j As Integer) As String

Dim t As String

t = "[" & s & "]"
jRecurse = t & "." & jGet(1, 4)

t = jReplicate(t)
If t <> "" Then jRecurse = jRecurse & "+" & t

If j > 1 Then jRecurse = jRecurse(jRecurse, j - 1)
End Function

Function jReplicate(s As String) As String

Dim i As Integer, j As Integer, k As Integer, m As Integer, n As Integer, t As String

n = 1
Do
n = InStr(n, s, ".")
If n = 0 Then Exit Do

t = Mid(s, n - 1, 1)
m = Mid(s, n + 1, 1)

If t <> "]" Then k = t Else k = 9
If k < 9 Then
i = jGet(0, k)
If i < k Then Exit Do
End If

j = jGet(IIf(i = 0, 0, 1), m)
If j < m Then Exit Do

Exit Do
Loop Until n = 0

If n = 0 Or k = 9 Then
jReplicate = s
Else
jReplicate = Left(s, n - 3)
If i > 0 Then jReplicate = jReplicate & jOrdinal(i, j)
End If

While Right(jReplicate, 1) = "["
jReplicate = Left(jReplicate, Len(jReplicate) - 1)
Wend

If jReplicate = "" Then Exit Function

j = 0
For i = Len(jReplicate) To 1 Step -1
Select Case Mid(jReplicate, i, 1)
Case "["
j = j - 1
Case "]"
j = j + 1
End Select

If j = -1 Then
jReplicate = Left(jReplicate, i - 1) & jRecurse(Mid(jReplicate, i + 1), 1)
j = 0
End If
Next i
End Function

Function jOrdinal(a As Integer, b As Integer) As String

Dim i As Integer, j As Integer

jOrdinal = a & "." & b
i = a
Do While i > 0
i = jGet(IIf(jOrdinal = "", 1, 0), i - 1)
j = jGet(IIf(i = 0, 0, 1), 4)
If j > 0 Then jOrdinal = IIf(jOrdinal = "", "", jOrdinal & "+") & i & "." & j
Loop
End Function

Function jGet(i As Integer, j As Integer) As Integer

jReal = jReal * (j - i + 1)

jGet = Int(jReal)
jReal = jReal - jGet

jGet = jGet + i
If jGet > jMax Then jMax = jGet - IIf(j = 5, 1, 0)
End Function

Function jString(s As String) As String

jString = Replace(Replace(Replace(s, "^", "}^"), "].", "."), ".", "}.")
jString = Replace(jString, "^1", "")
jString = Replace(jString, "f", "f_{\omega^{")

jString = Replace(jString, "+", "+\omega^{")
jString = Replace(jString, "[", "\omega^{")
jString = Replace(jString, "]", "}")

jString = Replace(jString, "\omega^{0}.", "")
jString = Replace(jString, "^{1}", "")
jString = Replace(jString, ".1", "")
End Function


How the Function Works

A description in pseudo-code is provided here. The code relies on three recursively called functions, one main function called J_3 and one other function called jGet.

Function jGet is used to iteratively process a real number. Each time it is called, a global variable jReal is multiplied by a number (given by a range) and the integer part of the result is returned. The decimal part of the result is stored in jReal and used again when jGet is next called.

jGet Pseudo-Code

Function jGet (startRange, endRange)

Multiply jReal by (endRange-startrange+1)

Let jGet = (integer part of rReal) + startRange

Let JReal = jReal - jGet

End Function

Function J_3 is used to generate the FGH function. It accepts one real number input parameter "r" which is mathematically manipulated to determine its order of magnitude (in powers of 8) and then call the three recursive functions.

J_3 Pseudo-Code

Function J_3 (r)

Loop until r < x where x = 1 and is iteratively multiplied by 8. This will give the order of magnitude of r in powers of eight, i.e. 8^n.

Calculate i = 8^(n-1)

Set global variable jReal to a number between 0 and 1 by calculating jReal = (r - i)/ (7.i)

Let J_3 = jOrdinal(jGet(1,4), jGet(1,4))

If n > 0 then Let J_3 = jRecurse(J_3, n)

End Function

Function jOrdinal is used to generate a simple sequence of ordinals using Compact FGH Notation. The compact notation greatly simplifies the string manipulation required by the jOrdinal and related functions to generate complex FGH functions. Following the general rules of the notation, the jOrdinal function will create monotonically decreasing ordinals of the form "p.m" equivalent to $$\omega^p.m$$.

jOrdinal has 2 input parameters representing the "p" and "m" values of the first "p.m" ordinal.

jOrdinal Pseudo-Code

Function jOrdinal (p, m)

Let jOrdinal = "p.m"

While p > 0

Let p = jGet(0,p-1)

If p = 0 then let i = 0 else let i = 1

Let m = jGet(i,4)

Concatenate "+p.m" to the end of jOrdinal

Loop

End Function

Function jRecurse is used to generate nested ordinal powers into a tower with a height given by the input parameter "t". It uses Compact FGH Notation to simplify the string manipulation required by this and related functions to generate complex FGH functions. Each level of the power tower is delimited with "[" square brackets "]". jRecurse accepts a string input parameter "s" as the seed ordinal string at the very top of the tower.

jRecurse Pseudo-Code

Function jRecurse (s, t)

Let jRecurse = "[" & s & "]"

Let jRecurse = jRecurse & "." & jGet(1,4) & jReplicate(jRecurse)

if t > 0 then Let jRecurse = jRecurse(jRecurse, t-1)

End Function

Function jReplicate is used to do the heavy lifting of these related functions and involves two halves. First it will replicate a given ordinal in Compact FGH Notation. The replicated ordinal is allowed to be any value up to but not including the given ordinal provided by input parameter "s". Compact FGH notation is used to greatly simplify the string manipulation required by this function to generate these replicated ordinals. Refer to the general rules of the notation for why the sequence of ordinals must be monotonically decreasing.

jGet is called to test each finite number in the given ordinal and set the replicated ordinal to the same value, or, a lower number where required. At the first instance that a lower number is required, the replicated ordinal is severed and the remaining sequence is constructed using recursive calls to the related functions.

The second half of this function constructs the remainder of the replicated ordinal. It starts by searching the ordinal string (in reverse) for any instances of "[" square "]" brackets starting with the last character. When an unmatched instance of "[" bracket is found the function concatenates a "]" bracket and then replicates the contents enclosed by the brackets. This process is repeated until the entire replicated ordinal has been tested.

jReplicate Pseudo-Code

Function jReplicate (s)

Let jReplicate = s

For i = 1 to (length of jReplicate)
If i'th character of jReplicate is "." then
Let t = (i-1)th character of jReplicate
If t <> "]" then
Let j = jGet(0,t)
Replace (i-1)th character of jReplicate with j
End the If Block
Let u = (i+1)th character of jReplicate
Let k = jGet(0,u)
Replace (i+1)th character of jReplicate with k
If j < t or k < u then Exit the For Loop
End the If Block
For Loop

Delete all characters in jReplicate after the (i+1)th character

Let j = 0

For i = (length of jReplicate) to 1 in Steps of -1
If i'th character of jReplicate is "]" then Let j = j + 1
If i'th character of jReplicate is "[" then Let j = j - 1
If j = -1 then
Let s = all the characters in jReplicate after the i'th character
Delete all characters in jReplicate after the (i-1)th character
Concatenate jRecurse(s,1) to the end of jReplicate
Let j = 0
End the If Block
For Loop

End Function


VBA Code Components

• VBA Global Variables
• jReal - Real number that keeps track of the residual value of the original "r" input parameter for J_3 function. This variable is manipulated by the function jGet.
• jMax - Integer that keeps track of the largest finite ordinal used in the ordinal of the FGH function being constructed. This variable is used to calculate a valid input number "n" for the FGH function. "n" needs to be between jMax and 5 for the constructed FGH function to be valid.
• VBA Functions
• J_3 Function that generates a 'string literal' of an FGH function. It does not calculate a mathematical expression equal to the FGH function. Think of it as a tool to generate the Compact FGH Notation for FGH functions with fine-grained ordinals of various sizes. Use jString(J_3(r)) to create an FGH function with the usual math notation.
• jGet Function that extracts an integer from a real number by repeatedly multiplying the real by a range defined by the input parameters. The integer part of the result is used and the decimal part is multiplied again when the function is next called.
• jOrdinal Function that generates a simple sequence of ordinals using Compact FGH Notation.
• jRecurse Function that generates nested ordinal powers into a tower with a height using Compact FGH Notation.
• jReplicate Function that replicates a given ordinal in Compact FGH Notation and generates a similar but monotonically smaller instance of the given ordinal.
• jString Function that translates Compact FGH Notation into the familiar LaTeX math notation for FGH functions. Using jString(J_3(r)) will avoid the compact notation altogether. Refer to the blog on Compact FGH Notation for the relevant translation logic.