On the N Days Of Christmas, part 8

January 12, 2025

My last post ended with the strong hint that I may not have been finished with this topic.

In part 4, triangular numbers were used as a first simplification to computing the total number of gifts for the 12 days of Christmas by eliminating some additions.

It turns out that the polynomial from part 5 is the equation for the class of tetrahedral numbers.

I wanted to determine the optimal solution from first principles and experimentation. The triangular numbers link was found through serendipity (listening to an unrelated podcast). I learned about tetrahedral numbers through further reading after finishing part 7.

In a Wikipedia article about the 12 days of Christmas song, Donald Knuth’s analysis of computational complexity is mentioned and then as an afterthought:

Incidentally, it is also observed that the total number of gifts after m days equals m3 / 6 + m2 / 2 + m / 3.

which is the polynomial we saw from part 5.

One thing led to another and I came across another Wikipedia page about tetrahedral numbers that are computed with this function. The name of the class of numbers arises from the fact that such numbers can be modelled by stacking spherical balls into a tetrahedron, as illustrated with this nice 3D graphic:

The number of balls in each layer is a triangular number. The number of balls in the tetrahedron is the nth tetrahedral number, and also the number of gifts for the nth day of Christmas.

gifts-for-day-of-xmasn = 1 ball in layer1 + 3 balls in layer2 + 6 balls in layer3 + … + n(n+1)/2 balls in layern

There is also a relationship to the problem of finding the optimal way to stack canon balls worked on by Johannes Kepler (one of my heroes, who realised that planetary orbits are elliptical, not circular), but that’s a different post.

Here are some other interesting things I found along the way:

  • The year that most of the thought went into my posts was 2024, which turns out to be the 22nd tetrahedral number.
  • Ian Phillipps won an Obfuscated C competition in 1988 with a C program that generates the text of the 12 days of Christmas song. The code was described by the judges as “…like what you would get by pounding on the keys of an old typewriter at random”, and as the same Wikipedia article goes on to say: “…takes advantage of the recursive structure of the song to print its lyrics with code that is shorter than the lyrics themselves.”
  • There’s a proof by induction for the tetrahedral numbers for all n that uses the equation for triangular numbers in the inductive step. This deserves further discussion, and perhaps I will return to this from another viewpoint in future.
  • The nth tetrahedral number is represented by the 3rd rising factorial of n divided by the factorial of 3. This yields a slightly more compact equation than the polynomial, but is just another way of expressing it, so is no better computationally. The equality-related expressions below partially recapitulate the explorations throughout this series of posts, with the rising factorial form at right (source: Wikipedia).
  • The 4th diagonal of Pascal’s triangle (built from binomial coefficients) contains the tetrahedral numbers (from left or right). The triangular numbers are in the 3rd diagonal, and the counting numbers are in the 2nd diagonal.

source: https://sahilmohnani.wordpress.com/2013/02/23/pascals-triangle-cubic-quartic-and-sextic-numbers/

It seems that the avenues down which one could stroll in relation to this topic are never-ending.

I can’t promise not to ever return to it, but it’s time to move on I think, at least for now.

Photometry of SX Phoenicis

October 4, 2024

I recently carried out photometry of the short period pulsating variable star SX Phoenicis.

This star has a very short period of 79 minutes over which it ranges between around magnitude 6.8 and 7.5! Contrast this with a Cepheid variable whose period is measured in many days or weeks and Miras with pulsation periods of many months.

The light curve above was derived from photometry of more than 400 images, using median stacking to group images close in time in order to reduce the scatter between datapoints. Almost two cycles were captured here. There are not many observations of SX Phoenicis in the AAVSO International Database, so I will very likely contribute more.

SX Phoenicis is the prototype (the first example) of a class of variable stars which has two pulsation modes, one with a period of around 79 minutes (as shown in my light curve above), the other around 62 minutes. The temperature of the star varies between 7,230 and 8,170 degrees Kelvin at minimum and maximum brightness, smallest and largest radius, respectively.

The origin of this kind of star is unclear but one possibility is that it comes from the merger of two stars, creating a single star that is more luminous and more blue than expected of the older galactic halo population in which it resides, a so-called blue straggler.

The Eagle Nebula

October 4, 2024

I recently took an image of the Eagle Nebula (Messier 16) in the constellation Serpens with my Seestar. This object is around 6000 light years distant from us.

M 16: The Eagle Nebula (20 minute exposure, f/5)

The nebula takes its name from imagined outstretched wings. I agree with Karen that a small dark region near the centre of the nebula also bears an eagle-like (possibly even moreso) semblance.

M 16 (region imaged by Hubble and James Webb Space Telescopes)

The Hubble Space Telescope (HST) imaged this region in 1995 with the result dubbed The Pillars of Creation (credit: NASA):

