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
7. 12, 24, 4, 18, 12, 9<br><br> Using the data, create a histogram.
Mnenie [13.5K]

Answer:

import pandas as pd

vec = pd.Series([7.12,24,4,18,12,9])

vec.plot(kind = 'hist')

Step-by-step explanation:

You can use python for that.

By doing

import pandas as pd

vec = pd.Series([7.12,24,4,18,12,9])

vec.plot(kind = 'hist')

And this is the result you get

5 0
3 years ago
4.3x10^3 in standard notation
podryga [215]

Answer:

4300

Step-by-step explanation:

i think this is what you want

5 0
3 years ago
The answer please I don’t understand this
aivan3 [116]
1. 750 2. 1500 3. 2,250 4. 3,000 I believe this would be your answer
8 0
3 years ago
Hii, please help me with this question I keep getting an option that isn't there.
gulaghasi [49]

Answer:

a 88 la casa de mi mamá no me gusta que me iba a mostrar mi mamá

Step-by-step explanation:

ok gracias a Dios y q ases de la referenciado a Dios y q bueno que no Ben Noticiasnet de los ángulos agudos y q ases hablas a Dios

4 0
3 years ago
Who ever helps me on this and is correct will be marked brainlist !​
dangina [55]

Answer:

y=3x^2 - 4

Step-by-step explanation:

3 0
3 years ago
Other questions:
  • Which statement compares the shape of the dot plots?
    11·1 answer
  • Line BD is tangent to circle O at C, Arch AEC = 299, and ACE = 93. Find Angle DCE.
    13·1 answer
  • Choose the equation below that represents the line that passes through the point (7, −2) and has a slope of −3.
    7·2 answers
  • if on a scale drawing 35 feet are represented by 25 inches, then a scale of 1/8 inch represents how many feet?
    11·1 answer
  • HELPPPPPPPPP PLZZZZZZZZZZZZZZZZZZ
    9·1 answer
  • Please help struggling
    5·1 answer
  • Look on the picture please
    9·1 answer
  • Please answer i will give you brainiest please answer asap!!!!!!!!!!
    5·2 answers
  • How many yards are there in 14 1/2 miles?
    6·1 answer
  • Determine whether each figure creates the conditions to form a unique triangle, more than one triangle, or no triangle. Angle me
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!