Ask Question
11 February, 10:07

Consider the following sequence, defined from n=2 to 15 (inclusive). Pn=n2-1. Produce a list named primes which only contains values from this sequence which are prime. We provide a function is_prime to assist you with this. Call it like this: is_prime (5).

+2
Answers (1)
  1. 11 February, 10:11
    0
    primes = []

    for n in range (2,16):

    pn = n*n - 1

    if is_prime (pn):

    primes. append (pn)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Consider the following sequence, defined from n=2 to 15 (inclusive). Pn=n2-1. Produce a list named primes which only contains values from ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers