# The pi day … aka The Feigenbaum constant day

Ok, so the pi-day is up and running (March 14, i.e., 3-14). At approximately half past three today, some kind of pi would be served around the globe.

In an older post I found some alternative pi days for those who don’t like the date-system (Month-Day):

and we found July 19 and July 22 as more “accurate” days for the pi – at least for us in Europe. The latter internationally acknowledged as the “Pi approximation day”. (Americans might claim March 1 as an approximation according to the principle Month/Day.)

So what else do we have? Is this it? Are there no other fancy constants that we could appreciate throughout the year?

Of course there is… forza some python and loop over the most commonly  (according to Wikipedia) used constants. Standard integers aside. A euro-date below is “Day/Month” and a US-date is a “Month/Day”. I have found the best-matching date in a least-square sense.

Notice the possible benefits of celebrating some/most constants twice a year if using both Euro and US date formats! I’ve however given preference to as early dates as possible for constants approximating to the same value for several dates. For example the interesting Legendre’s constant (= 1) which could be celebrated quite a few times throughout the year, but let’s stick to January 1.

It is also worth noticing  that the Feigenbaum constant approximation day could be celebrated today instead of pi.

• Btw – what else than celebrating the imaginary number i on February 30.
Euro US Value Constant
22/07 03/01 3.14159265359 The pi day
19/07 11/04 2.71828182846 Eulers day
17/12 07/05 1.41421356237 Pythagoras day
19/11 12/07 1.73205080757 Theodorus day
20/09 09/04 2.2360679775 sqrt5-day
04/07 11/19 0.577215664902 Euler-Mascheroni constant
13/08 08/05 1.61803398875 Golden ratio
03/11 06/23 0.261497212848 Meissel-Mertens constant
02/07 07/25 0.280169499024 Bernsteins constant
03/10 07/23 0.303663002899 Gauss-Kuzmin-Wirsing constant
04/11 06/17 0.353236371855 Hafner-Sarnak-McCurley constant
01/02 01/02 0.5 Landaus constant
04/07 04/07 0.56714329041 Omega constant
05/08 05/08 0.624329988544 Golomb-Dickman constant
07/11 09/14 0.6434105462 Cahens constant
02/03 02/03 0.660161815847 Twin prime constant
02/03 02/03 0.662743419349 Laplace limit
07/10 07/10 0.70258 Embree-Trefethen constant
07/09 10/13 0.764223653589 Landau-Ramanujan constant
07/08 07/08 0.87058838 Bruns constant for prime quadruplets
11/12 11/12 0.915965594177 Catalans constant
01/01 01/01 1 Legendres constant
11/10 11/10 1.0986858055 Lengyels constant
09/08 09/08 1.13198824 Viswanaths constant
06/05 06/05 1.20205690316 Aperys constant
13/10 09/07 1.30357726903 Conways constant
13/10 09/07 1.30637788386 Mills constant
04/03 04/03 1.32471795724 Plastic constant
16/11 10/07 1.45136923488 Ramanujan-Soldner constant
16/11 10/07 1.45607494858 Backhouses constant
16/11 03/02 1.4670780794 Porters constant
17/11 11/07 1.5396007178 Liebs squareice constant
08/05 08/05 1.60669515242 Erdos-Borwein constant
17/10 12/07 1.70521114011 Nivens constant
19/10 11/06 1.9021605831 Bruns constant for twin primes
23/10 07/03 2.29558714939 Universal parabolic constant
05/02 05/02 2.5029078751 Feigenbaum constant
31/12 08/03 2.58498175958 Sierpinskis constant
27/10 08/03 2.68545200107 Khinchins constant
14/05 11/04 2.80777024203 Fransen-Robinson constant
23/07 10/03 3.27582291872 Levys constant
27/08 10/03 3.35988566624 Reciprocal Fibonacci constant
14/03 09/02 4.6692016091 Feigenbaum constant
30/2 2/30 i, sqrt(-1) The imaginary day (30/2!)

