OFFSET
1,1
COMMENTS
The ratio A120301(a(n))/A058313(a(n)) = {5, 7, 11, 5, 13, 7, 17, 7, 37, 10, 29, 119, 47, 41, 23, 5, 29, 31, 37, 11, 37, 41, 43, 13, 7, 13, 71, 13, 49, 13, 7,...} is prime for the most a(n).
The first composite ratio A120301(a(n))/A058313(a(n)) corresponds to a(n) = a(29) = 1470 because A120301(1470)/A058313(1470) = 49 = 7^2. [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[{n, rfg}]], {n, 1, 15000}]
PROG
(PARI) isok(n) = my(sn = sum(k=1, n, (-1)^(k+1)/k)); numerator(sn) != abs(numerator((-1/4) * (2*(-1)^n*n + (-1)^n - 1)*sn));
for (n=1, 4200, if (isok(n), print1(n, ", "))); \\ Michel Marcus, May 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Nov 22 2006
EXTENSIONS
a(47)-a(51) from Petros Hadjicostas, May 09 2020
STATUS
approved