login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A332777
a(n) = k^2 mod p where p is the n-th prime and of the form 6k-1 or 6k+1.
0
1, 1, 4, 4, 9, 9, 16, 25, 25, 36, 8, 6, 17, 28, 41, 39, 54, 2, 71, 11, 30, 47, 62, 87, 83, 3, 106, 22, 60, 91, 118, 112, 29, 21, 48, 77, 116, 149, 5, 176, 69, 59, 104, 94, 170, 31, 82, 70, 123, 166, 154, 7, 50, 95, 142, 128, 177, 242, 228, 57, 145, 216, 200, 273
OFFSET
3,3
COMMENTS
Offset is 3 because 5=prime(3) is the first prime of the given form. It is provable that if 6m-1 and 6m+1 are a pair of twin primes, then for all k, 0<k<m, and p being a prime of the form 6k-1 or 6k+1 then m^2 is not equivalent to k^2 mod p.
PROG
(PARI) a(n) = {my(p=prime(n), k); if (((p-1) % 6) == 0, k = (p-1)/6, k = (p+1)/6); k^2 % p; } \\ Michel Marcus, Jun 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Keith Backman, Jun 08 2020
EXTENSIONS
More terms from Michel Marcus, Jun 09 2020
STATUS
approved