The tips of the finger-like structures glow with stars forming within. The arrowed region in my image is rotated 180 degrees from HST’s.

The James Webb Space Telescope has taken even more impressive images of The Pillars, such as this one:

Stop native extinction. Sure. But at what cost?

September 29, 2024

n30_w1150
n30_w1150 by BioDivLibrary is licensed under CC-PDM 1.0

A recent (23 September 2024) ABC 7:30 Report story, Back from Extinction, gave an interesting account of the Wild Deserts program that is aiming to reverse the trend toward native animal extinction in Australia. Fair enough. We don’t have a great record.

Bilbies, bandicoots, bettongs and quolls, once thought extinct in New South Wales for over a hundred years, are reclaiming parts of an outback NSW desert. (source: ABC 7:30 Report)

This seems to be a positive thing for the species and the ecosystem in which they once thrived.

About 6 minutes into the 7 minute clip, the discussion turns to controlling the causes of extinction, including feral animals, in particular cats. The method of control discussed in the program is a device that attracts a cat into a confined area such that a dose of 1080 poison is applied to its fur, which it then licks, ingests, so is poisoned and dies.

Sometimes, 1080 finds its way near locations in which pets live.

People described the death of their “loved one” from 1080 baiting as one of the most horrific experiences of their lives. Symptoms of 1080 poisoning included … vomiting, defecating, urinating, frenzied running … “screaming”, convulsions, confusion, fear, coma and finally, death. The Conversation

So, the suffering of a non-native animal doesn’t matter? Just collateral damage?

Of course the native species has to fight for survival in the ecosystem into which they’re introduced, but at least they have a fighting chance to live as opposed to being murdered for being the wrong species, in the wrong place (Australia), at the wrong time.

But, are they being reintroduced to “rebalance” or “re-engineer” the ecosystem or from which they were removed by us, or for their own “right” to live? Or both?

There is an idea, often unspoken, that native species have more value than non-native. Cats, dogs, livestock etc are not native to Australia. Neither are humans. Livestock are not native, but they are favoured by farmers over dingoes which have been here for thousands of years.

Being cute and cuddly shouldn’t be an important factor either but you would be forgiven for thinking so sometimes.

To be honest, I’m left with the feeling that both native and non-native feral species are often seen as a means to an end. That’s obviously true in the case of livestock.

As it turns out, I do not think that cats (for example) should be allowed to roam unsupervised in backyards or elsewhere, where that would result in harm to native animals whose species is in threat of extinction. Limiting freedom in this case seems to be a necessity, but that doesn’t mean it’s fair, and it doesn’t mean the pet should suffer.

It would seem that animals can go from being considered as a pet to a pest, depending upon location and negative impact in their environment, e.g. cat-as-pet vs cat-in-backyard-eating-birds or cat-as-feral. I’ve written elsewhere about another mammal that’s mostly considered a pest but that like most of us, is just trying to get on with its life.

Of course, all animals can be viewed as pests from the right point of view, all carry disease, all can do damage to ecosystems. Not to downplay the importance of the work being done by researchers in the Wild Deserts program, but it’s just interesting, and at times disturbing, to see the various ways in which we think we “know best”.

Finding Pluto with a Seestar

September 20, 2024

I’ve had a Seestar S50 since mid-August 2024. The S50 is a small refracting (f/5 apochromatic triplet) telescope with a focal length of 250mm, an aperture of 50mm, and a ZWO-based imaging system that can be controlled with an iOS or Android app.

Images can be taken, enhanced and accessed via the app but the FITS (Flexible Image Transport System, commonly used in astronomy) files can also be downloaded via USB cable for further processing on a computer. This includes photometry, to determine the brightness of targets such as variable stars or asteroids.

So far I’ve taken images of the Triffid nebula, planetary nebulae such as the Dumbbell and Helix nebulae, globular star clusters, the yet-to-erupt recurrent nova T Corona Borealis, a nova in Scorpius (V1725 Sco), a short period (79 minutes) pulsating variable (SX Phe), Luna during the daytime (just because), the Sun, and Pluto from my suburban backyard in South Australia.

I wanted to take two images a few days apart to show Pluto’s movement against the background stars. These images were taken on September 3 and 7:

Note that the images are “decorated” by information and cross hairs because this is a view of the field from the software Tycho Tracker that I use (primarily for variable star photometry).

Here is an animated GIF created from these two images to make the change in location of Pluto on the two dates more obvious. Focus your attention just to the upper right and lower left not far from the centre of the image.

Here are some undecorated images with arrows pointing at Pluto, on Sep 3 and Sep 7 (around 20 minutes of total exposure each, via multiple stacked 10 second exposures):

Pluto takes 248 years to orbit around the Sun at an average distance of almost 6 billion km.

