login
Numerator of h(n+5) - h(n) where h(n) = Sum_{k=1..n} (1/k) are the Harmonic numbers.
3

%I #28 May 25 2023 08:37:59

%S 137,29,153,743,1879,1627,15797,2021,11899,25381,7793,2627,124877,

%T 26987,68879,65003,107699,66167,482897,16167,77293,412561,323959,

%U 94781,1323137,255127,587299,504563,255733,145209,2956637,277681,1247459,2094661,1558379,433501

%N Numerator of h(n+5) - h(n) where h(n) = Sum_{k=1..n} (1/k) are the Harmonic numbers.

%C a(n) = Numerator of (5*n^4 + 60*n^3 + 255*n^2 + 450*n + 274)/((n+1)*(n+2)*(n+3)*(n+4)*(n+5)).

%C (5*n^4 + 60*n^3 + 255*n^2 + 450*n + 274)/a(n) can be factored into 2^p(n)* 3^q(n) where p(n) is a sequence of period 4 repeating [1,2,1,3] and q(n) is of period 9,repeating [0,2,2,0,1,1,0,1,1].

%C p(n) = A131743(n) + 1.

%C q(n) = A011655(n) + [0,2,2,0,0,0,0,0,0]

%H G. C. Greubel, <a href="/A189998/b189998.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = (5*n^4 + 60*n^3 + 255*n^2 + 450*n + 274)/(2^q(n)*3^(P(9,n-1) + P(9,n-2) + 1 - P(3,n))), where q(n) = (1-(-1)^n)*(3+i^(n+1))/4 + 1 and P(k,n) = floor(1/2*cos(2*n*Pi/k)+1/2).

%p h:= n->sum(1/k,k=1..n):seq(numer(h(n+5)-h(n)), n=0..28);

%p q:=n-> (1-(-1)^n)*(3+I^(n+1))/4+1:

%p P:=(k,n)-> floor(1/2*cos(2*n*Pi/k)+1/2):

%p seq( (5*n^4+60*n^3+255*n^2+450*n+274)/(2^q(n)*3^(P(9,n-1)+P(9,n-2)+1-P(3,n))),n=0..28)

%t Numerator[Table[HarmonicNumber[n+5]-HarmonicNumber[n],{n,0,30}]] (* _Harvey P. Dale_, Sep 15 2016 *)

%o (Magma) [137] cat [Numerator(HarmonicNumber(n+5)-HarmonicNumber(n)): n in [0..30]]; // _G. C. Greubel_, Jan 11 2018

%o (Python)

%o from sympy import harmonic,numer

%o print([numer(harmonic(n+5) - harmonic(n)) for n in range(0, 30)])

%o # _Javier Rivera Romeu_, May 22 2023

%Y Cf. A011655, A131743.

%K nonn

%O 0,1

%A _Gary Detlefs_, May 03 2011