OFFSET
1,1
COMMENTS
The cube roots of unity mod p, the n-th prime congruent to 1 mod 3 (A002476), are 1, a(n) and p-a(n)-1.
That is, the smaller root of x^2 + x + 1 (mod p) where p is the n-th prime = 1 mod 3. - Charles R Greathouse IV, Jul 17 2020
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
The 5th prime == 1 (mod 3) is 37, 10^3 == 1 (mod 37), so a(5)=10.
PROG
(PARI) cbrt1(p) = {for (i=2, p, if (Mod(i, p)^3 == 1, return(i)); ); }
lista(nn) = {forprime(p=1, nn, if ((p%3) == 1, print1(cbrt1(p), ", "); ); ); } \\ Michel Marcus, Jul 17 2020
(PARI) do(x)=my(P=select(p->p%3==1, primes([2, x])), v); v=apply(p->lift((sqrt(Mod(-3, p))-1)/2), P); vector(#P, i, min(v[i], P[i]-v[i]-1)) \\ Charles R Greathouse IV, Jul 17 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Jud McCranie, Mar 18 2001
EXTENSIONS
Offset 1 from Bob Selcoe, Jul 17 2020
Name clarified by Michel Marcus, Jul 17 2020
STATUS
approved