Here's the limit in terms of a (not obviously) integer "triangle" h(n,d): 'limit(%e^(%pi/(12*d^2*y))*sqrt(y)*e\ta(%i*y+n/d),y,0) = %e^(%i*%pi*h(n,d)/(12*d))/sqrt(d) pi i h(n, d) pi ------- ------------ 2 12 d 12 d y n e limit e sqrt(y) eTa(i y + -) = ------------- y -> 0 d sqrt(d) where maybe we could spell eta with a tau to indicate it's not the q flavor. h(n,d) is just d*g(n/d), but the definition of g(r) I gave had the peculiarity of recursing exclusively with r>1, even though we "always" call it with r<1, thus wasting a recursion and memoizing space. This definition h(n,d) := 3*d-(if n = 1 then 1+d^2 else (1+d*h(nummod(d,n),n))/n+d*floor(d/n)) 2 d h(mod(d, n), n) + 1 d h(n, d) := 3 d - (if n = 1 then d + 1 else --------------------- + d floor(-)) n n while even more peculiar, maintains n<d throughout the recursion, but I put "triangular" in quotes because it also works for n>d: \n 1 2 3 4 5 6 7 8 9 10 11 12 d ------------------------------------------------------------------------- 1| 1 2 3 4 5 6 7 8 9 10 11 12 | 2| 1 3 5 7 9 11 | 3| - 1 4 2 7 5 10 8 13 | 4| - 5 9 - 1 13 3 17 | 5| - 11 2 3 16 - 6 7 8 21 - 1 12 | 6| - 19 25 - 13 31 | 7| - 29 - 4 9 - 2 11 36 - 22 3 16 5 18 | 8| - 41 - 3 11 49 - 33 5 | 9| - 55 - 14 20 - 11 23 64 - 46 - 5 | 10| - 71 3 7 81 - 61 | 11| - 89 - 28 - 15 - 14 35 - 24 25 26 39 100 - 78 | 12| - 109 7 5 121 | 13| - 131 - 46 - 9 16 5 54 - 41 8 - 3 22 59 144 | 14| - 155 - 33 - 31 45 47 | 15| - 181 - 68 - 34 77 - 62 49 | 16| - 209 - 27 35 25 - 9 - 19 | 17| - 239 - 94 - 57 4 - 7 - 54 - 5 104 - 87 22 71 24 | 18| - 271 - 11 23 - 5 | 19| - 305 - 124 - 51 - 62 - 61 60 - 11 26 135 - 116 - 7 30 | 20| - 341 - 87 - 83 51 - 31 h(n,d) requires only integer arithmetic because the .../n always comes out even. Presumably. Does anyone see why mod(d h(mod(d, n), n), n) = - 1 ? Neil, how do you handle 2D arrays with undefined entries? If this is already in EIS, I've wasted a lot of work. --rwg Magic moment: The mass of the lady being sawn times the separation of her respective halves.