mscroggs.co.uk
mscroggs.co.uk

subscribe

Comment

Comments

Comments in green were written by me. Comments in blue were not written by me.
@selina
Good instinct to start with smaller variants of the problem and working your way up.

You've chosen a perhaps confusing way of directly tackling the big length=14 problem, by partitioning it as "how big is the set of 14-digit numbers with exactly that many 2s".

Note that you can start smaller and simpler, by just considering shorter-length numbers first.

As you work the shorter examples, you may see a pattern in construction, or a pattern in the numbers. Either intuition will help you.
Dr Matrix
on /blog/97
×2   ×1   ×1   ×1   ×1   

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

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

Archive

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