cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A119682 Numerator of Sum_{k=1..n} (-1)^(k+1)/k^2.

Original entry on oeis.org

1, 3, 31, 115, 3019, 973, 48877, 191833, 5257891, 5194387, 634871227, 629535127, 107159834863, 106497287263, 107074439839, 426268707331, 123711093737059, 41082589491553, 14880853934789833, 2967138724292741, 2975331071381381
Offset: 1

Views

Author

Alexander Adamchuk, Jun 08 2006, Jun 25 2006

Keywords

Comments

p divides a(p-1) for prime p > 2 -- similar to Wolstenholme's theorem for A007406(n) (numerator of Sum_{k=1..n} 1/k^2).

Examples

			The first few fractions are 1, 3/4, 31/36, 115/144, 3019/3600, 973/1200, 48877/58800, 191833/235200, 5257891/6350400, ... = A119682/A334580. - _Petros Hadjicostas_, May 06 2020
		

Crossrefs

Cf. A003418, A007406, A334580 (denominators).

Programs

  • GAP
    List(List([1..25],n->Sum([1..n],k->(-1)^(k+1)*(1/k^2))),NumeratorRat); # Muniru A Asiru, Apr 07 2018
  • Maple
    seq(numer(simplify(LerchPhi(-1,2,n)*(-1)^n+Pi^2/12-(-1)^n/n^2)),n=1..30); # Robert Israel, May 30 2018
  • Mathematica
    Numerator[Table[Sum[(-1)^(i+1)*1/i^2,{i,1, n}],{n,1,40}]]
    Sqrt[Numerator[Table[Sum[Sum[(-1)^(i+j)*1/(i*j)^2, {i, 1, n}], {j, 1, n}],{n,1,20}]]] (* Alexander Adamchuk, Jun 26 2006 *)
    a[n_] := 1/12 (Pi^2 - 3 (-1)^n Zeta[2, (1 + n)/2, IncludeSingularTerm -> False] + 3 (-1)^n Zeta[2, 1 + n/2, IncludeSingularTerm -> False]) // Simplify // Numerator
    Table[a[n], {n, 1, 22}]  (* Gerry Martens, Jun 01 2018 *)
  • PARI
    a(n) = numerator(sum(k=1, n, (-1)^(k+1)/k^2)); \\ Altug Alkan, Apr 06 2018
    
  • PARI
    first(n) = {my(res = vector(n), s = 1); res[1] = 1; for(k = 2, n, s = -s; res[k] = res[k - 1] + s/k^2; res[k - 1] = numerator(res[k - 1])); res} \\ David A. Corneth, Apr 07 2018
    

Formula

a(n) = numerator(Sum_{k=1..n} (-1)^(k+1)/k^2).
a(n) = abs(numerator(Sum_{j=1..n} Sum_{i=1..n} (-1)^(i+j)*j/i^2)). - Alexander Adamchuk, Jun 26 2006
a(n) = sqrt(numerator(Sum_{j=1..n} Sum_{i=1..n} (-1)^(i+j)/(i*j)^2)). - Alexander Adamchuk, Jun 26 2006
a(n) = numerator((1/12)*(Pi^2-3*(-1)^n*(zeta(2,(1+n)/2)-zeta(2,(2+n)/2)))). - Gerry Martens, Apr 07 2018