Idea for OEIS plotting: Quasilog plots

David W. Cantrell DWCantrell at sigmaxi.net
Fri May 23 17:38:28 CEST 2008


I like DWW's idea. It might also be noted that a more compact 
expression for qlog10(x) is

qlog10(x) = asinh(x/2)/log(10).

David W. Cantrell

----- Original Message ----- 
From: "David W. Wilson" <wilson.d at anseri.com>
To: <seqfan at ext.jussieu.fr>
Sent: Friday, May 23, 2008 16:10
Subject: Idea for OEIS plotting: Quasilog plots


>I was thinking of an improvement to the OEIS logarithmic graphs.
>
>
>
> I acknowledge the importance of the log graphs. For example, if a
> sequence has extremely fast growth, the regular plot is unrevealing, 
> as
> most of the elements are plotted at 0. An example is A000142, where 
> the
> normal plot is pretty much useless, while the log plot nicely 
> reveals
> smooth mildly superexponential growth.
>
>
>
> While the current log plots are very useful, I do have a couple of
> peeves.
>
>
>
> My minor peeve is that the log plots are inconsistent. Either
> log(|a(n)|+1) or log(|a(n)|) and sometimes just n is plotted 
> depending
> on the sequence's range and whether or not it includes 0. For 
> instance,
> compare A000142, A000179 and A008683.
>
>
>
> My second peeve is a little more peevish. Specifically, when a 
> sequence
> includes both large positive and negative values, these values are 
> both
> plotted in the positive direction. This is particularly troublesome 
> when
> large positive and negative values are closely interleaved. For
> instance, the log plots of A039834 and A053495 are rather deceiving.
>
>
>
> I have a suggestion for improving the log plots.
>
>
>
> I suggest that instead of log10(x), we do log plots with the 
> quasi-log10
> function
>
>
>
>    [1] qlog10(x) = log((x+sqrt(x^2+4))/2)/log(10).
>
>
>
> qlog10 satisfies
>
>
>
>    [2] qlog10(10^x-10^(-x)) = x.
>
>
>
> This is, q is the inverse of x -> 10^x-10^(-x). Thus q is a nice 
> smooth
> increasing R->R function.
>
>
>
> From [2], we obtain some nice graphical properties of qlog10.
>
>
>
>    [3] qlog10(-x) = -qlog10(x).
>
>
>
> qlog10 is an odd function. positive, negative, and zero a(n) will 
> map to
> positive, negative and zero y-coordinates, respectively. [3] also 
> allows
> us to implement
>
>
>
>    [4] qlog10(x) = [1] if x >= 0; -qlog10(-x) if x < 0
>
>
>
> which avoids unstable calculations of [1] on large negative 
> arguments.
>
>
>
> We also have
>
>
>
>    [5] For x >= 1, 0 < qlog10(x)-log10(x) < log10(2)/x^2.
>
>
>
> In other words, qlog10(x) is close enough to log10(x) for graphing
> purposes. Specifically, qlog10(10) = 1.00428..., a perturbation of 
> less
> that 1/2 %, which means that 10^n will visually map very closely to
> y-axis tick mark n for n >= 1. Even qlog10(1) = .20898+ is not too 
> far
> from 0. qlog10(x) is definitely more accurate than log(x)+1, 
> currently
> used for many sequences.
>
>
>
> To summarize, plotting qlog10(n) gives a plot that preserves order 
> and
> sign and closely approximates sgn(n)*log10(n) fairly well for all 
> but
> the smallest n, and which can be used to plot any sequence 
> regardless of
> its range.
>
>
>
> For someone with plotting capabilities, it might be instructive to
> create a graph which compares log10(x), -log10(-x) and qlog10(x).
>
> 






More information about the SeqFan mailing list