OFFSET
1,8
COMMENTS
Array read by antidiagonals: T(n,k) (n >=1, k >= 0) is part of n of the form (the number of nonnegative bases m < n such that m^k == m (mod n))/(the number of nonnegative bases m < n such that -m^k == m (mod n)).
FORMULA
T(n, 2*k) = 1; 1 <= T(n, 2*k+1) <= n.
EXAMPLE
The initial rows of the array are:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 1, 3, 3, 5, 3, 1, 3, 9, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 5, 3, 3, 5, 3, 5, 3, 9, 5, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 1, 3, 7, 5, 7, 1, 3, 9, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 5, 3, 3, 5, 3, 5, 3, 9, 5, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 1, 3, 3, 5, 3, 1, 3, 9, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 3, 3, 5, 3, 7, 5, 7, 5, 3, 9, 5, ...
The initial antidiagonals are:
1,
1, 1,
1, 1, 1,
1, 3, 1, 1,
1, 2, 1, 1, 1,
1, 5, 1, 3, 1, 1,
1, 3, 1, 3, 1, 1, 1,
1, 7, 1, 1, 1, 3, 1, 1,
1, 4, 1, 3, 1, 3, 1, 1, 1,
1, 9, 1, 3, 1, 5, 1, 3, 1, 1,
1, 5, 1, 5, 1, 3, 1, 3, 1, 1, 1,
1, 11, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1,
1, 6, 1, 1, 1, 5, 1, 3, 1, 3, 1, 1, 1,
1, 13, 1, 3, 1, 3, 1, 7, 1, 5, 1, 3, 1, 1,
...
PROG
(Magma) /* As triangle */ [[#[m: m in [0..n-k-1] | m^k mod (n-k) eq m]/
#[m: m in [0..n-k-1] | -m^k mod (n-k) eq m]: k in [0..n-1]]: n in [1..13]];
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Juri-Stepan Gerasimov, Sep 23 2020
STATUS
approved