This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A062117 #22 May 13 2024 09:16:07 %S A062117 1,0,4,6,5,3,16,18,11,28,30,18,8,42,23,52,29,10,22,35,12,78,41,88,48, %T A062117 100,34,53,27,112,126,65,136,138,148,50,78,162,83,172,89,45,95,16,196, %U A062117 198,210,222,113,57,232,119,120,125,256,131,268,30,69,280,282,292,34 %N A062117 Order of 3 mod n-th prime. %H A062117 T. D. Noe, <a href="/A062117/b062117.txt">Table of n, a(n) for n = 1..10000</a> %e A062117 The 3rd prime is 5 and mod 5, 3^4 = 1, so a(3) = 4. %t A062117 Table[With[{p=Prime[n]},If[p==3,0,MultiplicativeOrder[3,p]]],{n,63}] (* _Ray Chandler_, Apr 06 2016 *) %o A062117 (GAP) A000040:=Filtered([1..350],IsPrime);; %o A062117 List([1..Length(A000040)],n->OrderMod(3,A000040[n])); # _Muniru A Asiru_, Feb 07 2019 %o A062117 (Python) %o A062117 from sympy import n_order, prime %o A062117 def A062117(n): return n_order(3,prime(n)) if n != 2 else 0 # _Chai Wah Wu_, Nov 10 2023 %o A062117 (PARI) a(n,{base=3}) = my(p=prime(n)); if(base%p, znorder(Mod(base,p)), 0) \\ _Jianing Song_, May 13 2024 %Y A062117 Cf. A019334 (full reptend primes in base 3). %Y A062117 In other bases: A014664, A082654, A211241, A211242, A211243, A211244, A211245, A002371. %K A062117 easy,nonn %O A062117 1,3 %A A062117 _Olivier Gérard_, Jun 06 2001