The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094593 a(n) = (p-1)/x, where p = prime(n) and x = ord(3,p), the smallest positive integer such that 3^x == 1 mod p. 9

%I #17 Jan 16 2020 01:00:46

%S 1,1,2,4,1,1,2,1,1,2,5,1,2,1,2,6,3,2,6,1,2,1,2,1,3,2,4,1,1,2,1,1,1,3,

%T 2,1,2,1,2,4,2,12,1,1,1,1,2,4,1,2,2,2,1,2,1,9,4,1,1,1,9,2,8,1,1,2,2,2,

%U 1,2,3,2,1,2,1,2,1,2,2,4,10,16,3,2,1,2

%N a(n) = (p-1)/x, where p = prime(n) and x = ord(3,p), the smallest positive integer such that 3^x == 1 mod p.

%H T. D. Noe, <a href="/A094593/b094593.txt">Table of n, a(n) for n = 3..1000</a>

%F a(n) = (A000040(n)-1)/A062117(n).

%o (PARI) a(n)=(prime(n)-1)/if(n<0,0,k=1;while((3^k-1)%prime(n)>0,k++);k)

%o (Python)

%o from sympy import prime, n_order

%o def A094593(n):

%o p = prime(n)

%o return 1 if n == 3 else (p-1)//n_order(3,p) # _Chai Wah Wu_, Jan 15 2020

%Y Cf. A001917.

%K nonn

%O 3,3

%A _Benoit Cloitre_, Jun 06 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 22:45 EDT 2024. Contains 372497 sequences. (Running on oeis4.)