Python Forum
Twin Primes Recursion Limit
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Twin Primes Recursion Limit
#2
This looks sufficiently different from the other thread (the other one was about displaying primes in vertically aligned tables), so I've split it into it's own thread.

With that said, I'll need to have some time to play around with it to see if I can help, but normally there's some conditions on whether or not to recurse.  As it is now, the function will call itself every time, as long as n is greater than 3.

In the meantime, could you do us a favor and define what it is, exactly, that a "twin prime" is?  If it's just a number, and that number+2 both being prime, then it would be a very, very small list, right?
Reply


Messages In This Thread
Twin Primes Recursion Limit - by djkraft - Sep-25-2017, 02:56 PM
RE: Twin Primes Recursion Limit - by nilamo - Sep-25-2017, 03:47 PM
RE: Twin Primes Recursion Limit - by ichabod801 - Sep-25-2017, 04:16 PM
RE: Twin Primes Recursion Limit - by Mekire - Sep-25-2017, 04:23 PM
RE: Twin Primes Recursion Limit - by djkraft - Sep-25-2017, 10:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  GCF function w recursion and helper function(how do i fix this Recursion Error) hhydration 3 2,662 Oct-05-2020, 07:47 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020