# Updating the LibreOffice and Inkscape (GIMP) color palettes

Our university has changed its logotype to strengthen its international position. This means new guidelines with respect to documentation, templates and colors, i.e., the graphical profile. As usual, the Microsoft biasing – for good-and-bad – and all templates are given in PowerPoint and Word formats, etc. Since I am on linux, LibreOffice is my preference instead.

## Color palette in LibreOffice

So, question for today: how to update LibreOffice with the “new” colors?

The configuration files for the palettes for LibreOffice are found here:

```\$HOME/.config/libreoffice/4/user/config/standard.soc ```

and it can quite easily be appended with new color definitions. Of course this can also be done manually thorugh the GUI inside LibreOffice – but that is just tedious. Appending text using your favourite buffer does the job instead.

The file is an XML file with entries like:
``` <draw:color draw:name="JJW Color" draw:color="#aa8859"/> ```
and it does not take a degree in Rocket Science to understand the pattern. Just add them in the end before ` </ooo:color-table> `.

So what colors to add? Browsing the University’s web pages for the graphical profile and downloading the PDF gives me a set of RGB decimal values and corresponding Hex values (which do not match, btw). The list of colors from the document are given by:

 LiU Blue #00b3e7 LiU Turquoise #0cc7d3 LiU Green #00cfb6 LiU Orange #ff6442 LiU Purple #8781d3 LiU Yellow #fcf05f LiU Grey #687f91

And a set of of pantone colors. The hex codes for those colors can be found at e.g. http://en.labelpartners.com/pantone_coated_table.html.

 LiU PMS 306 #00b5e2 LiU PMS 305 #59cbe8 LiU PMS 2975 #99D6EA LiU PMS 319 #2DCCD3 LiU PMS 318 #88DBDF LiU PMS 317 #B1E4E3 LiU PMS 333 #3CDBC0 LiU PMS 332 #8CE2D0 LiU PMS 331 #A7E6D7 LiU PMS 171 #FF5C39 LiU PMS 170 #FF8674 LiU PMS 169 #FFB3AB LiU PMS 2725 #685bc7 LiU PMS 2715 #8B84D7 LiU PMS 2705 #A7A4E0 LiU PMS 3945 #f3e500 LiU PMS 3935 #f3ea5d LiU PMS 5415 #5b7f95 LiU PMS 5435 #a6bbc8 LiU PMS 5445 #b7c9d3

The first colors are also blended in levels of 100%, 80%, 60%, 40%, and 20%. How to find the hex codes for those kind of blends (white and the color)? Well, the internet is a beautiful thing and for example http://meyerweb.com/eric/tools/color-blend/#FFFFFF:FF6442:4:hex helps us out quite a bit. Doing all the homework gives us a nice little snippet to paste into the LibreOffice config file.

