Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #27 Apr 25 2024 13:58:50
%S 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 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 18,28,58,4,60,30,6,16,12,10,66,16,22,12,35,6,9,18,20
%N a(n) is the multiplicative order of A053669(n) modulo n.
%F a(2k+1) = A002326(k) for k >= 1.
%F a(2k) = ord(A284723(k), 2k).
%t a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; MultiplicativeOrder[p, n]]; Array[a, 75] (* _Amiram Eldar_, Mar 26 2024 *)
%o (Python)
%o from sympy.ntheory.residue_ntheory import n_order
%o from sympy import nextprime
%o def a(n):
%o if n == 1: return 1
%o if n & 1 == 1: return n_order(2, n)
%o p = 2
%o while n % p == 0:
%o p = nextprime(p)
%o return n_order(p, n)
%o print([a(n) for n in range(1, 76)])
%o (PARI) f(n) = forprime(p=2, , if(n%p, return(p))); \\ A053669
%o a(n) = znorder(Mod(f(n), n)); \\ _Michel Marcus_, Mar 26 2024
%Y Cf. A002326, A053669, A284723.
%K nonn
%O 1,3
%A _Darío Clavijo_, Mar 26 2024