OFFSET
3,3
LINKS
T. D. Noe, Table of n, a(n) for n = 3..1000
PROG
(PARI) a(n)=(prime(n)-1)/if(n<0, 0, k=1; while((3^k-1)%prime(n)>0, k++); k)
(Python)
from sympy import prime, n_order
def A094593(n):
p = prime(n)
return 1 if n == 3 else (p-1)//n_order(3, p) # Chai Wah Wu, Jan 15 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 06 2004
STATUS
approved