How far did Pluto travel along its orbit between September 3 and 7?

At an average speed of 17,096 km/hour, over the 3.96 days between the images I took, Pluto travelled approximately 1,625,000 km. We could arrive at a better result with some trigonometry.

I also measured Pluto’s magnitude on September 7 at 14.64 +/- 0.05, very close to the catalogue value:

The image comparator below provides another way to reveal the location of Pluto on September 3 (upper right of red cross hairs) and September 7 (lower left of cross hairs), by moving the vertical line left or right.

Pluto on September 3 (upper right of cross hairs) and 7 (lower left of cross hairs)

Below are SkySafari Pro screenshots for comparison in case you want to check Pluto’s position for yourself on the dates and times in question.

Finally, compare the images from the S50 to those Clyde Tombaugh had to work with in 1930 when he discovered Pluto using a mechanical blink comparator!

Being able to see the movement of Pluto is something I’ve wanted to do for myself since Martin George showed me Pluto through the eyepiece of a 14 inch aperture reflecting telescope in Tasmania about 30 years ago.

Another talk about T CrB

September 14, 2024

I gave another talk about T CrB earlier this month and hoped I would be speaking post eruption by then.

We’re still waiting, and we’re about to lose it in the early evening sky.

I’ve been checking the area with binoculars most clear nights and doing some photometry with my Seestar S50.

Even if we miss the main event, we have another shot at seeing the nova rise about 100 days post-eruption.

V1725 Sco: π in the sky?

September 14, 2024

V1725 Sco

In September 2024, a nova was independently discovered in Scorpius by Koichi Itagaki (Japan) and Andrew Pearce (Western Australia). Its designation is V1725 Sco.

I like to think of the lovely asterism (arbitrary star grouping) in which the nova appears (arrowed above) as:

\; \pi \; in \; the \; sky

The visual band light curve below shows the nova’s (partial) rise to around magnitude 9.5 in early September to around magnitude 13 almost a month later.

I made (and submitted to AAVSO) 6 observations of the nova with my Seestar.

The differential photometry aperture rings (red bullseye) are centred on the nova and the green highlighted stars are reference stars. Note the deliberate defocus, so that the light of the stars is spread across multiple sensor pixels, as is common for “one-shot colour” sensors such as the S50, DSLRs and others. My tests so far suggest this may be less necessary than for the DSLR photometry I’ve done in the past, possibly because of the differences between sensor sizes and the number of arc seconds per pixel.

One of the things I love about doing variable star photometry is the endless variation in the star fields being imaged, and the endlessly varying asterisms I see and can imagine about.

On the N Days Of Christmas, part 7

July 28, 2024

What a long, strange trip it’s been.

(Grateful Dead)

In this final post, I explore a curious (at least from my perspective), yet tenuous, relationship between triangular numbers and the polynomial model, from parts 4 and 5 respectively, via a brief detour through Calculus.

As a reminder, the function to compute the Nth triangular number from part 4 is shown below along with the sum of the applications of this function to the values (day number) 1 to 12:

The function to compute the number of gifts for the Nth day of Christmas from part 5 is:

and as we saw in the last post, applying this function to 12 also gives 364:

If we take the indefinite integral of the triangular numbers function, the result is as follows:

The first term of the resulting integral is the same as the polynomial.

The coefficients of the second terms differ (one half vs one quarter) between the polynomial model and the integral of the triangular numbers formula.

Ignoring the constant of integration, C (see below), this gives:

which is 40 short of what all our methods give for the number of gifts for the 12 days of Christmas. Since we are interested in the range of days from 1 to 12, the result of applying this formula to 1 should be subtracted, giving f(12) – f(1) = 324 – 0.41666 = 323.58333.

A more intuitive way to understand and compute the integral of this function is via a numerical method called the Riemann Sum, in which rectangles are used to approximate the area under the curve (which is what the integral means here):

As the number of rectangles increases and their width decreases, the Riemann Sum result becomes closer to the Actual Sum. Making a = 0 instead adds nothing since f(0) here gives 0.

Geogebra was used to create the Riemann Sum graphic above in which the actual area computed by the so-called definite integral is also shown. The definite integral, F, for the 12 days of Christmas does allow us to ignore C, owing to the fact that subtracting the application F to 1 from the application of F to 12 cancels C out :

As you can see, this result is the same as the Actual Area shown in the Geogebra graphic above.

So, my intuition that integrating the triangular numbers equation would give the same result as the days-of-xmas equation, and the polynomial equation in particular, turned out to be wrong. But, there’s a simple reason for that. The derivative (opposite of the integral) of the polynomial equation is not the triangular numbers equation! It is this instead:

If we apply the Riemann Sum to this, we should get the expected result:

