Fermat numbers of the form F(n)=2^(2^n)+1 can be found easily in the grid.
F(0) = 3 is the anomaly that appears in (2,1).
All others can be found in (1,n).
Pic attached shows the first 6 Fermat numbers, and 2 ways of iterating through these records starting from F(1).
Far right "ter" column is created via e,d,a where e=1, a=1, and d=c-1 from the previous record. This gets us directly to the (1,N) record.
The "na" column on the left is created via e,n,t in (1,1) where t=f/2 from the previous record. Notice that each f points to the next j. From these (1,1) records, an "an" movement will get us to the correct (1,N).