OFFSET
1,5
COMMENTS
If the sum of proper divisors of q in row q <= q, then q are 1, 2, 3, 4, 5, 8, 16, 17, 32, 64, 128, 256, 257, ...(union of Fermat primes and powers of 2).
EXAMPLE
Triangle T(n,k) begins:
n\k| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
---+------------------------------------------------------
1 | 1;
2 | 1, 1;
3 | 1, 3, 1;
4 | 1, 2, 1, 3;
5 | 1, 5, 1, 1, 1;
6 | 1, 3, 1, 3, 1, 3;
7 | 1, 7, 1, 3, 1, 3, 1;
8 | 1, 4, 1, 5, 1, 5, 1, 5;
9 | 1, 9, 1, 3, 1, 3, 1, 7, 1;
10 | 1, 5, 1, 1, 1, 5, 1, 1, 1, 5;
11 | 1, 11, 1, 3, 1, 3, 1, 3, 1, 3, 1;
12 | 1, 6, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9;
13 | 1, 13, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1;
14 | 1, 7, 1, 3, 1, 3, 1, 7, 1, 3, 1, 3, 1, 7;
15 | 1, 15, 1, 3, 1, 15, 1, 3, 1, 15, 1, 3, 1, 15, 1;
16 | 1, 8, 1, 5, 1, 9, 1, 5, 1, 9, 1, 5, 1, 9, 1, 5;
17 | 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
...
For (n, k) = (7, 3), there are three nonnegative values of m < n such that m^3 == m (mod 7) (namely 0, 1, and 6) and one nonnegative value of m < n such that -m^3 == m (mod 7) (namely 0), so T(7,3) = 3/1 = 3.
PROG
(Magma) [[#[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m]: k in [0..n-1]]: n in [1..17]];
(PARI) T(n, k) = sum(m=0, n-1, Mod(m, n)^k == m)/sum(m=0, n-1, -Mod(m, n)^k == m);
matrix(7, 7, n, k, k--; if (k>=n, 0, T(n, k))) \\ to see the triangle \\ Michel Marcus, Apr 17 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Juri-Stepan Gerasimov, Apr 12 2020
EXTENSIONS
Name corrected by Peter Kagey, Sep 12 2020
STATUS
approved