```<draw:color draw:name="LiU Blue 100" draw:color="#00b3e7"/><draw:color draw:name="LiU Blue 80" draw:color="#33c2ec"/><draw:color draw:name="LiU Blue 60" draw:color="#66d1f1"/><draw:color draw:name="LiU Blue 40" draw:color="#99e1f5"/><draw:color draw:name="LiU Blue 20" draw:color="#ccf0fa"/><draw:color draw:name="LiU Turquoise 100" draw:color="#0cc7d3"/><draw:color draw:name="LiU Turquoise 80" draw:color="#3dd2dc"/><draw:color draw:name="LiU Turquoise 60" draw:color="#6ddde5"/><draw:color draw:name="LiU Turquoise 40" draw:color="#9ee9ed"/><draw:color draw:name="LiU Turquoise 20" draw:color="#cef4f6"/><draw:color draw:name="LiU Green 100" draw:color="#00cfb6"/><draw:color draw:name="LiU Green 80" draw:color="#33d9c5"/><draw:color draw:name="LiU Green 60" draw:color="#66e2d3"/><draw:color draw:name="LiU Green 40" draw:color="#99ece2"/><draw:color draw:name="LiU Green 20" draw:color="#ccf5f0"/><draw:color draw:name="LiU Orange 100" draw:color="#ff6442"/><draw:color draw:name="LiU Orange 80" draw:color="#ff8368"/><draw:color draw:name="LiU Orange 60" draw:color="#ffa28e"/><draw:color draw:name="LiU Orange 40" draw:color="#ffc1b3"/><draw:color draw:name="LiU Orange 20" draw:color="#ffe0d9"/><draw:color draw:name="LiU Purple 100" draw:color="#8781d3"/><draw:color draw:name="LiU Purple 80" draw:color="#9f9adc"/><draw:color draw:name="LiU Purple 60" draw:color="#b7b3e5"/><draw:color draw:name="LiU Purple 40" draw:color="#cfcded"/><draw:color draw:name="LiU Purple 20" draw:color="#e7e6f6"/><draw:color draw:name="LiU Yellow 100" draw:color="#fcf05f"/><draw:color draw:name="LiU Yellow 80" draw:color="#fdf37f"/><draw:color draw:name="LiU Yellow 60" draw:color="#fdf69f"/><draw:color draw:name="LiU Yellow 40" draw:color="#fef9bf"/><draw:color draw:name="LiU Yellow 20" draw:color="#fefcdf"/><draw:color draw:name="LiU Grey 100" draw:color="#687f91"/><draw:color draw:name="LiU Grey 80" draw:color="#8699a7"/><draw:color draw:name="LiU Grey 60" draw:color="#a4b2bd"/><draw:color draw:name="LiU Grey 40" draw:color="#c3ccd3"/><draw:color draw:name="LiU Grey 20" draw:color="#e1e5e9"/><draw:color draw:name="LiU PMS 306" draw:color="#00b5e2"/><draw:color draw:name="LiU PMS 305" draw:color="#59cbe8"/><draw:color draw:name="LiU PMS 2975" draw:color="#99D6EA"/><draw:color draw:name="LiU PMS 319" draw:color="#2DCCD3"/><draw:color draw:name="LiU PMS 318" draw:color="#88DBDF"/><draw:color draw:name="LiU PMS 317" draw:color="#B1E4E3"/><draw:color draw:name="LiU PMS 333" draw:color="#3CDBC0"/><draw:color draw:name="LiU PMS 332" draw:color="#8CE2D0"/><draw:color draw:name="LiU PMS 331" draw:color="#A7E6D7"/><draw:color draw:name="LiU PMS 171" draw:color="#FF5C39"/><draw:color draw:name="LiU PMS 170" draw:color="#FF8674"/><draw:color draw:name="LiU PMS 169" draw:color="#FFB3AB"/><draw:color draw:name="LiU PMS 2725" draw:color="#685bc7"/><draw:color draw:name="LiU PMS 2715" draw:color="#8B84D7"/><draw:color draw:name="LiU PMS 2705" draw:color="#A7A4E0"/><draw:color draw:name="LiU PMS 3945" draw:color="#f3e500"/><draw:color draw:name="LiU PMS 3935" draw:color="#f3ea5d"/><draw:color draw:name="LiU PMS 5415" draw:color="#5b7f95"/><draw:color draw:name="LiU PMS 5435" draw:color="#a6bbc8"/><draw:color draw:name="LiU PMS 5445" draw:color="#b7c9d3"/> ```

## Color palette in Inkscape/Gimp