Note that the final term (one third) does make a contribution here since f(0) is non-zero.

So ends the long strange trip down the rabbit hole this series has taken me on.

Or does it?

I’ve spent far too much time thinking about this, but it’s been a lot of fun!

Or have I?

Definitely mathematics of the recreational kind anyway!

Health issues in 2024

July 20, 2024

red white and yellow medication pills
Photo by Anna Shvets on Pexels.com

This year honestly hasn’t been the best for me health-wise. The up side was that I had to change GPs (the old one retired) and I found a good one.

Not long after 2024 started, an upper respiratory infection turned into bronchitis, and I ended up on a few rounds of antibiotics, ventolin, and steroids. Lucky it wasn’t worse.

That was followed by sinusitis and eustaschian tube dysfunction making me very cautious about flying, even taking a day long interstate train trip once instead. The last time I flew I used pressure change regulating earplugs. I still can’t clear my ears properly.

A couple of months ago I tripped on uneven paving and fell while walking to the bus interchange, a 12 minute walk from our house on a dark, wet night. I was holding an umbrella at the time and the handle impacted my ribs as I hit the ground. A fair amount of pain and anti-inflammatories for that. That’s mostly better and I’m lucky it didn’t do more damage (close to liver, my GP said).

A few weeks ago a crown-with-post fell out while I was eating. It had last been re-cemented 25 years ago, first having been implanted several years before, after root canal therapy. It could not be re-cemented this time because what was left of the root had cracked. So now I need to get the root remnant removed and an implant put in. That is not likely to be either fun or cheap.

A little over a week ago I had liquid nitrogen applied to my scalp to freeze off a seborrheic keratosis as I have had done many times in the past, then a few days later, “minor surgery” to cut out another one. The last time (different doctor, a dermatologist) I had this done, the after-care was straightforward (and explained) and the scarring was minimal.

I’m really not concerned about the biopsy result at this point, but based upon what I saw after changing the dressing a couple of days ago, I have very real concerns about how long it will take to heal, how well it will do so, and what the guy who did it (same clinic as my GP — recommended by him, so thought I’d “give him a try”) says he wants to do next.

I’m just melancholy due to being reminded of my mortality too much already this year. Even though I try to pay attention to health, problems arise when you least expect them.

It’s self-indulgent, but right now, I’m starting to feel that the future is closing in on me a bit.

But then, it helps somewhat to compare one’s situation to people in war zones like Ukraine, Gaza and Rafah, or to anyone with a life-threatening illness or injury, or to those we care about who “left the party” too soon.

EDIT: As it turns out, I should have been more concerned about my biopsy report. It was squamous cell carcinoma. My doctor appears to have removed it all according to the report. The wound has started to heal much better in the last 3 days as well. I am thankful and relieved, and I should express that more clearly to the doctor who noticed the somewhat unremarkable skin lesion and carried out the minor surgery, despite my skepticism about healing. In the end, I’m glad I “gave him a try”.

Getting to know the sky around the Blaze Star (T CrB)

June 17, 2024

Here’s a Sky Safari screenshot of the region around the not-yet-visible-to-the-unaided-eye T CrB (aka The Blaze Star, bottom right):

at 10:34pm Adelaide (ACST) time on Sunday June 16. To disambiguate, Alphecca is the bright star (magnitude 2.2) to the lower left of that name, as is the case for Arcturus and Izar (which each appear in a less crowded part of the field).

Here’s a cropped iPhone picture of that region at the same time, above the roof of my house, showing Arcturus, Izar, Alphecca and the location where the Blaze Star (T CrB) will appear, as bright as Alphecca:

I showed an AAVSO finder chart in a previous post. This is the one I’m using for comparison stars down to magnitude 8, with T CrB in the cross-hairs at centre, and getting very familiar with through 7×50 binoculars from my backyard:

Here, Alphecca is the star marked “22” (magnitude 2.2) to the left of the cross-hairs, with Arcturus and Izar out of the field to the left. The 37 and 28 comparison stars are also visible in my iPhone image at right near the centre line.

I was having a conversation recently in which someone made the claim that “star hopping” (visually hopping between stars, with a star chart as your guide, to find a target object) is dead in the age of computerised telescopes. With visual variable star observing using binoculars, this is not the case. You have to get to know the field for every new variable star you want to estimate the brightness of. With DSLR photometry, before I added plate solving to my partially manual processing method, that remained true. Even now, especially when using a simple tripod, I still need to locate the right field.

In my suburban sky, at the low altitude of CrB, with 7×50 binoculars, I can see down to magnitude 7.1, so the reference (comparison) star just to the upper right of the cross-hairs.

In any case, if you want to be prepared for the T CrB eruption, get to know the field and the reference stars you can use to assist in an estimation.