OFFSET
0,4
COMMENTS
Equivalently, T(n,k) = 2-adic valuation of n^2 + k^2.
Table is symmetric with respect to the main diagonal. For any Gaussian integer z = x + y*i, its (1 + i)-adic valuation is T(|x|,|y|) if z != 0 and +oo if z = 0.
FORMULA
For n + k*i != 0:
T(n,k) = v(n^2 + k^2, 2) where v(k, 2) = A007814(k) is the 2-adic valuation of k.
T(n,k) = 2*min{v(n, 2), v(k, 2)} if v(n, 2) != v(k, 2), otherwise v(n, 2) + v(k, 2) + 1. Here v(0, 2) = +oo.
EXAMPLE
Table begins
X 0 2 0 4 0 2 0 6 0 2 0 4 0 2 0 8 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
2 0 3 0 2 0 3 0 2 0 3 0 2 0 3 0 2 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
4 0 2 0 5 0 2 0 4 0 2 0 5 0 2 0 4 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
2 0 3 0 2 0 3 0 2 0 3 0 2 0 3 0 2 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
6 0 2 0 4 0 2 0 7 0 2 0 4 0 2 0 6 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
2 0 3 0 2 0 3 0 2 0 3 0 2 0 3 0 2 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
4 0 2 0 5 0 2 0 4 0 2 0 5 0 2 0 4 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
2 0 3 0 2 0 3 0 2 0 3 0 2 0 3 0 2 ...
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
8 0 2 0 4 0 2 0 6 0 2 0 4 0 2 0 9 ...
...
(X denotes that (1 + i)-adic valuation of 0 is +oo)
PROG
(PARI) T(n, k) = valuation(n^2+k^2, 2)
CROSSREFS
KEYWORD
AUTHOR
Jianing Song, Sep 28 2018
STATUS
approved