The color palettes in Inkscape and Gimp are stored in the configuration directory too, for example (depending on your versions):
``` \$HOME/.config/inkscape/palettes \$HOME/.gimp-2.6/palettes ```
Jump into those areas and create a file like `liu.gpl` containing the following lines, i.e., all the RGB codes for the hex above. A spreadsheet was done for that purpose.
``` GIMP Palette Name: LiU Colors Columns: 4 # 0 179 231 LiU Blue 100 51 194 236 LiU Blue 80 102 209 241 LiU Blue 60 153 225 245 LiU Blue 40 204 240 250 LiU Blue 20 12 199 211 LiU Turquoise 100 61 210 220 LiU Turquoise 80 109 221 229 LiU Turquoise 60 158 233 237 LiU Turquoise 40 206 244 246 LiU Turquoise 20 0 207 182 LiU Green 100 51 217 197 LiU Green 80 102 226 211 LiU Green 60 153 236 226 LiU Green 40 204 245 240 LiU Green 20 255 100 66 LiU Orange 100 255 131 104 LiU Orange 80 255 162 142 LiU Orange 60 255 193 179 LiU Orange 40 255 224 217 LiU Orange 20 135 129 211 LiU Purple 100 159 154 220 LiU Purple 80 183 179 229 LiU Purple 60 207 205 237 LiU Purple 40 231 230 246 LiU Purple 20 252 240 95 LiU Yellow 100 253 243 127 LiU Yellow 80 253 246 159 LiU Yellow 60 254 249 191 LiU Yellow 40 254 252 223 LiU Yellow 20 104 127 145 LiU Grey 100 134 153 167 LiU Grey 80 164 178 189 LiU Grey 60 195 204 211 LiU Grey 40 225 229 233 LiU Grey 20 0 181 226 LiU PMS 306 89 203 232 LiU PMS 305 153 214 234 LiU PMS 2975 45 204 211 LiU PMS 319 136 219 223 LiU PMS 318 177 228 227 LiU PMS 317 60 219 192 LiU PMS 333 140 226 208 LiU PMS 332 167 230 215 LiU PMS 331 255 92 57 LiU PMS 171 255 134 116 LiU PMS 170 255 179 171 LiU PMS 169 104 91 199 LiU PMS 2725 139 132 215 LiU PMS 2715 167 164 224 LiU PMS 2705 243 229 0 LiU PMS 3945 243 234 93 LiU PMS 3935 91 127 149 LiU PMS 5415 166 187 200 LiU PMS 5435 183 201 211 LiU PMS 5445 ```
Launch Inkscape and go down to the bottom next to the existing colors. There is a small arrow. Press it and find LiU Colors in the list. Select and get the new setup. Looks a bit like this:

# Top Ten Semlor

Today is fettisdagen, Shrove Tuesday. Time to boost your fat layer before lent. Easter is approaching! Old traditions here in Sweden (and Finland, apparently) call for eating a lot of unhealthy things to be able to endure the last batch of Winter days filled with cold and misery.

So let’s get to the point. Here is my top eight list of semlas and the first entry will start the story. You will find semlas for everyone’s taste – almost. In order to follow the recipes more easily, I have also added some illustrative pictures (sketches).

## 1) Originalsemlan

The original semla consists of whipped cream, almond paste, all stuffed in a piece of bread – sort of.

“Today, the Swedish-Finnish semla consists of a cardamom-spiced wheat bun which has its top cut off, and is then filled with a mix of milk and almond paste, topped with whipped cream. The cut-off top serves as a lid and is dusted with powdered sugar.”

So this forms the template for the rest of the semlas.

## 2) Sillsemla (herring semla)

Going back to the Swedish tradition: Midsummer. Dancing around poles, having one or two drinks and “enjoying” a large variety of herring and potatoes. Why not do a herring semla? (Well, honestly – why …)

Do a so called Gubbröra, chop your herring, mix with sour cream, onions, spices, and stuff your dough with it. For this, probably the sweet bread does not make sense. Pick a normal roll – don’t use a too heavy bread, but also not too light. It should be lagom, just about right. You could use some darker bread for the purpose. Rye, or so.

Spray with sour cream and top the semla with flaked salt.

## 3) Tacosemla

Another upcomer in Swedish (?) cuisine is the Tex Mex, the tacos, etc. A Mexican or a Texan would probably laugh at our pity trials with minced beef and taco spices, and tortillas, but still – most Fridays, Swedes sit there and stuff them self full with “Mexican” food.

