Problem

Source: CHKMO

Tags: number theory



Let k be a positive integer. Find the number of non-negative integers n less than or equal to $10^k$ satisfying the following conditions: (i) n is divisible by 3; (ii) Each decimal digit of n is one of the digits 2,0,1 or 7.