close
login
A337910
Integers of the form (the number of nonnegative bases m < n such that m^3 == m (mod n))/(the number of nonnegative bases m < n such that -m^3 == m (mod n)).
2
1, 1, 3, 3, 1, 3, 3, 5, 3, 1, 3, 9, 1, 3, 3, 5, 1, 3, 3, 3, 9, 3, 3, 15, 1, 1, 3, 9, 1, 3, 3, 5, 9, 1, 3, 9, 1, 3, 3, 5, 1, 9, 3, 9, 3, 3, 3, 15, 3, 1, 3, 3, 1, 3, 3, 15, 9, 1, 3, 9, 1, 3, 9, 5, 1, 9, 3, 3, 9, 3, 3, 15, 1, 1, 3, 9, 9, 3, 3, 5, 3, 1, 3, 27, 1, 3, 3, 15, 1, 3, 3, 9, 9, 3, 3, 15
OFFSET
1,3
COMMENTS
All the terms are odd numbers.
LINKS
FORMULA
1 <= a(n) < n, for n > 3.
MAPLE
f:= proc(n) local x; nops([msolve(x^3=x, n)])/nops([msolve(-x^3=x, n)]) end proc:
f(1):= 1: f(2):= 1: f(3):= 3: f(6):= 3:
map(f, [$1..100]); # Robert Israel, Oct 30 2025
MATHEMATICA
a[n_] := Length[Solve[x^3 == x, x, Modulus -> n]] / Length[Solve[-x^3 == x, x, Modulus -> n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Apr 22 2026 *)
PROG
(Magma) [#[m: m in [0..n-1] | m^3 mod n eq m]/#[m: m in [0..n-1] | -m^3 mod n eq m]: n in [1..96]];
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
STATUS
approved