I definitely vote for the tacosemla – it could be an all-time favorite. Fry up some ground meat with Taco/TexMex/what-have-you spices. Don’t make it too soggy, but not too dry either. Then spray guacamole (the mashed avocados) on top and put the lid on. Top it all up with raw onion and/or all-spice. Why not take a bread baked with corn flour? A bit yellow-ish and more resilient.

## 4) Lussesemla

In Sweden we have a tradition of celebrating Lucia, on December 13, i.e., Saint Lucy’s day. Think singing people, walking in procession, white robes, candles, etc. (No, not those guys!). Those days, lussebröd and mulled wine, etc., are also served. Think saffron, raisins, cardemom, exotic (for us) spices and more. A highlight in the beginning of Swedish Winter.

So, use saffron in the dough (will become yellow and smell nice). Then you could take raisins in mulled wine and mix them slightly. Preferably chop the raisins rather than mixing them. Stuff your semla with it. Then top with whipped cream before you put the lid on.

Dust some cinnamon on top.

## 5) Semla Tartare

Ok, so this is for the freaks. Why not go wild and impress your partner with a semla tartare. Inspired by the Steak tartare. Take a slightly more robust bread, chop the lid of, and remove the center. Stuff it with raw, minced meat of nice cut. Let it be a bit bloody, such that the bread can soak it up a bit for those flavours to come out.

Take an egg, separate the yolk from white. Put the yolk on the raw meat and whip the egg white and put on top. Then add the lid with some sprinkled, chopped capers on top.

Don’t leave it out in room temperature for too long. It might crawl away after a while.

## 6) Curry semla

An homage to our Indian students and colleagues. Why not think semla – Indian style? Curry semla, anyone? Take a naan-type of bread and try to make some kind of bun out of it. (Good luck trying to get it to stick to the walls of that special clay oven they use). Don’t burn off all your hair on your arms… Get the bun out, open it, fill it with chicken vindaloo.

On top of that, take some Ghee and whip it up to get some air into it. Put it on top of the chicken mess and then close the lid by eventually powdering some Garam Masala on top.

Enjoy!

## 7) Falu semla

We need to make the children happy too. The Falu semla would consist of the famous Falukorv. Chop it up and mix it with ketchup and possibly some mustard – not too much! Children normally shun mustard. Then think hamburger bread as a substitute for the sweat dough. I would suggest building a small “silo” with a couple of hamburger breads with holes cut out of them. Glue the layers with ketchup.

Stuff it with the Falu thingie. Put mashed potato on top and then the lid with the sesame seeds forming the top layer. I bet you that the children would love to do this.

Delicious!

## 8) Semla Surprise

Save the best for last, and possibly inspired by one of the others above. Here, in Sweden, people tend to – for some odd reason – eat fermented hering. I’m thinking of going all in with the Semla Surprise.

Take the bun, throw the stuff in the middle away, fill it with stinking, rotted, fermented hering. Top it up with sour cream, put the lid on –QUICKLY- and sprinkle chopped chives on the top.

Serve, as fast as possible and get the stuff out of the kitchen ASAP! Enjoy?

But seriously, what’s wrong with these guys (bar that they want to eat crisps with soured hering).

Enjoy!

# Calculating the check sum for the microcontroller ROM

Simple, but yet, I wanted to quickly generate the check sum in my hex file to be loaded into a PIC microcontroller. The file format is Intel Hex and I will not spend any time explaining the details. Read the Wiki page and you will understand.

Essentially, we have a string from the hex file in which we should change a number.

```:0400000080312D28F6 :1000080080318331F0238031200054080A3A0319E3 :10001800571C11288631772680312100931D09004D ... :0C0E2000640080010131890B112F0034A7 :020000040001F9 :04000E00A4C9FFDEA4 :00000001FF```

into e.g.

```:0400000080312D28F6 :1000080080318331F0238031200054080A3A0319E3 :10001800571C11288631772680312100931DX900?? ... :0C0E2000640080010131890B112F0034A7 :020000040001F9 :04000E00A4C9FFDEA4 :00000001FF```

