mscroggs.co.uk
mscroggs.co.uk

subscribe

Comment

Comments

Comments in green were written by me. Comments in blue were not written by me.
Another great puzzle calendar, thanks!
I eventually coded Day 21 and while I can certainly see how it could be broken down into a very large number of cases for the purposes of calculation, I am wondering if there is an elegant approach to this one?
Blake
on /blog/120
               
@Blake: It's actually not that many different parts. I did it in a spreadsheet, and there were 30 things to calculate. But once I figured out how they should be organized and calculated, each one was very quick.
(anonymous)
on /blog/120
               
@(anonymous): It’s certainly do-able, but whereas I was able to find a single simple summation formula for the day that asked for no odd consecutive amounts, this one has eluded me so just wondering if an elegant approach does exist
Blake
on /blog/120
               
@Blake: there is an elegant solution but it is very different from day 14. If a small hint is allowed:

recurrence relations!
Aisha
on /blog/120
               
@Aisha: Thanks! I did think of that originally but even going back now I can’t seem to find a neat way to apply that approach (and even the OEIS doesn’t seem to give one for the sequence I get solving this for smaller cases). Would be interested to know how you went about this! As it happens, with a bit more thought I did end up finding a single (double-summation) formula that could be used to calculate this
Blake
on /blog/120
               
@Aisha: Hm, I used exactly the same method for both of these days. I'm not sure if it lends itself to a nice clean formula, but it might! I'll share my approach after the contest is over!
Seth Cohen
on /blog/120
               

Archive

Show me a random blog post
 2026 

Feb 2026

Christmas (2025) is over
 2025 
▼ show ▼
 2024 
▼ show ▼
 2023 
▼ show ▼
 2022 
▼ show ▼
 2021 
▼ show ▼
 2020 
▼ show ▼
 2019 
▼ show ▼
 2018 
▼ show ▼
 2017 
▼ show ▼
 2016 
▼ show ▼
 2015 
▼ show ▼
 2014 
▼ show ▼
 2013 
▼ show ▼
 2012 
▼ show ▼

Tags

christmas card national lottery binary braiding cambridge sound bempp hats news fractals fonts pac-man reuleaux polygons graph theory martin gardner computational complexity stirling numbers sobolev spaces gather town chess sport rhombicuboctahedron weather station cross stitch crossnumbers folding paper databet bodmas european cup menace error bars youtube mathsjam palindromes oeis thirteen finite group big internet math-off stickers statistics raspberry pi radio 4 inline code triangles football the aperiodical kings harriss spiral craft finite element method simultaneous equations books inverse matrices correlation squares friendly squares ucl captain scarlet warwick javascript mean noughts and crosses python folding tube maps games logic london plastic ratio signorini conditions video games light dragon curves crossnumber logs datasaurus dozen anscombe's quartet wave scattering royal baby pizza cutting 24 hour maths graphs nonograms mathslogicbot manchester advent calendar hyperbolic surfaces dinosaurs map projections newcastle speed asteroids turtles coins tmip flexagons game show probability matrices zines live stream estimation kenilworth errors probability runge's phenomenon numerical analysis go wool electromagnetic field london underground reddit countdown tennis matrix multiplication fence posts mathsteroids trigonometry curvature gaussian elimination latex a gamut of games pi approximation day golden ratio regular expressions golden spiral interpolation coventry bubble bobble people maths world cup edinburgh rugby determinants numbers preconditioning partridge puzzle matrix of minors guest posts geogebra crosswords sorting draughts convergence hexapawn manchester science festival programming pi final fantasy approximation matt parker realhats machine learning ternary gerry anderson accuracy nine men's morris quadrilaterals matrix of cofactors exponential growth polynomials platonic solids boundary element methods misleading statistics standard deviation php frobel hannah fry pascal's triangle talking maths in public bots weak imposition logo arithmetic game of life data chalkdust magazine data visualisation dates propositional calculus crochet chebyshev christmas rust dataset geometry recursion alphabets royal institution pythagoras puzzles phd

Archive

Show me a random blog post
▼ show ▼
© Matthew Scroggs 2012–2026