cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336597 a(n) is the least number k 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)) dividing n, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 3, 0, 5, 3, 7, 0, 3, 5, 11, 0, 13, 7, 3, 0, 17, 3, 19, 0, 0, 11, 23, 0, 5, 13, 3, 0, 29, 3, 31, 0, 0, 17, 7, 9, 37, 19, 3, 0, 41, 0, 43, 0, 3, 23, 47, 0, 7, 5, 3, 0, 53, 3, 11, 0, 0, 29, 59, 0, 61, 31, 9, 0, 0, 0, 67, 0, 0, 7, 71, 0, 73, 37, 3, 0, 0, 3, 79, 0, 3, 41, 83, 0, 5, 43, 3, 0, 89, 3
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 26 2020

Keywords

Comments

Conjecture: For each natural number n, either there is a divisor k 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)) and it is unique, or it does not exist.
This has been checked up to at least 10^3.

Crossrefs

Supersequence of A065091 and A002997. Cf. A334006.

Programs

  • Magma
    [1] cat [&*[d: d in Divisors(n)]/&*[k: k in [1..n] | not #[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m] eq k and n mod k eq 0] - 1 + #[k: k in [1..n] | #[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m] eq k and n mod k eq 0]: n in [2..90]];
    
  • PARI
    a(n) = {fordiv(n, d, if (d == sum(m=0, n-1, Mod(m,n)^d == m)/sum(m=0, n-1, Mod(-m,n)^d == m), return (d)););} \\ Michel Marcus, Aug 20 2020