How do we quickly get the check sum out of that. Of course, we can just do the summation on a piece of paper and get the result. There are plenty of C hacks, there are plenty of Python hacks, but in general too much is hidden in the noise floor on the internet. Of course, we can also use the internal hex editor of the compiler tool, and there are some more options available out there.

However, this is my contribution to the noise floor. Here I did a spread sheet (and I have to admit I saved it in XLSX – gasp!) for a potentially wider audience. So download the spread sheet. Copy the string from the emacs buffer (or vi, ththth – read more about the editor war… nerdy, nerdy. ),

Allright, now I will at least find it next time I’m searching for it…

# Rounded corners on background boxes Open-/LibreOffice

I have too little to do (well, actually, I do not at the moment…). Anyways, I am currently writing up a report for my German class in “Realia”, the topic is “Die Mauer”, btw. A very interesting field, how could people create this masterpiece – in terms of engineering, of course – and waste so much money. How could that be a logical decision by Ulbricht, et al.

Well, that wasn’t really the topic of today. Instead I wanted to present a way-too-overdesigned solution to get rounded boxes behind text in OpenOffice, LibreOffice.

See the example below. I want to spice up my text with some random quotes. For example the famous one by former US president, John F Kennedy.

(Notice that ein Berliner is also a doughnut. There was once a funny commercial on the German cinemas with a guy powdering icing sugar on his head and having jam in his mouth, saying “ich bin ein Berliner”. I didn’t find the Youtube clip for that).

Ok, so let’s get wild… Open inkscape or some other vector tool, or drawing tool, what have you. Start creating some corner cells: `{ne, nw, se, sw}.png` that can be used as rounded corners for your background area on which you want to put your text. Also create a figure called `ns.png` with the north and south horizontal bars. Create a figure called `we.png` with the west and east vertical bars. You also need to create a background for the center, called `center.png`.

Let some of the example pictures below explain the story:

And then the others could be something like:

and center block and east-west block.

Notice that the horizontal and vertical bars should be made large enough to cover all possible table heights, e.g., like an A4: 300 mm high, or 300 mm wide. Same with the center box in the background which should be e.g. 300×300.

Eventually, the example would be:

### What did I do?

Well, actually, it is just a 3×3-table that can be centered across the text and it can be used to set up spacing between text and table contents, etc. If you now mark a cell in the table. `Right mousebutton > Table ...`. Select the `Background` tab. Select `As [Graphic]`. Browse for whatever picture you have in mind for the selected table cell. Link to the graphics to be able to change size and color a bit adaptively (or not). The `Type` should be “Position” and dependent on corner you align the picture accordingly. For the NorthWest corner, you should select position in the LowerRight, etc.

### Why is this a good solution?

It is not 😀 It is tedious and a lot of work. One could for example simply had drawn a shape with rounded corners, or used a frame in which I have inserted a rectangle with text. Then right mouse button on the rectangle and select rounded corners…

The advantage though is the way we can treat the text in the normal text flow and have some help by the table options.

But yet, perhaps some inspiration to handle tables in a more elegant (?) way using some nice pictures. Any examples out there, perhaps?

# Silly script: Extracting family waveform data to plot multiple XY plots in Cadence ADE

A colleague of mine recently struggled to plot multiple XY plots using the Cadence ADE simulator.

Assume you have a nonlinear circuit of some kind (see below where we have added some AM modulation, some limiter and a squaring circuitry to form some kind of nonlinearity) and you would like to plot the good old XY plots to investigate e.g. the IV-curves or any other types of hysteresis or so. In the Cadence ADE environment, this can simply be done by going to the (version 6 and above) ` Axis > Y vs Y ...` and select what you have on the Y-axis. Easy-peasy.

The problem however occurs with family plots (from parametric sweeps). The interface to the waveform viewer does not allow you to do a convenient XY plot. In the Y-Y option in the menu you can only select one out of all the waveforms, it is not possible to do it on a element-to-element basis. Selecting one of them brings it into a mess.

