SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

HARMNUMB

Name:
    HARMNUMB (LET)
Type:
    Library Function
Purpose:
    Compute harmonic numbers or generalized harmonic numbers.
Description:
    The generalized harmonic number is

      H(n,m) = SUM[k = 1 to n][1/k**m]

    The case where m = 1 is referred to as the harmonic number and has the formula

      H(n) = SUM[k = 1 to n][1/k]

    The m parameter is restricted to values greater than 1.

Syntax 1:
    LET <y> = HARMNUMB(<n>)             <SUBSET/EXCEPT/FOR qualification>
    where <n> is a number, variable, or parameter (> 1);
                <y> is a variable or a parameter (depending on what <x> is) where the computed harmonic number is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the harmonic number.

Syntax 2:
    LET <y> = HARMNUMB(<n>,<m>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <n> is a positive integer number, parameter or variable;
                <m> is a number, parmeter, or variable (> 1);
                <y> is a variable or a parameter (depending on what <x> is) where the computed harmonic number is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes the generalized harmonic number.

Examples:
    LET A = HARMNUMB(200)
    LET A = HARMNUMB(200,1.5)
Note:
    The zeta function is the limiting case of the generalized harmonic number as n goes to infinity.
Note: Default:
    None
Synonyms:
    None
Related Commands:
    ZETA = Compute the Riemann zeta function.
    ZIPPDF = Compute the Zipf probability mass function.
    ETA = Compute the eta function.
    CATLAN = Compute the Catlan Beta function.
    LAMBDA = Compute the lambda function.
Reference:
    "Atlas For Computing Mathematical Functions", William J. Thompson, John wiley & Sons, 1997.

    "AMS 55: Handbook of Mathematical Functions", Abramowitz and Stegun, Eds., Washington, DC, National Bureau of Standards, 1964.

Applications:
    Special Functions
Implementation Date:
    2006/5
Program:
     
    multiplot corner coordinates 0 0 100 95
    multiplot scale factor 2
    case asis
    label case asis
    title case asis
    tic offset units screen
    tic offset 3 3
    title displacement 2
    y1label displacement 17
    x1label displacement 12
    x1label N
    y1label Harmonic Number
    .
    multiplot 2 2
    .
    let m = 1.5
    title M = ^m
    plot harmnumb(n,m) for n = 1 1 100
    .
    let m = 2.0
    title M = ^m
    plot harmnumb(n,m) for n = 1 1 100
    .
    let m = 2.5
    title M = ^m
    plot harmnumb(n,m) for n = 1 1 100
    .
    let m = 3.0
    title M = ^m
    plot harmnumb(n,m) for n = 1 1 100
    .
    end of multiplot
    .
    justification center
    move 50 97
    text Generalized Harmonic Numbers (N = 1 to 100)
        
    plot generated by sample program

Date created: 6/12/2006
Last updated: 6/12/2006
Please email comments on this WWW page to alan.heckert@nist.gov.