Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Jun 30 2021 19:48:56
%S 0,0,0,0,0,3,0,0,0,8,0,6,0,-1,-1,0,0,16,0,13,0,19,0,15,0,0,0,35,0,-3,
%T 0,0,-1,32,-2,48,0,-1,0,45,0,-14,0,38,-1,43,0,30,0,0,-1,45,0,51,10,
%U -18,0,56,0,13,0,-1,-3,0,-13,19,0,96,-1,-8,0,57,0,0,0,70,9,0,0,60,0,80,0,-6,-18,-1,-1,-2,0,-11,-1,131
%N a(n) = A344878(n) - A011772(n).
%H Antti Karttunen, <a href="/A344976/b344976.txt">Table of n, a(n) for n = 1..16384</a>
%H Antti Karttunen, <a href="/A344976/a344976.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%F a(n) = A344878(n) - A011772(n).
%F a(n) <= A344876(n).
%t A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
%t 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]}]]];
%t a[n_] := A344878[n] - A011772[n];
%t Array[a, 100] (* _Jean-François Alcover_, Jun 12 2021 *)
%o (PARI)
%o 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
%o 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))));
%o A344976(n) = (A344878(n)-A011772(n));
%Y Cf. A011772, A344876, A344878, A344977 (positions of negative terms), A344978, A344979 (positions of zeros), A344885 (and their characteristic function).
%K sign
%O 1,6
%A _Antti Karttunen_, Jun 04 2021