Notice that the new min and max X values are the same in both XY plots – even though we change the input amplitude in the parametric sweep.

It can be done in a tedious way: select for each single curve a new X curve and then plot it and drag it to a new window. However, with e.g. 20 curves and beyond this grows to something not that pleasant. Especially, if you have to re-simulate.

“Obviously” a piece of OCEAN script would solve this brilliantly since you would have control over the different loops you do and you would quite easily extract the individual waveforms and plot them in the same window.

If one wants to avoid the scripts the option is to add some simple code snippet in the Virtuoso window. Assume we want to plot the `vOut` (along Y axis) as function of `vIn` (along X axis) for each one of the parametric sweeps. We can try with the following code to extract one of the waveforms:

``` yyy = VT("/vOut") xxx = VT("/vIn") waveNo = 0 xVec = drGetWaveformYVec( drGetElem( drGetWaveformYVec(xxx) waveNo) ) yVec = drGetWaveformYVec( drGetElem( drGetWaveformYVec(yyy) waveNo) ) (setq wave (drCreateEmptyWaveform)) (drPutWaveformXVec wave xVec) (drPutWaveformYVec wave yVec) (plot wave) ```

(With a little bit of copy from some of the brilliant Andrew Beckett’s posts…)

and then it is just to wrap your favourite for/while loop on top of that and change your waveNo accordingly. (Check when ` drGetElem( drGetWaveformYVec(yyy) waveNo) ` evaluates to `nil` to abort the loop). The result becomes something like this:

where we now see the min and max values of the X axes change with input amplitude.

# The caravan, or “What numbers can be covered by 1, 2, 3, 4, 5 and 6?”

So tomorrow is the big day. I’m turning 40 – halfway through the life and towards ending my “career”… From this post, you probably also realize it is vacation times at the moment.

### The Caravan

Some years ago, my children got a birthday caravan. The caravan – sold by Goki – consisting of an elephant, giraffe, rhino, camel, crocodile, zebra, goat, and a bear (?), brings candles, gifts, and … a number. The number delivered to us was 1 to 6. Each time we celebrate the childrens’ birthdays, we bring out the caravan and change the number accordingly.

The Goki Birthday Caravan Train

Since you are so clever readers, you quickly realize that we can only celebrate up to 6 years! Luckily, though, the gifts can be replaced by numbers and we can add a combination of numbers, for example 2 and 6 to celebrate our son’s eighth birthday. Phew! What a luck. (Now, it should be mentioned that Goki sells additional numbers up to 10 which would have saved us a lot of time in this post).

However, can we create the number 40 to celebrate my birthday tomorrow?

Let us start in the other end… with the numbers 1 to 6, we can start with the low hanging fruits. Given that we read them in the familiar way, like 12, 13, 14, etc., we can create the following:

``` 1 -- 21 31 41 51 61 2 12 -- 32 42 52 62 3 13 23 -- 43 53 63 4 14 24 34 -- 54 64 5 15 25 35 45 -- 65 6 16 26 36 46 56 -- ```

which keeps us busy until retirement, approximately.

There are obviously numbers missing in this scheme. So, let us now use the trick-that-made-my-son-happy. Let’s assume we can add two numbers together. Can we fill the gaps?

``` 1+2=3 1+3=4 2+3=5 1+4=5 2+4=6 3+4=7 1+5=6 2+5=7 3+5=8 4+5=9 1+6=7 2+6=8 3+6=9 4+6=10 5+6=11 ```

That helped us out a bit, let’s fill out the table and let’s aim for the 99th birthday this time.

``` 0 10 -- -- -- -- -- -- -- -- 1 11 21 31 41 51 61 -- -- -- 2 12 -- 32 42 52 62 -- -- -- 3 13 23 -- 43 53 63 -- -- -- 4 14 24 34 -- 54 64 -- -- -- 5 15 25 35 45 -- 65 -- -- -- 6 16 26 36 46 56 -- -- -- -- 7 -- -- -- -- -- -- -- -- -- 8 -- -- -- -- -- -- -- -- -- 9 -- -- -- -- -- -- -- -- -- ```

