# harmonic(n) is Harmonic number 
=sum(1/k,k,1,n);
# harmonic(a,x) is genelized Harmonic number function 
=sum(1/k^a,k,1,x);
# harmonic(a,1,x) is incomplete genelized harmonic number
=integrate((1-t^a)/(1-t),t,0,x) ;
# harmonic(n,a,b)=sum(1/k^n,k,a,b);


harmonic(n_,1,b_):=harmonic(n,b);
harmonic(n_,a_,0):=0;
harmonic(n_,a_,inf):=zeta(n,a);

harmonic(0,x_):=x;
harmonic(1,x_):=harmonic(x);
harmonic(n_,0):=0;
harmonic(n_,1):=1;
harmonic(n_,2):=1+2^(-n);
harmonic(n_,inf):=zeta(n);


harmonic(1):=1;
harmonic(inf):=inf;