login
A344876
a(n) = A344875(n) - A011772(n).
7
0, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 6, 0, 11, 3, 0, 0, 16, 0, 13, 6, 19, 0, 15, 0, 24, 0, 35, 0, 9, 0, 0, 9, 32, 10, 48, 0, 35, 12, 45, 0, 16, 0, 38, 23, 43, 0, 30, 0, 48, 15, 45, 0, 51, 30, 42, 18, 56, 0, 41, 0, 59, 21, 0, 23, 49, 0, 96, 21, 52, 0, 57, 0, 72, 24, 70, 39, 60, 0, 60, 0, 80, 0, 36, 30, 83, 27, 118, 0, 61, 59, 131
OFFSET
1,6
COMMENTS
Apparently A000961 gives the positions of zeros.
FORMULA
a(n) = A344875(n) - A011772(n).
a(n) >= A344976(n).
MATHEMATICA
A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
A344875[n_] := Product[{p, e} = pe; If[p == 2, 2^(1+e)-1, p^e-1], {pe, FactorInteger[n]}];
a[n_] := If[n == 1, 0, A344875[n] - A011772[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
A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
A344876(n) = (A344875(n)-A011772(n));
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Jun 03 2021
STATUS
approved