OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
MATHEMATICA
A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
A344878[n_] := If[n == 1, 1, Module[{p, e}, LCM @@ Table[{p, e} = pe; (p^(e + If[p == 2, 1, 0])) - 1, {pe, FactorInteger[n]}]]];
Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
PROG
(PARI)
A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
A344878(n) = if(1==n, n, my(f=factor(n)~); lcm(vector(#f, i, (f[1, i]^(f[2, i]+(2==f[1, i]))-1))));
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Jun 04 2021
STATUS
approved