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.

A206590 Number of solutions (n,k) of k^3=n^3 (mod n), where 1<=k

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 3, 2, 0, 0, 1, 0, 0, 0, 3, 0, 2, 0, 1, 0, 0, 0, 3, 4, 0, 8, 1, 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 1, 2, 0, 0, 3, 6, 4, 0, 1, 0, 8, 0, 3, 0, 0, 0, 1, 0, 0, 2, 15, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 4, 1, 0, 0, 0, 3, 8, 0, 0, 1, 0, 0, 0, 3, 0, 2, 0, 1, 0, 0, 0, 7, 0, 6, 2
Offset: 2

Views

Author

Clark Kimberling, Feb 09 2012

Keywords

Examples

			8 divides exactly 3 of the numbers 8^3-k^3 for k = 1, 2 , ..., 7, so that a(8) = 3.
		

Crossrefs

Cf. A206825.

Programs

  • Mathematica
    f[n_, k_] := If[Mod[n^3 - k^3, n] == 0, 1, 0];
    t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
    a[n_] := Count[Flatten[t[n]], 1]
    Table[a[n], {n, 2, 120}] (* A206590 *)
  • PARI
    A206590(n) = { my(n3 = n^3); sum(k=1,n-1,!((n3-(k^3))%n)); }; \\ Antti Karttunen, Nov 17 2017