OFFSET
1,2
EXAMPLE
Triangle T(n,k) begins:
n\k 0 1 2 3 4 5 6 7 8 9 10
1: 1
2: 2 2
3: 3 4 2
4: 7 6 1 2
5: 5 9 3 3 5
6: 6 9 3 6 9 3
7: 7 16 7 3 7 3 6
8: 27 20 1 4 3 4 1 4
9: 25 21 3 1 9 3 1 9 9
10: 10 19 5 5 11 10 19 5 5 11
11: 11 28 5 13 13 13 5 5 5 13 10
...
T(5,2) = 3 because the equation x^y == 2 (mod 5) has the 3 solutions 2^1 == 2 (mod 5), 3^3 == 2 (mod 5) and 2^5 == 2 (mod 5).
PROG
(PARI) T(n, k) = sum(x=0, n-1, sum (y=1, n, Mod(x, n)^y == k)); \\ Michel Marcus, Mar 26 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Franz Vrabec, Mar 24 2020
STATUS
approved