login
A272295
Let 2*n+1 have prime factorization Prod_i p_i^k_i; then a(n) = Prod_i v_i^k_i, where v_i = (1+p_i)/2 if p_i == 1 (mod 4), v_i = (1-p_i)/2 if p_i == 3(mod 4).
3
1, -1, 3, -3, 1, -5, 7, -3, 9, -9, 3, -11, 9, -1, 15, -15, 5, -9, 19, -7, 21, -21, 3, -23, 9, -9, 27, -15, 9, -29, 31, -3, 21, -33, 11, -35, 37, -9, 15, -39, 1, -41, 27, -15, 45, -21, 15, -27, 49, -5, 51, -51, 9, -53, 55, -19, 57, -33, 7, -27
OFFSET
1,3
COMMENTS
Completely multiplicative.
If n = prime(k), a(n) = A271974(k).
LINKS
Dimitris Valianatos, Comments on this sequence, April 25 2016
FORMULA
Sum_{n >= 1, n not divisible by 2 or 3} 1/a(n) = 1.
Conjecture: Sum_{n >= 1, n not divisible by 2 or 3} (mb(n)/a(n))^2 = 7/5 = 1.4;
mb(n) is the moebius function.
EXAMPLE
For n=35=5*7, 5-> 3 and 7->-3 so v(35)=3*(-3)=-9, for n=77=7*11, 7->(-3) and 11->(-5) so v(77)=(-3)*(-5)=35.
MATHEMATICA
Table[Times @@ Apply[Power[#1, #2] &, Transpose@ MapAt[Which[Mod[#, 4] == 1, (1 + #)/2, Mod[#, 4] == 3, (1 - #)/2, True, 0] & /@ # &, Transpose@ FactorInteger@ n, 1], 1], {n, 1, 120, 2}] (* Michael De Vlieger, Apr 24 2016 *)
PROG
(PARI) a(n)=if(n%2 == 0, return(0)); fa=factorint(n); dv=fa[, 1]; pl=#dv; ml=fa[, 2]; g=1; for(i=1, pl, ds=dv[i]; v=1; if(ds%4==1, v*=(1+ds)\2, v*=(1-ds)\2); for(k=1, ml[i], g*=v)); return(g);
(PARI) {
forstep(n=1, 120, 2,
fa=factorint(n); dv=fa[, 1]; pl=#dv; ml=fa[, 2];
g=1;
for(i=1, pl,
ds=dv[i]; v=1;
if(ds%4==1, v*=(1+ds)\2, v*=(1-ds)\2);
for(k=1, ml[i], g*=v)
);
print1(g", ")
);
}
(PARI) a(n) = {my(f = factor(2*n-1)); for (k=1, #f~, if (f[k, 1] == 2, f[k, 1] = 0, if (f[k, 1] % 4 == 1, f[k, 1] = (1+f[k, 1])/2, f[k, 1] = (1-f[k, 1])/2)); ); factorback(f); } \\ Michel Marcus, May 02 2016
CROSSREFS
Cf. A271974.
Sequence in context: A318319 A321785 A021755 * A164984 A248810 A339904
KEYWORD
sign,mult
AUTHOR
Dimitris Valianatos, Apr 24 2016
EXTENSIONS
Edited by Franklin T. Adams-Watters, Apr 24 2016 and by N. J. A. Sloane, May 27 2016
STATUS
approved