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 A371531 #27 Apr 25 2024 13:58:50 %S A371531 1,1,2,2,4,2,3,2,6,4,10,2,12,6,4,4,8,6,18,4,6,5,11,2,20,3,18,6,28,4,5, %T A371531 8,10,16,12,6,36,18,12,4,20,6,14,10,12,11,23,4,21,20,8,6,52,18,20,6, %U A371531 18,28,58,4,60,30,6,16,12,10,66,16,22,12,35,6,9,18,20 %N A371531 a(n) is the multiplicative order of A053669(n) modulo n. %F A371531 a(2k+1) = A002326(k) for k >= 1. %F A371531 a(2k) = ord(A284723(k), 2k). %t A371531 a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; MultiplicativeOrder[p, n]]; Array[a, 75] (* _Amiram Eldar_, Mar 26 2024 *) %o A371531 (Python) %o A371531 from sympy.ntheory.residue_ntheory import n_order %o A371531 from sympy import nextprime %o A371531 def a(n): %o A371531 if n == 1: return 1 %o A371531 if n & 1 == 1: return n_order(2, n) %o A371531 p = 2 %o A371531 while n % p == 0: %o A371531 p = nextprime(p) %o A371531 return n_order(p, n) %o A371531 print([a(n) for n in range(1, 76)]) %o A371531 (PARI) f(n) = forprime(p=2, , if(n%p, return(p))); \\ A053669 %o A371531 a(n) = znorder(Mod(f(n), n)); \\ _Michel Marcus_, Mar 26 2024 %Y A371531 Cf. A002326, A053669, A284723. %K A371531 nonn %O A371531 1,3 %A A371531 _DarĂo Clavijo_, Mar 26 2024