{"id":246,"date":"2006-04-21T20:21:14","date_gmt":"2006-04-21T19:21:14","guid":{"rendered":"http:\/\/www.sungate.co.uk\/?p=246"},"modified":"2006-04-23T16:16:37","modified_gmt":"2006-04-23T15:16:37","slug":"a-mathematical-teaser","status":"publish","type":"post","link":"https:\/\/www.sungate.co.uk\/?p=246","title":{"rendered":"A Mathematical Teaser"},"content":{"rendered":"<p>A while ago I wondered about putting up the occasional brainteaser or puzzle on this site, and this is the first one.  Depending on how it goes down, it may also be the last.  You Be The Judge.<\/p>\n<p>First, let&#8217;s define a &#8220;self-representing number&#8221;.  The easiest way is by example: 1210 is a four-digit self-representing number, because there are <\/p>\n<ul>\n<li>1 zeroes;<\/li>\n<li>2 ones;<\/li>\n<li>1 two;<\/li>\n<li>0 threes.<\/li>\n<\/ul>\n<p>i.e. digits in the number represent the number of times each digit appears in the whole number, with the first digit representing the number of 0s, the second digit representing the number of 1s and so on.<\/p>\n<p>The puzzle is as follows: <strong>can you find the only valid 10-digit self-representing number?<\/strong>  As before, the first digit will represent the number of 0s in the whole 10-digit number, the second digit will represent the number of 1s in the whole 10-digit number and so on, with the final digit representing the number of 9s.<\/p>\n<p>Is that clear now?<\/p>\n<p>Go on, then: go work it out!  If you&#8217;re trying to work it out, bear in mind that you may find &#8216;spoilers&#8217; in the comments for this post&#8230;  If you leave a comment with your answer, please indicate how you worked it out.  <strong>Edit Sunday 23 April: there <em>are<\/em> now spoilers in the comments, so avoid reading them if you want to work it out for yourself.  Might also be a good idea to avoid reading #lugradio too, since that&#8217;s where most of the current solutions have been discussed!<\/strong><\/p>\n<p>When I first found this puzzle a couple of years ago, I wrote a short bit of C code to brute-force a solution: basically to try all 10-digit numbers and see whether they met the criteria of a self-representing number: took a couple of hours, I think!  I should say that this is almost certainly <em>not<\/em> the best way to solve this puzzle \ud83d\ude09<\/p>\n<p>Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while ago I wondered about putting up the occasional brainteaser or puzzle on this site, and this is the first one. Depending on how it goes down, it may also be the last. You Be The Judge. First, let&#8217;s define a &#8220;self-representing number&#8221;. The easiest way is by example: 1210 is a four-digit self-representing&#8230;&nbsp;(<a href=\"https:\/\/www.sungate.co.uk\/?p=246\">read more<\/a>)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=246"}],"version-history":[{"count":0,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/246\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sungate.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}