{x,y}→Array , Array→{x,y}

81 82 83 84 85 86 87 88 89 90 91
120 49 50 51 52 53 54 55 56 57 92
119 80 25 26 27 28 29 30 31 58 93
118 79 48 9 10 11 12 13 32 59 94
117 78 47 24 1 2 3 14 33 60 95
116 77 46 23 8 0 4 15 34 61 96
115 76 45 22 7 6 5 16 35 62 97
114 75 44 21 20 19 18 17 36 63 98
113 74 43 42 41 40 39 38 37 64 99
112 73 72 71 70 69 68 67 66 65 100
111 110 109 108 107 106 105 104 103 102 101

A = (2n - 1)^2 + l n + m

n = Floor[(Sqrt[A] + 1)/2]

P = A - (2n - 1)^2

l = Floor[P/n]

m = P - l n

{x,y}→A

n = Max[Abs[x], Abs[y]]

P = If[y == n, n + x, If[x == n, 3n - y, If[y == -n, 5n - x, If[x == -n, 7n + y]]]]

A = (2n - 1)^2 + P

A→{x,y}

n = Floor[(Sqrt[A] + 1)/2]

P = A - (2n - 1)^2

t = Floor[P/(2n)]

x = If[t == 0, P - n, If[t == 1,           n, If[t == 2, 5n - P, If[t == 3,          -n]]]]

y = If[t == 0,        n, If[t == 1, 3n - P, If[t == 2,         -n, If[t == 3, P - 7n]]]]

{x, y} = Switch[t, 0, {P - n, n}, 1, {n, 3n - P}, 2, {5n - P, -n}, 3, {-n, P - 7n}]

Ex

A = 940 ;

n = Floor[(Sqrt[A] + 1)/2] ;

P = A - (2n - 1)^2 ;

t = Floor[P/(2n)] ;

{x, y} = Switch[t, 0, {P - n, n}, 1, {n, 3n - P}, 2, {5n - P, -n}, 3, {-n, P - 7n}]

{x, y} = {-15, -6} ;

n = Max[Abs[x], Abs[y]] ;

P = If[y == n, n + x, If[x == n, 3n - y, If[y == -n, 5n - x, If[x == -n, 7n + y]]]] ;

A = (2n - 1)^2 + P