Ask Question
1 October, 12:51

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

+5
Answers (1)
  1. 1 October, 13:56
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers