All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Prime sums (Posted on 2023-04-19) Difficulty: 4 of 5
1 is a product of 0 primes such that every 2 positive integers that multiply to it add up to a prime.

1*1=1, 1+1=2

2 is a product of 1 prime such that every 2 positive integers that multiply to it add up to a prime.

1*2=2, 1+2=3

6=2*3 is a product of 2 primes such that every 2 positive integers that multiply to it add up to a prime.

1*6=6, 1+6=7
2*3=6, 2+3=5

30=2*3*5 is a product of 3 primes such that every 2 positive integers that multiply to it add up to a prime.

1*30=30, 1+30=31
2*15=30, 2+15=17
3*10=30, 3+10=13
5*6=30, 5+6=11

1. What is the smallest product of 4 primes such that every 2 positive integers that multiply to it add up to a prime?
2. What is the smallest product of 5 primes such that every 2 positive integers that multiply to it add up to a prime?

No Solution Yet Submitted by Math Man    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 3 |
The first with 4 prime factors is 210, and the first with 5 prime factors is 186162.

The prime factors of 210 are
  2  3  5  7
  
Its divisors are
1  2  3  5  6  7 10 14    and their complements in reverse order
15 21 30 35 42 70 105 210
All produce a prime when added to their complement, e.g., 10+21 = 31.

The prime factors of 186162 are
2  3  19  23  71
and its divisors are
1  2  3  6 19 23 38 46 57  69  71 114 138 142 213 426  and their complements
437 874 1311 1349 1633 2622 2698 3266 4047 4899 8094 9798 31027 62054 93081 186162

All produce a prime when added to their complement, e.g., 38+4899 = 38+4899 = 4937


% clearvars,clc
% p=primes(100);
% np=length(p);
% for a=1:np-5
%   disp(a)
%   for b=a+1:np-4
%     for c=b+1:np-3
%       for d=c+1:np-2
%         for e=d+1:np-1
%         i=p(a)*p(b)*p(c)*p(d)*p(e);



for i=1:186162 
  f=factor(i);
  if length(f)>3
    if isequal(f,unique(f))
      dv=divisors(i);
      good=true; lp=length(dv)+1;
      for j=1:length(dv)/2
        if isprime(dv(j)+dv(lp-j))==false
          good=false;
          break
        end
      end
      if good
        disp([length(factor(i)) i])
      end
    end
  end
end 

%         end
%       end
%     end
%   end
% end

The choice of 186162 for the ending of the search was based on the outer (now commented out) loop finding that worked, but it had time to check only even numbers before starting out with 3 instead of 2. The one-by-one check was to rule out lower numbers which happened to be odd, something that apparently does not happen.

Showing number of prime factors, and the number itself

>> primeSums
           4         210
           4         330
           4         462
           4        1870
           4        4218
           4        5590
           4        6042
           4        7638
           4       13962
           4       14410
           4       22570
           4       24682
           4       26202
           4       32838
           4       35098
           4       39678
           4       43498
           4       43990
           4       52782
           4       62458
           4       62538
           4       93262
           4      125302
           4      127290
           4      130782
           4      152310
           4      155170
           5      186162
           
The same without the test that the prime factors must be unique:

>> primeSums
           4         210
           4         330
           4         462
           4        1870
           4        4218
           4        5590
           4        6042
           4        7638
           4       13962
           4       14410
           4       22570
           4       24682
           4       26202
           4       32838
           4       35098
           4       39678
           4       43498
           4       43990
           4       52782
           4       62458
           4       62538
           4       93262
           4      125302
           4      127290
           4      130782
           4      152310
           4      155170
           5      186162

This is the same list.  It seems that after 4, there are no other numbers with duplicate prime factors that satisfy the requirements.

  Posted by Charlie on 2023-04-19 09:01:58
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information