Showing posts with label harmonic series. Show all posts
Showing posts with label harmonic series. Show all posts

Sunday, 12 February 2023

Kempner Series

I came upon this series quite by accident when investigating what are called Kempner numbers and the Kempner function. Both of these are quite different to the Kempner series defined by Wolfram Mathworld as follows:

A Kempner series \(K_d\) is a series obtained by removing all terms containing a single digit \(d\) from the harmonic series. Surprisingly, while the harmonic series diverges, all 10 Kempner series converge.

The example is given of:$$ K_1= \frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6}+\frac{1}{7}+\frac{1}{8}+\frac{1}{9}+\frac{1}{22}+ \dots $$where it can be seen that the fractions 1/1, 1/10, 1/11 etc. have been removed from the harmonic series. In general: $$ \sum_{k=1}^{\infty} \frac{1}{k} \approx 10^n \ln{10}$$when a particular string of length \(n\) is excluded. Thus, when removing the digit 1, the result is about 23.0258509299405. It takes a lot of terms to approach this number. After one million terms, the total is only about 7.717.

Another example is given of removing the string "314" which gives an approximation of 2302.58509299405 (just move the decimal place two to the right) whereas the actual result is closer to 2299.829782. Quite a good approximation. This convergence is surprising given that removing all the composite numbers in the harmonic series still results in its divergence.

So what about Kempner numbers and the Kempner function? The number associated with my diurnal age today, 26978, has a property that qualifies it for inclusion in OEIS A346211:


 A346211

