%I #22 Aug 30 2021 13:08:24
%S 1,3,8,15,23,34,47,61,78,97,117,140,165,191,220,251,283,318,355,393,
%T 434,477,521,568,617,667,720,775,831,890,951,1013,1078,1145,1213,1284,
%U 1357,1431,1508,1587,1667,1750,1835,1921,2010,2101,2193,2288,2385,2483,2584
%N a(n) = n^2 + 1 - ceiling((n + 2)/3).
%C Related to expansion of exp(2*(H_k-gamma))/k^2 in powers of 1/k as given by A331777/A331778.
%C The agreement with the results of the PARI code needs an explanation. All numerators corresponding to the computed denominators are 1.
%H Hugo Pfoertner, <a href="/A331943/b331943.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,-2,1).
%F From _Colin Barker_, Feb 10 2020: (Start)
%F G.f.: x*(1 + x + 3*x^2 + x^3) / ((1 - x)^3*(1 + x + x^2)).
%F a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>5.
%F (End)
%F E.g.f.: (1/9)*(3*exp(x)*x*(2 + 3*x) + 2*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)). - _Stefano Spezia_, Feb 14 2020
%t Table[n^2+1-Ceiling[(n+2)/3],{n,60}] (* or *) LinearRecurrence[{2,-1,1,-2,1},{1,3,8,15,23},60] (* _Harvey P. Dale_, Aug 30 2021 *)
%o (PARI) H(n)=sum(j=1,n,1/j);
%o A(k)=exp(2*(H(k)-Euler))/k^2;
%o for(k=1,51,r=(1/k)*(A(k)-1);print1(denominator(bestappr(r,k*k)),", "))
%Y Cf. A001008, A001620, A002805, A008620, A331777, A331778.
%K easy,nonn
%O 1,2
%A _Hugo Pfoertner_, Feb 10 2020
|