login
A345993
Let m = A344005(n) = smallest m such that n divides m*(m+1); a(n) = gcd(n,m+1).
10
1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 4, 13, 7, 3, 16, 17, 9, 19, 5, 7, 11, 23, 3, 25, 13, 27, 4, 29, 6, 31, 32, 3, 17, 5, 9, 37, 19, 13, 8, 41, 7, 43, 4, 5, 23, 47, 16, 49, 25, 3, 13, 53, 27, 11, 8, 19, 29, 59, 4, 61, 31, 7, 64, 13, 6, 67, 17, 3, 5, 71, 9, 73, 37, 25, 4, 11, 13, 79
OFFSET
1,2
COMMENTS
By definition, a(n) <= n and a(n)*A345992(n) = n.
a(n) is even iff n/2 is in A344001. This is true, but essentially trivial, and does not provide any insight into either sequence.
Empirical: For n >= 3, a(n) >= 3, and a(n) = 3 iff n in 3*{2^odd, primes == -1 mod 6}.
LINKS
MAPLE
# load Findm from A344005
ans:=[];
for n from 1 to 40 do t1:=Findm(n)[1]+1; ans:=[op(ans), igcd(n, t1)]; od:
ans;
PROG
(PARI) f(n) = my(m=1); while ((m*(m+1)) % n, m++); m; \\ A344005
a(n) = gcd(n, f(n)+1); \\ Michel Marcus, Aug 06 2021
(Python 3.8+)
from math import gcd, prod
from itertools import combinations
from sympy import factorint
from sympy.ntheory.modular import crt
def A345993(n):
if n == 1:
return 1
plist = tuple(p**q for p, q in factorint(n).items())
return n if len(plist) == 1 else gcd(n, 1+int(min(min(crt((m, n//m), (0, -1))[0], crt((n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l))))) # Chai Wah Wu, Jun 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved