TRENDING NEWS

POPULAR NEWS

How Many Positive Integers Less Than 20 Are Equal To The Sum Of A Positive Multiple Of 3 And

How many positive integers less than 20 are equal to the sum of a positive multiple of 3 and 4 ?

3,4,6,8,9,12,15,16,18 are the multiples of 3 or 4

sums in interval [1,19]:
7,9,10,11,12,13,14, 15,16,17,18,19 (twelve sums) (or 14 if we include 3 + 3 and 4 + 4)

if there has to be one multiple of 3 and one multiple of 4, then:
3,6,9,12,15,18 (3x)
4,8,12,16 (4x)
sums: 7,10,11,13,14, 15,16, 17, 18, 19 (ten sums)

There are 500 positive integers less or equal 1,000 that divisible by 2 (1,000 among them), there are 333 positive integers less or equal 1,000 divisible by 3 and there are 142 positive integers less or equal 1,000 divisible by 7. Since 2, 3 and 7 are all prime their respective lcms are their products. 2×3=6, 2×7=14, 3×7=21, 2×3×7=42There are 166 positive integers less or equal 1,000 divisible by 6.There are 71 positive integers less or equal 1,000 divisible by 14.There are 47 positive integers less or equal 1,000 divisible by 21.There are 23 positive integers less or equal 1,000 divisible by 42.So putting all this together we have 500+333+142–166–71–47+23=714 positive integers less or equal 1,000 divisible by 2, 3 or 7 or a combination of them. We can check this calculation:len([i for i in range(1, 1001) if i%2==0 or i%3==0 or i%7==0])==500+333+142–166–71–47+23
1,000–714=286 therefore there are 286 positive integers not divisible by 2, 3 or 7.

[math]3x + 4y = n[/math][math]3(1) + 4(0) = 3[/math] [math]3(0) + 4(1) = 4[/math] [math]3(2) + 4(0) = 6[/math] [math]3(1) + 4(1) = 7[/math] [math]3(0) + 4(2) = 8[/math]Since we can add any multiple of [math]3[/math] to [math]6, 7,[/math] or [math]8,[/math] then any number [math]\ge 8[/math] can also be expressed as the sum of [math]3x + 4y[/math].[math]6 +[/math] some positive multiple of [math]3 = 9, 12, 15, 18, …[/math] [math]7 +[/math] some positive multiple of [math]3 = 10, 13, 16, 19, …[/math] [math]8 +[/math] some positive multiple of [math]3 = 11, 15, 17, 20, …[/math]So all numbers from [math]1[/math] to [math]19[/math], except for [math]1, 2,[/math] and [math]5,[/math] can be expressed as [math]3x + 4y[/math]# positive integers [math]< 20[/math] that can be expressed as [math]3x + 4y = \boxed{\boldsymbol{16}}[/math]

The answer for this can be found by using Euler’s “Totient Function”. We typically denote this function [math] \phi(n) [/math].Let’s look at some quick properties of this function:First recall the notion of what it means to be prime. That is simply put a prime number [math] p [/math] is a number that is divisible by only [math] 1 [/math] and [math] p [/math] (itself).Next let’s quickly recall the notion of “relatively prime” that is [math] gcd(a,b) = 1[/math] for [math] a,b [/math] integers. In other words, the only common divisor they share is [math] 1 [/math] and thus we name these numbers “relatively prime”.Now, let us think about how many numbers are relatively prime to a prime number. Take for example the number [math] 7 [/math]; what’s [math] \phi(7) [/math]?Observe: [math] gcd(7,6) = gcd(7,5) = gcd(7,4) = gcd(7,3) = gcd(7,2) = gcd(7,1) = 1[/math]There are [math] 6 [/math] such numbers that are relatively prime to [math] 7 [/math].Without formal proof, I will say that given any prime [math] p [/math] it should be clear that: [math] \phi(p) = p - 1 [/math]. Every integers less than [math] p [/math] is not a factor of [math] p [/math] by definition and thus the only common divisor is [math] 1 [/math]. So there are [math] p - 1 [/math] such numbers.Now, without going into exorbitant detail we have the notion that [math] \phi(n) [/math] is multiplicative.Essentially this means that if I have something such as [math] \phi(6) [/math] instead of brute force counting to evaluate I can write [math] \phi(2 \cdot 3) = \phi(2) \cdot \phi(3) [/math]. Note that I know how to evaluate [math] \phi [/math] at prime numbers quickly! So,[math] \phi(6) = \phi(2 \cdot 3) = \phi(2) \cdot \phi(3) = 1 \cdot 2 = 2 [/math]Which gives me the amount of numbers less than [math] 6 [/math] that are relatively prime to it.Let’s now apply this to the question at hand:[math] \phi(70) = \phi(7 \cdot 10) = \phi(2 \cdot 5 \cdot 7) = \phi(2) \cdot \phi(5) \cdot \phi(7) = 1 \cdot 4 \cdot 6 = 24 [/math]Although, it took some time to get here; this knowledge yields the most elegant solution.Note: I didn’t go into prime powers here, but you can also use similar principals to find the amount of numbers relatively prime to a non-square free integer.

How many positive integers less than 1,000,000 have the sum of their digits equal to 17?

We are asking about six digit numbers,
and we can use leading zeros since they don't change the sums.

There are 121 unordered partitions of 17 into 6 parts, with no part > 9.
But I don't know the formula for that.
(and an additional 42 beyond that using non-digits).

Then you have all the permutations of each one, which vary according to repeats.

For example:
5,4,2,2,2,2 has 6!/4! = 30 variations (6 places for the 5, followed by 5 for the 4)
but 5,4,3,3,2,0 has 6!/2! = 360 variations.

That's feasible, but would take quite a while to work out all the cases.

But it is an easy, quick computer problem.

For starters, if the sum is 17, then the remainder (mod 9) is 8.
So we are limited right away to just 1/9 of the numbers;
in other words 111111 is an immediate upper bound.

Answer: 21582
Computation time: < 1 second.

Here is a breakdown by first digit:
1 4500
2 3915
3 3330
4 2766
5 2240
6 1765
7 1350
8 1001
9 715

The smallest number is 89, the highest is 980000,
neither of which comes as any surprise.

NOTE:
Your "stars and bars" formula isn't far off: 22c5 = 26334 -
there aren't very many using "digits" of 10 and above.

So there might be a way to start with that, and eliminate
(fairly easily) the ones using 10, 11, ... etc up to 17.

UPDATE:
(follow on to my last point)
I see that after I brought this question to the attention of the Stars and Bars expert (M3), he has shown a simple way to come down from 22c5 to the desired answer.

The answer must be:2 , 4 , 6 , 8 , 10 .Since zero is nuetral number, it is not considered in this list..Neutral - neither positive nor negative

For any positive integer [math]n[/math], let [math]S(n)[/math] denote the sum of digits of [math]n[/math]. Suppose [math]N[/math] is a positive integer such that [math]N=12 \cdot S(N)[/math].If [math]10^{d-1} \le N < 10^d[/math], then [math]N[/math] has exactly [math]d[/math] digits, and so [math]S(N) \le 9d[/math]. Now [math]10^{d-1} \le N=12 \cdot S(N) \le 108d[/math] forces [math]d \le 3[/math]. Since [math]N=S(N)[/math] when [math]d=1 [/math]and [math]N>0,[/math] it follows that [math]d=2[/math] or [math]3[/math].We can write [math]N=100a+10b+c[/math], with [math]a, b, c \in \{0,1,2,\ldots,9\}[/math], with at least one of [math]a[/math], [math]b[/math] non-zero. The condition [math]N=12 \cdot S(N)[/math] reduces to[math]100a+10b+c = 12(a+b+c)[/math].Thus [math]a>0[/math], and further have [math]88a=2b+11c[/math]. Hence [math]11 \mid b[/math], forcing [math]b=0[/math], and further reducing the condition to [math]8a=c[/math]. Since [math]b=0[/math], [math]a>0[/math]; so the only possibility is [math]a=1[/math] and [math]c=8[/math].The only such number [math]N=108[/math]. [math]\blacksquare[/math]

Multiples of [math]20= 15[/math]If we require the multiples of [math]15[/math], out of these numbers, then we are basically asking how many positive integer numbers less or equal to [math]300[/math] are divisible by [math]\mathrm{LCM}(15,20)=60[/math].Multiples of [math]60=5[/math]The required fraction is [math]\dfrac{5}{15}=\dfrac{1}{3}[/math]

Let's use Arithmetic Progression here.• Method 1Formula for summation is pretty simple. It'sSum = n/2 [2a + (n-1) d]> a being the first term> n being number of terms (no. of multiples of 3)> d being common differenceHere, a and d are already known. n is missing. So let's calulate n.[math]nth[/math] term = a + (n-1) dHere, [math]nth[/math] is 48 that is last multiple of 3 before 50.48 = 3 + (n-1)3(45/3) + 1 = n16 = nNow that we have n, we can find the sum.Sum = 16/2 [2(3) + (16–1)3]Sum = 8 [6+45]Sum = 8 [51]Sum = 408• Method 2Sum = n/2 (first term + last term)Sum = 8 (3+48)Sum = 8 × 51Sum = 408Hope that helps.

TRENDING NEWS