login
A344973
a(n) = A344875(n) mod A011772(n).
10
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 4, 3, 0, 0, 0, 0, 13, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 9, 0, 10, 0, 0, 16, 0, 0, 0, 16, 0, 6, 5, 20, 0, 30, 0, 0, 15, 6, 0, 24, 0, 42, 0, 0, 0, 11, 0, 28, 21, 0, 23, 5, 0, 0, 21, 12, 0, 57, 0, 0, 0, 14, 18, 0, 0, 60, 0, 0, 0, 36, 30, 40, 27, 22, 0, 26, 7, 16, 0, 44, 15, 0, 0, 0, 36
OFFSET
1,12
FORMULA
a(n) = A344875(n) mod A011772(n) = A344876(n) mod A011772(n).
MATHEMATICA
b[n_] := If[n == 1, 1, Module[{p, e}, Product[{p, e} = pe;
If[p == 2, 2^(1 + e) - 1, p^e - 1], {pe, FactorInteger[n]}]]];
c[n_] := Module[{m = 1}, While[Not[IntegerQ[m (m + 1)/(2 n)]], m++]; m];
a[n_] := Mod[b[n], c[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)); };
A344973(n) = (A344875(n)%A011772(n));
CROSSREFS
Cf. A344974 (positions of zeros).
Sequence in context: A094830 A196878 A209835 * A298528 A341325 A021947
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 04 2021
STATUS
approved