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
Y’all know this anything about this?
Andre45 [30]

We are given:

  • Parallelogram CDEF
  • ∠C = 13x - 10
  • ∠D = 5x + 10

To Find: ∠E

Concept Used:

  • Adjacent angles of a Parallelogram are Supplementary

Finding the value of 'x':

Since adjacent angles of a parallelogram are Supplementary:

∠D + ∠C = 180

5x + 10 + 13x - 10 = 180              [replacing the values of angle C and D]

18x = 180

x = 10                                          [dividing both sides by 18]

__________________________________________________________

Finding Measure of Angle D:

We are given that:

∠D = 5x + 10

∠D = 5(10) + 10                    [since x = 10]

∠D = 60°

__________________________________________________________

Finding the measure of ∠E:

∠D and ∠E are Adjacent angles

Since Adjacent angles are Supplementary:

∠D + ∠E = 180

60 + ∠E = 180

∠E = 120°                                  [subtracting 60 from both sides]

Hence, the measure of ∠E = 120°

7 0
2 years ago
Question 1 . What division problem does this area model represent?
Law Incorporation [45]

Answer:

0

Step-by-step explanation:

6 0
3 years ago
Helppppppppppppppppppp
ludmilkaskok [199]

The total money spent for the Dinner and Dessert is $22 so to figure out how much was spent on the taxi ride you're going to want to subtract $22 from $31 (31 = x + 22) or (31 - 22 = x).

6 0
3 years ago
Multiply. 37 × 10^2<br> pls i need it
Keith_Richards [23]

Step-by-step explanation:

37 x 10^2 = 3700

8 0
1 year ago
Read 2 more answers
The vertex of the parabola below is at the point (3,2) and the point (4,6) is on the parabola. What is the equation of the parab
nata0808 [166]

Answer:

\large\boxed{y=4(x-3)^2+2\ \bold{vertex\ form}}\\\boxed{y=4x^2-24x+38\ \bold{standard\ form}}

Step-by-step explanation:

The vertex form of a parabola:

y=a(x-h)^2+k

(h, k) - vertex

We have the vertex at (3, 2) → h = 3 and k = 2.

Substitute:

y=a(x-3)^2+2

The point (4, 6) is on athe parabola. Put the coordinates of this point to the equation:

6=a(4-3)^2+2       <em>subtract 2 from both sides</em>

6-2=a(1)^2+2-2

4=a\to a=4

Finally:

y=4(x-3)^2+2          <em>vertex form</em>

<em>use (a - b)² = a² - 2ab + b²</em>

y=4(x^2-6x+9)+2          <em>use the distributive property</em>

y=4x^2-24x+36+2

y=4x^2-24x+38             <em>standard form</em>

6 0
3 years ago
Other questions:
  • HURRY PLEASE HELPPPPPPP
    10·1 answer
  • The slope of a horizontal line is ___?
    12·2 answers
  • A classmate displays the
    10·1 answer
  • Jess made 3 different stacks of wooden blocks. The first stack was 8 blocks high ,the second stack was 4 blocks higher than the
    15·1 answer
  • Please respond quickly, 15 points up for grabs.
    13·1 answer
  • Rounding 801,504 to the nearest thousand
    8·2 answers
  • For what angle measure is the tangent ratio less than 1
    11·1 answer
  • When should the direct pattern be used to communicate negative nows?
    7·1 answer
  • A. Is (- 10, 21) a solution of y = - 3x - 9?<br> b. Is (6, - 27) a solution of y= - 3x-9?
    5·1 answer
  • What is an exponent? Because i am confused
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!