# Derivation of tetration by iteration

I was screwing around a bit differentiating tetrations and was trying to write some rules for them.

I came up with this recursive definition: $$\frac{d\ ^nt}{dt} =\ ^nt \cdot log(t)\frac{d\ ^{n-1}t}{dt}+\ ^nt\ ^{n-1}tt^{-1}$$

Now I was trying to convert it to an iteration and read up on some programming note which suggested to do something like this: $$d(a, i, n) = \begin{cases} d(^it \cdot log(t) \cdot a+\ ^it\ ^{i-1}tt^{-1}, i+1,n),& \text{if } i\leq n\\ a, & \text{if }i = n+1 \end{cases} \\ \frac{d\ ^nt}{dt} = d(0,1,n)$$

Which is tail-recursive and therefore can be turned into an iteration by a few minor changes.

I was wondering whether that function could be written to something like a combination of a sum and a product function and how. Is this even possible?

Thanks

EDIT: I've found these guys having fun with this as well, but the posts are kind of old, the approaches are different from mine and they both seem to have hit a dead end. Because of that I find that this is not a duplicate. (I just wanted to get that out before this is marked as one.):
What is the derivative of ${}^xx$
$n^{th}$ derivative of a tetration function
(these might even come in handy.)

EDIT: I came up with some things, so, this is the iteration (Java, pseudocode, assuming a and b are some sort of object Java has implemented a computer algebra system for and n[4]t is our implementation for $\ ^nt$, $log(t)$ is an object, blah blah blah):

d(int n){
CASObject a = 0;
for (int i = 1; i <= n; ++i)
{
a = i[4]t * log(t) * a + i[4]t * (i - 1)[4]t / t;
}
return a;


Now if I'm correct, I could move the addend out of there like this (I think):

d2(int n){
CASObject a = 0;
for (int i = 1; i <= n; ++i)
{
b = i[4]t * (i - 1)[4]t / t;
for (int j = i; j <= n; ++j)
{
b *= j[4]t * log(t);
}
a += b;
}
return a;
}


Which in turn can be rewritten to: $$\frac{d\ ^nt}{dt} = \sum_{i = 1}^n\ ^it\ ^{i - 1}tt^{-1} \prod_{j = i + 1}^n\ ^jt \cdot log(t)$$

Is this even still correct or would someone have any comments or suggestions on my method? It's a shame WolframAlpha doesn't support actual tetration, so I'll have to check it with pen and paper.