login

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”).

A371531
a(n) is the multiplicative order of A053669(n) modulo n.
0
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, 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, 18, 28, 58, 4, 60, 30, 6, 16, 12, 10, 66, 16, 22, 12, 35, 6, 9, 18, 20
OFFSET
1,3
FORMULA
a(2k+1) = A002326(k) for k >= 1.
a(2k) = ord(A284723(k), 2k).
MATHEMATICA
a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; MultiplicativeOrder[p, n]]; Array[a, 75] (* Amiram Eldar, Mar 26 2024 *)
PROG
(Python)
from sympy.ntheory.residue_ntheory import n_order
from sympy import nextprime
def a(n):
if n == 1: return 1
if n & 1 == 1: return n_order(2, n)
p = 2
while n % p == 0:
p = nextprime(p)
return n_order(p, n)
print([a(n) for n in range(1, 76)])
(PARI) f(n) = forprime(p=2, , if(n%p, return(p))); \\ A053669
a(n) = znorder(Mod(f(n), n)); \\ Michel Marcus, Mar 26 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Darío Clavijo, Mar 26 2024
STATUS
approved