A236959 Number of nonzero cubic residues modulo the n-th prime.
1, 2, 4, 2, 10, 4, 16, 6, 22, 28, 10, 12, 40, 14, 46, 52, 58, 20, 22, 70, 24, 26, 82, 88, 32, 100, 34, 106, 36, 112, 42, 130, 136, 46, 148, 50, 52, 54, 166, 172, 178, 60, 190, 64, 196, 66, 70, 74, 226, 76, 232, 238, 80
Offset: 1
Keywords
Examples
a(4) = 2 for residues of x^3 (mod 7 = prime(4)) are 1 and 6. a(3) = 4 for residues of x^3 (mod 5 = prime(3)) are 1, 2, 3, 4.
Programs
-
Maple
seq((ithprime(n)-1)/gcd(3,ithprime(n)-1), n=1..80); # Ridouane Oudra, Mar 13 2025
Formula
If prime(n)-1 = 3k then a(n) = k otherwise a(n) = prime(n)-1.
Extensions
a(20) corrected by Ridouane Oudra, Mar 13 2025