Showing posts with label Champernowne constant. Show all posts
Showing posts with label Champernowne constant. Show all posts

Friday, 11 June 2021

Concatenations

Today I turned 26366 days old and yesterday, of course, I was 26365 days old. Each of these numbers have the property that the leading two digits (26) represent the number of fortnights in a year while the final three digits (365 and 366) represents the number of days in non-leap years and a leap years respectively. Incidentally, 26 fortnights represent 26 x 14 = 364 days and so 26364 encodes that fact. Similar pairs of numbers include:

  • 12365 and 12366 where 12 represents the number of months in a calendar year
  • 13365 and 13366 where 13 represents the number of lunar months in a calendar year
  • 52365 and 52366 where 52 represents the number of full weeks in a calendar year
The concatenation of numbers, according to WolframMathWorld, is represented by the symbol \( \parallel \) and thus 26\( \parallel \)366 = 26366. The formula for the concatenation in base \(b\) of two numbers, \(p\) and \(q\), is given by:$$p \parallel q=p \, b^{f(q)} + q \text{ where } f(q)=\left \lfloor \log_b{q} \right \rfloor + 1$$$$ \text{where }f(q) \text{ represents the length of } q$$Let's test this formula out in the case of 26366. We have \(p=26\) and \(q=366\). Clearly the length of \(q\) is 3 but let's check using \( \left \lfloor \log_{10}366 \right \rfloor + 1\). The value of this is indeed 3 so all is good.

When constructing an algorithm, the formula is useful as a way of accomplishing the concatenation without resorting to strings. Figure 1 shows the relevant SageMath code.


Figure 1: permalink

26365 and 26366 have some interesting shared properties. They are both semiprimes and emirpimes :
  • 26365 = 5 * 5273 and 56362 = 2 * 28181
  • 26366 = 2 * 13183 and 66362 = 2 * 33181
In recreational mathematics, there are some interesting applications of concatenation. One of these involves so-called home primes. These are primes obtained by repeatedly factoring the increasing concatenation of prime factors of a given number. I've written about these in an eponymous post on May 2nd 2021. Let's work out the home primes for 26364, 26365 and 26366.

For 26364, we find ten steps are required to reach the home prime: 
 
26364
223131313
792824447
10113956473
21147933443
713589739409
4059117579999
31353039193333
1113305413717887
313175353597790561

For 26365, only six steps are required:

26365
55273
311783
734271
3311787
31764937

For 26366, seven steps are required:

26366
213183
3323687
17195511
35731837
196728069
365576023

The Smarandache–Wellin numbers involve the concatenations of the first prime numbers. These numbers form OEIS A019518:


 A019518

Smarandache-Wellin numbers: a(n) is the concatenation of first n primes (written in base 10).


The sequence begins:

2
23
235
2357
235711
23571113
2357111317
235711131719
23571113171923
2357111317192329
235711131719232931
23571113171923293137
2357111317192329313741
235711131719232931374143
23571113171923293137414347

Of the numbers listed here only 2, 23 and 2357 are prime. The next such number that is prime has 355 digits!

If we concatenate the integers, we create the Champernowne constant, a transcendental real constant whose decimal expansion has important properties. It is named after economist and mathematician D. G. Champernowne, who published it as an undergraduate in 1933. I've written about this constant in an eponymous post on March 22nd 2019. The constant begins 12345678910111213141516 ... 

The Copeland–ErdÅ‘s constant is formed by the concatenation of "0." with the base 10 representations of the prime numbers in order. Its value, using the modern definition of prime, is approximately 0.235711131719232931374143…

There is a reverse integer sequence that comprises OEIS A000422:


 A000422

Concatenation of numbers from n down to 1.             


The sequence begins:

1
21
321
4321
54321
654321
7654321
87654321
987654321
10987654321
1110987654321
121110987654321
13121110987654321
1413121110987654321
151413121110987654321
16151413121110987654321
1716151413121110987654321
181716151413121110987654321

Interestingly, this sequence produces very few primes with the first being when \(n=82\) and the next being \(n=37765\).

We can concatenate the odd, even, triangular, square, cubic and Fibonacci numbers and all of these have associated OEIS sequences. Follow this link for more information.

Friday, 22 March 2019

Champernowne constant

Yesterday, on the plane from Jakarta to Singapore, I was browsing The Story of Numbers by Mallik Asok Kumar and came across the following entry shown in Figure 1:

Figure 1: extract from page 114 of Mallik's The Story of Numbers


This struck a chord because earlier in the day, sitting in Starbuck's at Jakarta airport and analysing my number of the day (25554), I'd come across this entry in the Online Encyclopaedia of Integer Sequences (OEIS) shown in Figure 2:


Figure 2: OEIS A224896

What this meant was the sequence of digits 666666 occurs at position number 25554 in the decimal expansion of the Champernowne constant. Today, I had a look at the information contained in the Wikipedia entry for this topic. It explained that the Champernowne constant can be expressed as an infinite sequence:$$C_{m}=\sum_{n=1}^\infty\frac n{10_b^{~\left(\sum\limits_{k=1}^n\left\lceil\log_{10_b}(k+1)\right\rceil\right)}}$$where \(\lceil{x}\rceil = \)ceiling(\(x\)), \(10_b^{~x}=b^x\) in base 10, \(\log_{10_b}(x)=\log_{b_{10}}(x)\) and \(b\) is the base of the constant. However, a slightly different expression is given by Eric W. Weisstein (MathWorld):$$C_{m}=\sum_{n=1}^\infty\frac n{m^{\left(n+\sum\limits_{k=1}^{n-1}\left\lfloor\log_m(k+1)\right\rfloor\right)}}$$where \(\lfloor{x}\rfloor =\) floor function. I've no idea how these summations were arrived at but in order to determine positions listed in Figure 2, the SageMath code shown in Figure 4 can be used. The example shows the position of 88888888:

Figure 4: screenshot showing position of 88888888.
Click here to verify yourself in SageMathCell

Furthermore, the general name given to sequences like OEIS A224896 is the Earls Sequence, as explained in Figure 3.

Figure 3: The Earls Sequence showing the Champernowne constant
as well as other well known constants

Getting back to Champernowne's constant, its continued fraction expansion does not terminate (because it is not rational) and is aperiodic (because it is not an irreducible quadratic, Kurt Mahler having shown that the constant is transcendental). The terms in the continued fraction expansion exhibit very erratic behaviour, with extremely large terms appearing between many small ones e.g.
[0; 8, 9, 1, 149083, 1, 1, 1, 4, 1, 1, 1, 3, 4, 1, 1, 1, 15,
4 57540 11139 10310 76483 64662 82429 56118 59960 39397 10457 55500 06620 04393 09026 26592 56314 93795 32077 47128 65631 38641 20937 55035 52094 60718 30899 84575 80146 98631 48833 59214 17830 10987,
6, 1, 1, 21, 1, 9, 1, 1, 2, 3, 1, 7, 2, 1, 83, 1, 156, 4, 58, 8, 54, ... ]
To quote further from Wikipedia:
The large number at position 19 has 166 digits, and the next very large term at position 41 of the continued fraction has 2504 digits. The fact that there are such large numbers as terms of the continued fraction expansion is equivalent to saying that the convergents obtained by stopping before these large numbers provide an exceptionally good approximation of the Champernowne constant.