mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2009-10-23, 17:36   #1
davar55
 
davar55's Avatar
 
May 2004
New York City

5·7·112 Posts
Default Prime Reciprocal Sums

Let {Pi} be a finite set of distinct primes (positive integers).

Find a set {Ai} of non-negative integers with 0 <= Ai < Pi
such that the sum of the values Ai/Pi comes as close to 1 as possible
without exceeding 1.

Try this in particular for the set of the first N (known) Mersenne
Prime exponents, N ranging from 1 through 47.
davar55 is offline   Reply With Quote
Old 2009-10-23, 19:02   #2
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Wink

Brute force only takes ~ 2^245196900 sums.
CRGreathouse is offline   Reply With Quote
Old 2009-12-24, 19:32   #3
davar55
 
davar55's Avatar
 
May 2004
New York City

102138 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Brute force only takes ~ 2^245196900 sums.
A bit more work than I expected, but brute force wasn't what I really
had in mind. Your computer must be much faster than mine.

I'm not sure, but I think (and I think your calculation bears it out)
that this problem in the general case is NP-hard or NP-complete.
Can anyone confirm this for sure?

In any case, since the set of 47 known MPEs probably would take too
many cycles to solve, consider a less daunting similar pair of problems.

Let Pn be the nth prime.

Let Sn be the set {Ai} of n non-negative integers with 0 <= Ai < Pi
such that the sum of the values Ai/Pi comes as close to 1 as possible
without exceeding 1.

Let Tn be the set {Bi} of n non-negative integers with 0 <= Bi < Pi
such that the sum of the values Bi/Pi comes as close to an integer > 0
as possible.

Define two sequences over positive integers n = 1,2,3,... :

fn = sumof(Sn) ,
gn = sumof(Tn).

The (doable, I hope) problem is: find the first ten (or more)
integers in these two sequences.
davar55 is offline   Reply With Quote
Old 2009-12-24, 19:45   #4
R. Gerbicz
 
R. Gerbicz's Avatar
 
"Robert Gerbicz"
Oct 2005
Hungary

2×743 Posts
Default

Quote:
Originally Posted by davar55 View Post
Let {Pi} be a finite set of distinct primes (positive integers).

Find a set {Ai} of non-negative integers with 0 <= Ai < Pi
such that the sum of the values Ai/Pi comes as close to 1 as possible
without exceeding 1.

Try this in particular for the set of the first N (known) Mersenne
Prime exponents, N ranging from 1 through 47.
It is easy to give bounds for the difference.
Since the sum can't be 1, so the smallest distance from one is at least 1/prod(n=1,47,M_n). And greedy method gives a solution for that the distance is at most 1/M_47.
R. Gerbicz is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum of reciprocal of squares of all prime numbers Damian Math 3 2010-05-24 23:57
Prime Sums #3 davar55 Puzzles 2 2008-08-13 12:37
Prime Sums davar55 Puzzles 11 2008-03-31 05:24
Prime Sums #2 davar55 Puzzles 1 2008-03-19 14:12
Sums of prime powers grandpascorpion Math 49 2007-04-22 17:06

All times are UTC. The time now is 08:13.


Tue Jul 27 08:13:56 UTC 2021 up 4 days, 2:42, 0 users, load averages: 2.41, 1.89, 1.78

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.