POV-Ray : Newsgroups : povray.off-topic : Beyond prime numbers : Re: Beyond prime numbers Server Time
29 Jul 2024 00:37:44 EDT (-0400)
  Re: Beyond prime numbers  
From: Invisible
Date: 9 Aug 2012 06:41:42
Message: <502393e6$1@news.povray.org>
On 09/08/2012 11:15 AM, Invisible wrote:
> In this way, the 1-makable numbers start of rare and get denser, until
> we get to 20, the first 2-makable number. The 2-makables get denser in
> the same pattern, until at 80 ( = 40 + 40) we get the first 4-makable
> number.

Actually, no.

There are two ways to make 40: 5*8 and 8*5. That means you might /think/ 
there should be 4 ways to make 80:

   5*8 + 5*8
   5*8 + 8*5
   8*5 + 5*8
   8*5 + 8*5

The thing is, the middle two are equivalent. (Assuming we're ignoring 
ordering.) One is five 8s plus eight 5s, and the other is the same 
thing, but in a different order. So actually, 80 is only 3-makable.

120 is the first 4-makable number, being 40 + 40 + 40. (Then 125, then 
128, then 130, etc.) The first 5-makable number is 160 ( = 4*40).

So it seems that there's a pattern at the bottom where certain numbers 
can be made and certain others can't. 5*8 = 40 is the first 2-makable 
number, and the pattern repeats every 40 numbers or so.

In short, numbers less than 40 are either impossible, or can be uniquely 
expressed as a sum of 5s and 8s. Above 40, the representation stops 
being unique. (40 has two distinct expressions, and in generate n*40 has 
n+1 unique expressions.) So it's not quite like with prime numbers, 
where integers can be /uniquely/ factorised into primes.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.