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.

User: Florian Severin

Florian Severin's wiki page.

Florian Severin has authored 2 sequences.

A323704 Number of cubic residues (including 0) modulo the n-th prime.

Original entry on oeis.org

2, 3, 5, 3, 11, 5, 17, 7, 23, 29, 11, 13, 41, 15, 47, 53, 59, 21, 23, 71, 25, 27, 83, 89, 33, 101, 35, 107, 37, 113, 43, 131, 137, 47, 149, 51, 53, 55, 167, 173, 179, 61, 191, 65, 197, 67, 71, 75, 227, 77, 233, 239, 81, 251, 257, 263, 269, 91, 93, 281, 95, 293
Offset: 1

Author

Florian Severin, Jan 24 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[With[{p=Prime[n]},If[Mod[p,3]==1,1+(p-1)/3,p]],{n,80}] (* Harvey P. Dale, Feb 02 2025 *)
  • PARI
    a(n) = my(p=prime(n)); sum(k=0, p-1, ispower(Mod(k,p), 3)); \\ Michel Marcus, Feb 26 2019
  • Python
    from sympy import prime
    def a(n):
      p = prime(n)
      return len(set([x**3 % p for x in range(p)]))
    

Formula

If prime(n) - 1 = 3k then a(n) = k+1, otherwise a(n) = prime(n). (Cf. formula for A236959.)
a(n) = A236959(n) + 1.
a(n) = A046530(A000040(n)). - Rémy Sigrist, Jan 24 2019

A323703 Number of values of (X^3 + X) mod prime(n).

Original entry on oeis.org

1, 3, 3, 5, 7, 9, 11, 13, 15, 19, 21, 25, 27, 29, 31, 35, 39, 41, 45, 47, 49, 53, 55, 59, 65, 67, 69, 71, 73, 75, 85, 87, 91, 93, 99, 101, 105, 109, 111, 115, 119, 121, 127, 129, 131, 133, 141, 149, 151, 153, 155, 159, 161, 167, 171, 175, 179, 181, 185, 187, 189, 195
Offset: 1

Author

Florian Severin, Jan 24 2019

Keywords

Comments

a(n) is also the number of values of any other polynomial of degree 3, except X^3.
a(n) appears to approach (2/3)*prime(n) as n increases.

Examples

			a(1) = 1 since the only value X^3 + X takes mod 2 is 0.
		

References

  • R. Daublebsky von Sterneck, Über die Anzahl inkongruenter Werte, die eine ganze Funktion dritten Grades annimmt, Sitzungsber. Akad. Wiss. Wien (2A) 114 (1908), 711-717.

Crossrefs

Cf. A323704 (the number of values of X^3), A130291 (the number of values of X^2, which is also the number of values of any other polynomial of degree 2).

Programs

  • Mathematica
    Array[Length@ Union@ Mod[Array[#^3 + # &, #], #] &@ Prime@ # &, 62] (* Michael De Vlieger, Jan 27 2019 *)
  • PARI
    a(n) = #Set(vector(prime(n), k, Mod(k^3+k, prime(n)))); \\ Michel Marcus, Jan 25 2019

Formula

a(n) = prime(n) - 2*floor(prime(n)/6 + 1/2), for n >= 3. - Ridouane Oudra, Jun 13 2020
for n>=3, a(n) = (2*p + (p/3))/3 with p=prime(n) and where (p/3) is the Legendre symbol. See von Sterneck, Sun, and Brazelton et al. articles. - Michel Marcus, Mar 17 2021