STATUS
editing
approved
editing
approved
<a href="/index/Pri#primes_root">Index entries for primes by primitive root</a>
approved
editing
proposed
approved
editing
proposed
from itertools import islice
proposed
editing
editing
proposed
(Python)
from sympy import n_order, nextprime
def A105874_gen(startvalue=3): # generator of terms >= startvalue
p = max(startvalue-1, 2)
while (p:=nextprime(p)):
if n_order(-2, p) == p-1:
yield p
A105874_list = list(islice(A105874_gen(), 20)) # Chai Wah Wu, Aug 11 2023
approved
editing
editing
approved
Let a(p,q)=sum(n=1,2*p*q,2*cos(2^n*Pi/((2*q+1)*(2*p+1)))). Then 2*p+1 is a prime of belonging to this sequence when a(p,1)==1. - Gerry Martens, May 21 2015
proposed
editing
editing
proposed