Numbers m such that \( |(K(m+1) - K(m)| = 1\), where \(K(m)\) = A002034(\(m\)) is the Kempner function.



This is where I first came across the word "Kempner". The initial members of the sequence are:

1, 2, 3, 4, 9, 15, 35, 63, 99, 175, 195, 483, 1443, 2057, 2115, 2299, 3363, 3843, 5082, 5475, 6723, 7865, 11235, 11913, 12005, 22747, 24963, 26978, 27555, 31683, 37635, 41514, 46255, 51075, 62464, 68643, 76704, 77283, 89375, 95874, 98595, 104975, 105412, 113398

Following the link to the Kempner function, OEIS A002034, leads to the reference to Kempner numbers:


 A002034

Kempner numbers: smallest positive integer \(m\) such that \(n\) divides \(m\)!.



The initial members of this sequence are:

1, 2, 3, 4, 5, 3, 7, 4, 6, 5, 11, 4, 13, 7, 5, 6, 17, 6, 19, 5, 7, 11, 23, 4, 10, 13, 9, 7, 29, 5, 31, 8, 11, 17, 7, 6, 37, 19, 13, 5, 41, 7, 43, 11, 6, 23, 47, 6, 14, 10, 17, 13, 53, 9, 11, 7, 19, 29, 59, 5, 61, 31, 7, 8, 13, 11, 67, 17, 23, 7, 71, 6, 73, 37, 10, 19, 11, 13, 79, 6, 9, 41, 83, 7

The Kempner function is also known as the Smarandache Function which Wolfram Mathworld describes as:
The Smarandache function \( \mu(n) \) is the function first considered by Lucas (1883), Neuberg (1887), and Kempner (1918) and subsequently rediscovered by Smarandache (1980) that gives the smallest value for a given n at which \(n|\mu(n)!\) (i.e., \(n\) divides \( \mu(n)\) factorial). For example, the number 8 does not divide 1!, 2!, 3!, but does divide 4!=4·3·2·1=8·3, so \( \mu(8)=4\). This function has the property that it has a highly inconsistent growth rate: it grows linearly on the prime numbers but only grows sublogarithmically at the factorial numbers. 
The graph of the function is interesting. See Figure 1.


Figure 1: link

Wednesday, 24 November 2021

Star Numbers Revisited

 So called Star Numbers are few and far between. Up to 40,000, they are:

1, 13, 37, 73, 121, 181, 253, 337, 433, 541, 661, 793, 937, 1093, 1261, 1441, 1633, 1837, 2053, 2281, 2521, 2773, 3037, 3313, 3601, 3901, 4213, 4537, 4873, 5221, 5581, 5953, 6337, 6733, 7141, 7561, 7993, 8437, 8893, 9361, 9841, 10333, 10837, 11353, 11881, 12421, 12973, 13537, 14113, 14701, 15301, 15913, 16537, 17173, 17821, 18481, 19153, 19837, 20533, 21241, 21961, 22693, 23437, 24193, 24961, 25741, 26533, 27337, 28153, 28981, 29821, 30673, 31537, 32413, 33301, 34201, 35113, 36037, 36973, 37921, 38881, 39853

Today I happened to turn 26533 days old which is why my attention was drawn to them again. I had posted about these numbers in an eponymous blog post on 7th June 2019. On that occasion I was writing about the star number 25741 that was 109 days away at that point. I was surprised to see that this post came up in fourth position when the phrase "star numbers" was entered into the Google search bar (see Figure 1):


Figure 1

It also attracted two comments that I only just noticed (see Figure 2). I'm reminded that I should check my various blogs for comments on a regular basis, something that I've quite neglected.


Figure 2

In this post I want to look at some interesting properties of this sequence that I didn't cover in that earlier post. The first involves a result for the sum to infinity of the reciprocals of the star numbers:$$ \sum_{n=1}^{\infty} \frac{1}{S_n}=\frac{\pi \tan{\dfrac{\pi}{2 \sqrt{3}}}}{2 \sqrt{3}} \approx 1.15917331963217$$The second infinite sum involves the factorial function:$$ \sum_{n=0}^{\infty} \frac{S_n}{n!}=7 e$$The third infinite sum involves powers of 2:$$ \sum_{n=1}^{\infty} \frac{S_n}{2^n}=25$$These results are listed in Numbers Aplenty but no proofs are supplied, so I'm just listing them here. Wolfram MathWorld supplies a generating function for the star numbers:

(x(x^2+10x+1))/((1-x)^3)=x+13x^2+37x^3+73x^4+....

It also provides a linear recurrence relation: S_n=S_(n-1)+12(n-1). 

The star numbers form OEIS :


 A003154

Centered 12-gonal (dodecagonal) numbers. Also star numbers: 6*n*(n-1) + 1.


In the comments to this sequence in the OEIS, the diagram shown in Figure 3 appears:


Figure 3

So that's about it. In summary, this post is simply meant to supplement my earlier post and I would encourage anyone reading this post to read that as well, because it contains many other interesting facts about star numbers.

Monday, 5 July 2021

Euler–Mascheroni constant and the Meissel–Mertens constant

I've not written explicitly about either the Euler–Mascheroni constant or the Meissel–Mertens constant before, although the former is made mention of in a Numberphile video that I referenced in a post titled The Harmonic Series on October 12th 2016. 

Let's recount that the harmonic series is simply \(\zeta(1)\) and so:$$\zeta(1)=1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+ \dots =\sum_{n=1}^{\infty}\frac{1}{n}$$While this sequence does diverge it does so very slowly and that's what my post The Harmonic Series was all about. The Euler-Mascheroni constant can be defined as:$$\begin{align}

\gamma &= \lim_{n\to\infty}\left(-\log n + \sum_{k=1}^n \frac1{k}\right)\\

&=\int_1^\infty\left(-\frac1x+\frac1{\lfloor x\rfloor}\right)\,dx.

\end{align}$$Here, \(\lfloor x\rfloor\) represents the floor function. The numerical value of the Euler–Mascheroni constant, to 50 decimal places, is:

0.57721566490153286060651209008240243104215933593992... 

Below I've embedded the Numberphile video referred to earlier as it's really quite informative.



Like the harmonic series, the sum of the reciprocals of the prime numbers diverges also and even more slowly. The Meissel-Mertens constant is defined as:$$M = \lim_{n \rightarrow \infty } \left( \sum_{p \leq n} \frac{1}{p} - \ln(\ln n) \right)=\gamma + \sum_{p} \left[ \ln\! \left( 1 - \frac{1}{p} \right) + \frac{1}{p} \right]$$where \( \gamma \) is the Euler-Mascheroni constant. The value of M is approximately:

M ≈ 0.2614972128476427837554268386086958590516... 

Figure 1: source

The two constants are thus intimately linked. It's easy to generate approximations of these functions using SageMathCell. See Figure 2.

Figure 2: permalink

Looking at the results in Figure 2, it can be seen that:

Approximation of Euler-Mascheroni constant up to 100000 is 0.577220664893197
Approximation of Miessel-Mertens constant up to 100000 is 0.261801821365208

The light grey digits do not correspond to the known digits for these constants. It can be seen that the approximation to the Miessel-Mertens constant is less accurate than for the Euler-Mascheroni constant, reflecting the log(log) computation for the former versus the log computation for the latter.

For a post that shows how to determine the sum of the alternating harmonic series, see my post titled Alternating Series Test from April 23rd 2021. The alternating harmonic series converges thus:$$1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4} \dots=\ln(2) \approx 0.693147180559945 \dots$$See also: