%I #19 May 13 2024 12:22:11
%S 1,0,2,3,5,3,8,9,11,14,15,9,4,21,23,26,29,5,11,35,6,39,41,44,24,50,17,
%T 53,27,56,63,65,68,69,74,25,39,81,83,86,89,45,95,8,98,99,105,111,113,
%U 57,116,119,60,125,128,131,134,15,69,140,141,146,17,155,39
%N Order of 9 mod n-th prime: least k such that prime(n) divides 9^k-1.
%H T. D. Noe, <a href="/A211245/b211245.txt">Table of n, a(n) for n = 1..1000</a>
%F From _Jianing Song_, May 13 2024: (Start)
%F a(n) = A062117(n)/gcd(2, A062117(n)).
%F a(n) <= (prime(n) - 1)/2. Those prime(n) for which a(n) = (prime(n) - 1)/2 are listed in A364867. (End)
%t nn = 9; Table[If[Mod[nn, p] == 0, 0, MultiplicativeOrder[nn, p]], {p, Prime[Range[100]]}]
%o (GAP) A000040:=Filtered([1..350],IsPrime);;
%o List([1..Length(A000040)],n->OrderMod(9,A000040[n])); # _Muniru A Asiru_, Feb 06 2019
%o (PARI) a(n,{base=9}) = my(p=prime(n)); if(base%p, znorder(Mod(base,p)), 0) \\ _Jianing Song_, May 13 2024
%Y Cf. A364867.
%Y In other bases: A014664, A062117, A082654, A211241, A211242, A211243, A211244, A002371, A372801.
%K nonn,easy
%O 1,3
%A _T. D. Noe_, Apr 11 2012