1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nookie1986 [14]
3 years ago
7

A twin primes is a pair of prime numbers such that the difference between them is 2. For example, 5 and 7 are twin primes, and 1

7 and 19 is another pair of twin primes. Write a program that finds all the twin primes between 10 and 500, save the results in a two-column matrix, and output result nicely formatted. You can use the built-in function, isprime().
Mathematics
1 answer:
Nikitich [7]3 years ago
7 0

Answer:         There is 22 possible combinations.

Step-by-step explanation:

%a is equal or greater then 11 and it is odd

count=0;

P=[];

for a=11:2:499

   b=a+2;

   %assume a and b are prime;

   prime=1;

   %check if a and b are prime

   for k=2:ceil(sqrt(b))

       %if a OR b is divisible by k, break

       %it is not prime

       if mod(a, k)==0 | mod(b, k)==0

           prime=0;

           break;

       end

   end

   if prime

       count=count+1;

       P(count, :)=[a b];

   end

end

fprintf('There is %d possible combinations.\n', count)

display(P)

There is 22 possible combinations.

P =

   11    13

   17    19

   29    31

   41    43

   59    61

   71    73

  101   103

  107   109

  137   139

  149   151

  179   181

  191   193

  197   199

  227   229

  239   241

  269   271

  281   283

  311   313

  347   349

  419   421

  431   433

  461   463

You might be interested in
The probability density function of the time it takes a hematology cell counter to complete a test on a blood sample is f(x)=0.0
uysha [10]

Answer:

a) 20%

b) 40%

c) Mean = 62.5 seconds; Variance = 52.083 seconds

Step-by-step explanation:

The time it takes a hematology cell counter to complete a test on a blood sample is continuously distributed over the period of 50 to 75 seconds with probability f(x) = 0.04.

a) The percentage of tests require more than 70 seconds is:

P(X>70) = 1- \frac{70-50}{75-50} \\P(X>70) =0.2 = 20\%

b)The percentage of tests that require less than one minute (60 seconds) is:

P(X70) =0.4 = 40\%

c) The mean and variance of a continuous distribution are determined by:

M=\frac{A+B}{2}=\frac{50+75}{2}\\ M= 62.5\ seconds\\\\V=\frac{(B-A)^2}{12}=\frac{(75-50)^2}{12}\\  V= 52.083\ seconds

Mean = 62.5 seconds.

Variance = 52.083 seconds.

3 0
3 years ago
Which of the following is equivalent to 7-2(x+2) < 4-3(1 - x)?
iren [92.7K]

Answer:

-x<-16

Step-by-step explanation:

4-3(1-x)

x=-1

7-2(x+2)

x=2

5 0
3 years ago
Josh is hiking Glacier National Park. He has now hiked a total of 17 \text{ km}17 km17, start text, space, k, m, end text and is
EastWind [94]

Answer:

The equation to determine the total length in kilometers is  \frac{h}{2} =(17+2)

The total length in kilometers of Josh’s hike is  38 km.

Step-by-step explanation:

Given:

Let the total length in kilometers of Josh’s hike be h.

Now Given that He has now hiked a total of 17 km and is 2 km short of being 1/2 of the way done with his hike.

It means that to reach half of the length of total length Josh needs 2 more km to add in his hiking which is done which is of 17 km.

Framing the above sentence in equation form we get;

\frac{h}{2}=(17+2)

Hence, The equation to determine the total length in kilometers is  \frac{h}{2} =(17+2)

Now Solving the above equation we get;

First we will multiply 2 on both side using Multiplication property we get;

2\times \frac{h}{2}= 2\times(17+2)\\\\h =2\times 19 =38 \ km

Hence,  The total length in kilometers of Josh’s hike is  38 km.

4 0
3 years ago
Read 2 more answers
you want to predict which movie will be the most popular among the students at your school next weekend. To do so, you ask a sam
Komok [63]
Because if you ask one student from each class you are getting a more accurate representation of the classes. If you were to ask one group you'd only get their opinion
6 0
3 years ago
Plz help I'm and dead confused​
boyakko [2]
<h3>Answer: Choice D</h3>

Domain: {-3, -1, 2, 4, 6}  

Range: {-2, 1, 2, 4, 6}

===========================================

Explanation:

The domain is the set of possible x values of a relation or function. To form the domain, we just list out the x coordinates of each point

Point A is located at (-3, 4) so the x coordinate x = -3 is part of the domain

Point B is at (-1,1) meaning x = -1 is also part of the domain

And so on. Doing this for all five points leads to the list of x coordinates {-3,-1,2,4,6} which is the domain.

--------------------

The range is a similar story, but we look at the y coordinates now. Point A has y coordinate 4, so y = 4 is part of the range.

Point B has y coordinate y = 1, so that is also part of the range.

The range is {-2, 1, 2, 4, 6} representing all of the possible y values of this relation.

With any set, the order does not matter. Though convention is to list the items from smallest to largest.

6 0
3 years ago
Other questions:
  • IL MARK AS BRAINLIEST PPL
    12·1 answer
  • WILL GIVE BRAINLIEST!!!
    5·1 answer
  • A pitcher could hold two-twelfths of a gallon of water.If Roger filled up nine pitches,how much water would he have?
    5·2 answers
  • On Monday the high was 60 degrees Fahrenheit. On Tuesday, the high was 18% more. How much did the high increase from Monday to T
    7·2 answers
  • Which statement is correct
    5·1 answer
  • Does this graph show a function? Explain how you know. A. Yes, the graph passes the vertical line test B. Yes; there are no y-va
    7·1 answer
  • Hi! I really need help, I will give brainliest to whoever is right!
    7·2 answers
  • Please help it’s due soon!
    11·1 answer
  • Can somebody help me please?
    5·1 answer
  • A music store owner noted that cd sales had dropped 23% from one quarter to the next. if the owner sold 715 units in the first q
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!