Hmm, better, but obviously, someone is going to be upset when they turn 17, just about to enter adulthood and they cannot see their caravan on the birthday table… th th th! Can we add three numbers? Let’s see!

``` 1+2+3=6 1+2+4=7 2+3+4=9 1+2+5=8 2+3+5=10 3+4+5=12 1+2+6=9 2+3+6=11 3+4+6=13 4+5+6=15 ```

Not much luck there 😦 With four numbers it is easier… we obviously see that we lack the number 17, and if we take `6+5+4+3` it is 18 and thus we should be able to cover both 17 and 18 by adding four numbers. With five numbers we can reach ` 6+5+4+3+2 = 20 `. Six numbers doesn’t add value, since we have 21 already catered for.

``` 0 10 20 -- -- -- -- -- -- -- 1 11 21 31 41 51 61 -- -- -- 2 12 -- 32 42 52 62 -- -- -- 3 13 23 -- 43 53 63 -- -- -- 4 14 24 34 -- 54 64 -- -- -- 5 15 25 35 45 -- 65 -- -- -- 6 16 26 36 46 56 -- -- -- -- 7 17 -- -- -- -- -- -- -- -- 8 18 -- -- -- -- -- -- -- -- 9 19 -- -- -- -- -- -- -- -- ```

Still work to do. First, however, since we now can use the addition, we can for example create 27 as ` 26 + 1 = 27 `. Let’s fill out those too.

``` 0 10 20 -- -- -- -- -- -- -- 1 11 21 31 41 51 61 -- -- -- 2 12 -- 32 42 52 62 -- -- -- 3 13 23 33 43 53 63 -- -- -- 4 14 24 34 44 54 64 -- -- -- 5 15 25 35 45 55 65 -- -- -- 6 16 26 36 46 56 66 -- -- -- 7 17 27 37 47 57 67 -- -- -- 8 18 28 38 48 58 68 -- -- -- 9 19 29 39 49 59 69 -- -- -- ```

Seems like we have no other option than to invoke Mr. Multiplication (remember that we have options to let the different gifts act as multiplication and addition sign!) I know I was “cheating” before as we in fact did multiplication by 10 and addition to obtain 24, 25, etc., … maybe we can come back to that in another post… .

Multiplying all numbers gives us a biblical age of `1 x 2 x 3 x 4 x 5 x 6 = 720`, which normally is a bit excessive, unless you’re an oak or so. Let’s us see what gaps in the table we can fill, just by a crude approach: `22 = 2 x (5 + 6)`, `30 = 3 x (4 + 6)`, `40 = 5 x (6 + 2)`, Yippiieeee! I will get a caravan train tomorrow! , `50 = 5 x (4 + 6)`. Then, since ` 6 x (5+4) < 60`, we have to go wild to reach 60: `60 = 6 x (5 + 3 + 2)`.

Now, all numbers up to 69 are covered – and beyond that, perhaps we do not even want to celebrate…

``` 0 10 20 30 40 50 60 -- -- -- 1 11 21 31 41 51 61 -- -- -- 2 12 22 32 42 52 62 -- -- -- 3 13 23 33 43 53 63 -- -- -- 4 14 24 34 44 54 64 -- -- -- 5 15 25 35 45 55 65 -- -- -- 6 16 26 36 46 56 66 -- -- -- 7 17 27 37 47 57 67 -- -- -- 8 18 28 38 48 58 68 -- -- -- 9 19 29 39 49 59 69 -- -- -- ```

### “Concludingly”

All, right so with some twist we can at least create the numbers from 1 to 69 which will keep us busy a while. However, back to the original question:

Assume we have 1, 2, 3, 4, 5, 6 and “+” and “*” available – what numbers can we create?

and what if we are not allowed to use any parentheses? Etc., etc. A topic for discussion and another post I guess.