login
A323704
Number of cubic residues (including 0) modulo the n-th prime.
1
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,1
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
PROG
(Python)
from sympy import prime
def a(n):
p = prime(n)
return len(set([x**3 % p for x in range(p)]))
(PARI) a(n) = my(p=prime(n)); sum(k=0, p-1, ispower(Mod(k, p), 3)); \\ Michel Marcus, Feb 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Florian Severin, Jan 24 2019
STATUS
approved