A087688 a(n) = number of solutions to x^3 - x == 0 (mod n).
1, 2, 3, 3, 3, 6, 3, 5, 3, 6, 3, 9, 3, 6, 9, 5, 3, 6, 3, 9, 9, 6, 3, 15, 3, 6, 3, 9, 3, 18, 3, 5, 9, 6, 9, 9, 3, 6, 9, 15, 3, 18, 3, 9, 9, 6, 3, 15, 3, 6, 9, 9, 3, 6, 9, 15, 9, 6, 3, 27, 3, 6, 9, 5, 9, 18, 3, 9, 9, 18
Offset: 1
Links
- Eric M. Schmidt, Table of n, a(n) for n = 1..10000
- Lorenz Halbeisen and Norbert Hungerbuehler, Number theoretic aspects of a combinatorial function, Notes on Number Theory and Discrete Mathematics 5(4) (1999), 138-150; see Definition 7 for the shadow transform.
- N. J. A. Sloane, Transforms.
Programs
-
Maple
A087688 := proc(n) local a,x ; a := 0 ; for x from 0 to n-1 do if (x*(x^2-1)) mod n = 0 then a := a+1 ; end if; end do; a ; end proc: seq(A087688(n),n=1..70) ; # R. J. Mathar, Jan 07 2011
-
Mathematica
nsols[n_]:=Length[Select[Range[0,n-1],Mod[#^3-#,n]==0&]]; nsols/@Range[80] (* Harvey P. Dale, Mar 22 2011 *) f[2, e_] := Which[e == 1, 2, e == 2, 3, e >= 3, 5]; f[p_, e_] := 3; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
-
PARI
a(n)=if(n%2,3^omega(n),my(v=valuation(n,2));3^omega(n>>v)*[2,3,5][min(3,v)]) \\ Charles R Greathouse IV, Mar 22 2011
Formula
Multiplicative with a(p^e) = 3 for p an odd prime, a(2^1) = 2, a(2^2) = 3, a(2^e) = 5 for e >= 3. - Eric M. Schmidt, Apr 08 2013
Comments