Ask Question
5 May, 11:46

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).

+1
Answers (1)
  1. 5 May, 13:30
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers