OFFSET
1,1
COMMENTS
a(n) is prime for most n.
The first composite ratio a(12) = 119 = 7*17 corresponds to A123944(12) = 238.
The next two composite ratios a(29) = a(76) = 49 = 7^2 correspond to A123944(29) = 1470 and A123944(76) = 10290. [Edited by Petros Hadjicostas, May 09 2020]
MATHEMATICA
f = 0; Do[f = f + (-1)^(n + 1) * 1/n; g = Abs[(2(-1)^n * n + (-1)^n - 1)/4] * f; rfg = Numerator[g]/Numerator[f]; If[(rfg == 1) == False, Print[rfg]], {n, 1500}]
PROG
(PARI) lista(nn) = {for (n=1, nn, my(sn = sum(k=1, n, (-1)^(k+1)/k)); if ((s=numerator(sn)) != (ss=abs(numerator((-1/4) * (2*(-1)^n*n + (-1)^n - 1) * sn))), print1(ss/s, ", ")); ); } \\ Michel Marcus, May 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 02 2009
EXTENSIONS
a(32)-a(46) from Petros Hadjicostas, May 09 2020, using Michel Marcus's program and the data from A123944
a(47)-a(72) from Petros Hadjicostas, May 09 2020, using the Mathematica program
STATUS
approved