Note: Please adjust width of browser if only one column is visible.

[Click here for another Shiny app on Benford's Law]

[Click here for another Shiny app on Benford's Law]

Consider a sequence of numbers where we fix the initial two numbers and then the
value of each subsequent number is the sum of the previous two. We will call this an
**additive sequence.**
When the initial two numbers are both 1 then this yields the famous Fibonacci sequence.
If you only consider the first digit of each number in an additive sequence and examine its distribution,
is it the case that it closely follows
Benford's Law?
This app generates an additive sequence, for a given length and initial sequence numbers,
and applies a goodness of fit test of the observed frequencies of first digits to Benford's Law

[Fibonacci sequence]

[Lucas sequence]

[Sequence has
numbers total]

**Goodness of Fit Test**

Note: Please adjust width of browser if only one column is visible.

[Click here for another Shiny app on Benford's Law]

[Click here for another Shiny app on Benford's Law]

Consider a sequence of the form
*b ^{1}*,

[Sequence has
numbers total]

**Goodness of Fit Test**

Note: Please adjust width of browser if only one column is visible.

[Click here for another Shiny app on Benford's Law]

[Click here for another Shiny app on Benford's Law]

Consider the sequence of prime numbers less than or equal to some power of 10. An article from 2009
shows that the distribution of the first digit of these prime numbers
is well described by what's known as
**Generalized Benford's Law (GBL)**
.
This app generates the prime numbers less than or equal to
10^{3}, 10^{4},
10^{5}, or 10^{6}
and applies a goodness of fit test of the observed frequencies of first digits to GBL.

More information on the Generalized Benford's Law can be found in the following journal article:

Luque, B. and Lacasa, L.(2009)
'The first-digit frequencies of prime numbers and Riemann zeta zeros'
*Proc. R. Soc. A*
, 465, 2197-2216

[Sequence has
prime numbers total]

**Goodness of Fit Test**