A120286 Numerator of 1/n^2 + 2/(n-1)^2 + 3/(n-2)^2 +...+ (n-1)/2^2 + n.
1, 9, 65, 725, 3899, 28763, 419017, 864669, 7981633, 3586319, 200763407, 2649665993, 34899471137, 176508049513, 356606957297, 12234391348253, 209672027529221, 4012917216669239, 15350275129353301, 15443118015171841
Offset: 1
Programs
-
Mathematica
Numerator[Table[Sum[Sum[1/i^2,{i,1,k}],{k,1,n}],{n,1,30}]] Table[-EulerGamma + HarmonicNumber[1 + n, 2] + n*HarmonicNumber[1 + n, 2] - PolyGamma[0, 2 + n], {n, 1, 20}] // Numerator (* Vaclav Kotesovec, May 02 2024 *)
-
Python
from fractions import Fraction def A120286(n): return sum(Fraction(n-i+1,i**2) for i in range(1,n+1)).numerator # Chai Wah Wu, May 01 2024
Formula
a(n) = numerator[Sum[Sum[1/i^2,{i,1,k}],{k,1,n}]].
Comments