OFFSET
1,6
COMMENTS
By definition, a(n)*A345993(n) = n.
a(n) is even iff n/2 is in A344000. This is true, but essentially trivial, and does not provide any insight into either sequence.
Empirical: For n >= 3, a(n) <= n/3, and a(n) = n/3 iff n is in 3*{2^odd, primes == -1 mod 6}.
If n = 2*p^k where p is an odd prime then m = A344005(n) = p^k - 1 and a(n) = 2. Conversely, it appears that if a(n) = 2 then n is twice an odd prime power. (Corrected by Antti Karttunen, Jun 14 2022)
a(n) = 1 if n is a prime power. - Chai Wah Wu, Jun 01 2022
From Antti Karttunen, Jun 14 2022: (Start)
Conversely, if a(n) = 1 [i.e., A345993(n) = n] then n is a power of prime. (This follows from N. J. A. Sloane's Jul 11 2021 theorem given in A344005).
(End)
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
# load Findm from A344005
ans:=[];
for n from 1 to 40 do t1:=Findm(n)[1]; ans:=[op(ans), igcd(n, t1)]; od:
ans;
MATHEMATICA
smd[n_]:=Module[{m=1}, While[Mod[m(m+1), n]!=0, m++]; GCD[n, m]]; Array[smd, 110] (* Harvey P. Dale, Jan 07 2022 *)
PROG
(PARI) f(n) = my(m=1); while ((m*(m+1)) % n, m++); m; \\ A344005
a(n) = gcd(n, f(n)); \\ 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 A345992(n):
if n == 1:
return 1
plist = tuple(p**q for p, q in factorint(n).items())
return 1 if len(plist) == 1 else gcd(n, 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 01 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Dougherty-Bliss and N. J. A. Sloane, Jul 15 2021
STATUS
approved