# Six digit numbers that are divisible by 3

A question I encountered recently :

A six digit number divisible by $3$ is to be formed using the digits $0,1,2,3,4$ and $5$ without repetition. How many number of ways can this be done ?

If it asked for numbers divisible by $2$, I know how to proceed -- the last digit could be $0, 2$ or $4$. But I have no idea how to do this problem.

Hint: A number is divisible by $3$ if the sum of the digits is divisible by $3$.

• So, I've to choose the numbers only ? – H G Sur Nov 26 '15 at 11:50
• yep! All the permutation of the 6 digits give you a number divisible by $6$. But remember $0$ cannot be the first digit. – Jack Frost Nov 26 '15 at 11:51
• Thank you! Now I've got it :) – H G Sur Nov 26 '15 at 11:54

Is it $6! -5! = 600$?
$1+2+3+4+5+0 = 15$ (Divisibility rule of 3)
There are $6!$ permutations for the $6$ digit places given that no repetitions are allowed. And then since $0$ could not be on the hundred thousands place, you must exclude it from the rest.
The permutations to be excluded can be determined by dividing $6!$ by $6$ or simply $5!$.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9267522,"math_prob":0.9994784,"size":336,"snap":"2021-31-2021-39","text_gpt3_token_len":92,"char_repetition_ratio":0.11746988,"word_repetition_ratio":0.0,"special_character_ratio":0.3065476,"punctuation_ratio":0.1375,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99947864,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-07-31T13:06:39Z\",\"WARC-Record-ID\":\"<urn:uuid:14a80a46-b850-4615-ad8a-31260497439f>\",\"Content-Length\":\"178137\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:339cbe6f-999a-4027-9719-bbb4f50d5448>\",\"WARC-Concurrent-To\":\"<urn:uuid:bcce7bcf-22cd-4884-b317-2cd7739d223e>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/1547179/six-digit-numbers-that-are-divisible-by-3/1547182\",\"WARC-Payload-Digest\":\"sha1:KHLDIJWI4TOYUXCKB33NPWNJXX23KBK3\",\"WARC-Block-Digest\":\"sha1:62IZMADIJFBCGI6X7E2MGCYRALLG3653\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046154089.6_warc_CC-MAIN-20210731105716-20210731135716-00519.warc.gz\"}"}