OFFSET
1,3
COMMENTS
Possibly related to Maillet's determinants.
LINKS
Alexander Adam, Proof of the formula
Wikipedia, Maillet's determinant
FORMULA
Let n = Prod_{i>0} p_i^{m_i} be the prime factorization of n. Then a(n) = floor((n + 1)/2) + Prod_{i>0} (m_i + 1) - 2. - Alexander Adam, Nov 10 2012
EXAMPLE
From Alexander Adam, Nov 10 2012, (Start)
a(2^m) = 2^(m-1) + m - 1.
Let p >= 3 be a prime number. Then a(p^m) = (p^m + 1) / 2 + m - 1.
a(625000) = a(2^3*5^7) = 2^2*5^7 + 4 * 8 - 2 = 312530. (end)
MATHEMATICA
a[n_] := MatrixRank[Table[Table[Mod[i * j, n], {j, 0, n - 1}], {i, 0, n - 1}]]; Array[a, 100] (* Alexander Adam, Nov 10 2012 *)
PROG
(PARI) a(n) = matrank(matrix(n, n, i, j, (i*j)%n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Dec 01 2003
STATUS
approved