last day (15 days later) » 

11:41 PM
4
Q: List Sophie Germain primes

user3502615The Question A Sophie Germain prime is a prime p such that 2p+1 is prime as well. For example, 11 is a Sophie Germain prime because 23 is prime as well. Write the shortest program to calculate Sophie Germain primes in ascending order Rules The Sophie Germain primes must be generated by your p...

 
Can you give some examples (dummy) programs and what would their score look like given they output some X odd primes ?
 
Is a badly coded python program acceptable?
 
It doesn't have to be a program at all, just some random characters.
In particular, your bonus seems a bit confusing. If my program is of 10 bytes, and it produces 5 odd primes, does my score equals (2 * 10) - 0.5 - (5 * 20) = -80.5 ?
 
Assuming I use an infinite loop, my score will change each time a number is printed. Is this the intention, to see who can run a program the longest?
 
@Geobits even ideally, your code cannot run forever. It will soon reach the limit of your data type.
 
11:41 PM
@Optimizer Okay, but if using an arbitrary integer type, if it prints only one a day, I should just modify my score every day?
 
No, say you have an odd prime greater than 10^10, you will get 20 points. If you generate an odd prime greater than 10^11, you will get 40 points, and etc. etc.
 
But if the program never terminates, there will never be a "final" score. It'll keep finding odd primes forever, albeit slowly.
 
That does not answer any of our questions. In fact, that does not even play well with your own wordings "-10 for every power of 10 beyond 10¹º which your odd prime is greater than". According to that, an odd prime greater than 10^10 should give -10 and an odd prime greater than 10^11 should give -20. Right ?
 
Added a limit and changed wording. The larger your limit is, the more bytes you sacrafice (if you are under 30 bytes, you sacrafice 7 points)
 
Where did this 7 come from ?
 
11:41 PM
2 points for an extra byte, and you also lose the -5 point bonus, so you are losing 7 points in total.
 
You should really not give a -5 bonus for every byte below 30. If someone has a score below 30 they will probably win, moreover, giving them a bonus for that won't help them win the more, because if someone has a lower byte count, they will get a greater bonus.
 
Just make the scoring criteria so it has to print all of them up to at least 2^32-1, and then just score by code-golf with no bonuses or penalties.
 
There are on the order of 11.5 million Sophie Germain primes less than 2^32, so with a total 20 point deduction for each 100 primes found, the base starting score for a serious answer is about -2300000.
 
@user3502615 Come talk to us in our site's chatroom, The Nineteenth Byte. Some people there are discussing your challenge, and you might get better, faster feedback if you participate.
 
Wait so now theres no limit, right?
 
11:41 PM
Correct. there is no limit.
 
So I don't have to actually run the program till 2^32 to apply for the bonus, rite?
 
You do have to find a prime; and you do that by substituting the starting range for 2^32, to simulate running the whole program.
 
Is there any point in having 2 per byte, then minus ten, versus 1 per byte then minus 5?
 
1 per byte makes more sense
 

last day (15 days later) »