Partitioning the Digit

Probability Level pending

Hey guys! I'm back from a long hiatus from Brilliant. Here's a problem for you all:

How many four-digit integers are there for which the thousands digit equals the sum of the other three digits?


The answer is 219.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Just brute force computer work: Length [ Table [ With [ { l = IntegerDigits [ n ] } , If [ l [ [ 1 ] ] = Plus@@Drop [ l , 1 ] , n , Nothing ] ] , { n , 1000 , 9999 } ] ] 219 \text{Length}[\text{Table}[\text{With}[\{l=\text{IntegerDigits}[n]\},\text{If}[l[[1]]=\text{Plus}\text{@@}\text{Drop}[l,1],n,\text{Nothing}]],\{n,1000,9999\}]] \Rightarrow 219

{1001,1010,1100,2002,2011,2020,2101,2110,2200,3003,3012,3021,3030,3102,3111,3120,3201,3210,3300,4004,4013,4022,4031,4040,4103, 4112,4121,4130,4202,4211,4220,4301,4310,4400,5005,5014,5023,5032,5041,5050,5104,5113,5122,5131,5140,5203,5212,5221,5230,5302, 5311,5320,5401,5410,5500,6006,6015,6024,6033,6042,6051,6060,6105,6114,6123,6132,6141,6150,6204,6213,6222,6231,6240,6303,6312, 6321,6330,6402,6411,6420,6501,6510,6600,7007,7016,7025,7034,7043,7052,7061,7070,7106,7115,7124,7133,7142,7151,7160,7205,7214, 7223,7232,7241,7250,7304,7313,7322,7331,7340,7403,7412,7421,7430,7502,7511,7520,7601,7610,7700,8008,8017,8026,8035,8044,8053, 8062,8071,8080,8107,8116,8125,8134,8143,8152,8161,8170,8206,8215,8224,8233,8242,8251,8260,8305,8314,8323,8332,8341,8350,8404, 8413,8422,8431,8440,8503,8512,8521,8530,8602,8611,8620,8701,8710,8800,9009,9018,9027,9036,9045,9054,9063,9072,9081,9090,9108, 9117,9126,9135,9144,9153,9162,9171,9180,9207,9216,9225,9234,9243,9252,9261,9270,9306,9315,9324,9333,9342,9351,9360,9405,9414, \9423,9432,9441,9450,9504,9513,9522,9531,9540,9603,9612,9621,9630,9702,9711,9720,9801,9810,9900}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...