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.

Showing 1-1 of 1 results.

A087688 a(n) = number of solutions to x^3 - x == 0 (mod n).

Original entry on oeis.org

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

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

Keywords

Comments

Shadow transform of A007531. - Michel Marcus, Jun 06 2013
a(n) = 3 iff n belongs to (A061345 \ {1}) Union {4}. - Bernard Schott, Sep 16 2019

Crossrefs

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
Showing 1-1 of 1 results.