login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333389
Triangle read by rows: T(n,k) is the number of solutions to x^y == k (mod n) for n >= 1, k >= 0, where 0 <= x < n and 1 <= y <= n.
0
1, 2, 2, 3, 4, 2, 7, 6, 1, 2, 5, 9, 3, 3, 5, 6, 9, 3, 6, 9, 3, 7, 16, 7, 3, 7, 3, 6, 27, 20, 1, 4, 3, 4, 1, 4, 25, 21, 3, 1, 9, 3, 1, 9, 9, 10, 19, 5, 5, 11, 10, 19, 5, 5, 11, 11, 28, 5, 13, 13, 13, 5, 5, 5, 13, 10, 23, 30, 1, 6, 35, 6, 1, 6, 11, 18, 1, 6
OFFSET
1,2
COMMENTS
T(n,0) = A333386(n);
T(n,1) = A333387(n) for n >= 2;
T(n,n-1) = A333388(n).
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