[net.puzzle] > What comes next in the series 2, 3, 5, 7 ???

osman@sprite.DEC (Eric, dtn 283-7484, Burlington Ma.) (04/12/85)

This is easy.  The next four numbers are

	8  7  3  -5

Why ?  Because I did a finite difference analysis on the original sequence:

2
  1
3   1
  2   -1
5   0
  2
7

First column (original problem) is not all the same number, so we're not
dealing with a constant (bet you knew THAT already, huh?).  Second column
is not all the same, so not linear either.  Third column not the same so
not quadratic either.  Fourth column contains all the same number (they're
ALL -1) so we've got a cubic :-).  Hence we can put another -1 below it like
this:

2
  1
3   1
  2   -1
5   0
  2   -1
7

We can now add the 0 to the new -1 to get another number (-1) in our third
column.  Adding twice more, we see that the next number in the original
sequence is 8.  (2 + -1 = 1,   7 + 1 = 8.)

2
  1
3   1
  2   -1
5   0
  2   -1
7   -1
  1
8

I put in some more -1's just to see what the next four numbers of the original
sequence were:

2
  1
3    1
  2    -1
5    0
  2    -1
7   -1
  1    -1
8   -2
  -1   -1
7   -3
  -4   -1
3    -4
   -8
-5

Yes, I know this isn't the only answer.  But it's certainly valid, right ?
(Other valid answers would be to pretend it's quartic, like put 0 under
the original -1 instead of -1, then put 1, then 2 etc.)
--------------------------------------------------------------------
While I've got you on the line, here's another puzzle:

	I'm looking for a random number generator that generates a
	number from negative infinity to positive infinity.

	I'd imagine we could work with something like

		NEW = TANGENT (PI/2 * (RND(NORM(OLD)))

	where NORM somehow maps the OLD random number into whatever our
	computer wants as a seed to its RND function, which I assume gives
	a random number from 0 to 1.  Then multiply by PI/2 and take the
	tangent, which depending on how close to PI/2 we are, yields a number
	anywhere up to infinity !

	This isn't quite the answer yet.  For one thing, I doubt it's
	uniformly distributed.  Also, this answer is from 0 to infinity, and
	I'm looking for negative infinity to positive infinity.

	Have fun !

p.s.	CAUTION:  According to my father, Russia's offensive strategy against
	the USA is to publish math puzzles in Scientific American and other
	magazines (and net. ??) which causes the best brains of our country
	to work on the puzzles instead of furthering the state-of-the-art
	in technology !

/Eric Osman, Digital, Burlington, Ma.

ark@alice.UUCP (Andrew Koenig) (04/13/85)

You will have a hard time getting random integers uniformly
distributed from -infinity to +infinity.  Where will you find
the paper to write them down?

js2j@mhuxt.UUCP (sonntag) (04/15/85)

> 	I'm looking for a random number generator that generates a
> 	number from negative infinity to positive infinity.
> 
> 	I'd imagine we could work with something like
> 
> 		NEW = TANGENT (PI/2 * (RND(NORM(OLD)))
> 
> 	where NORM somehow maps the OLD random number into whatever our
> 	computer wants as a seed to its RND function, which I assume gives
> 	a random number from 0 to 1.  Then multiply by PI/2 and take the
> 	tangent, which depending on how close to PI/2 we are, yields a number
> 	anywhere up to infinity !
> 	This isn't quite the answer yet.  For one thing, I doubt it's
> 	uniformly distributed.  Also, this answer is from 0 to infinity, and
> 	I'm looking for negative infinity to positive infinity.

    Now he tells us that it's got to be uniformly distributed?  If such
a function exists, the probability of it generating a number between any
two arbitrarily large, but finite limits is exactly 0!  Why would
anyone want a random number generator like that?
-- 
Jeff Sonntag
ihnp4!mhuxt!js2j
     "In the long run, we'll all be dead."-John Maynard Keynes

wjhe@hlexa.UUCP (Bill Hery) (04/16/85)

The next number is 11

twb@mhuxh.UUCP (twb) (04/17/85)

I think the next numbers are: 10, 13, 16, 20, 24 ...
Because from 2 to 3 is a step of 1 (there is one step of 1)
from 3 to 5 and 5 to 7 are steps of 2 (there are two steps of 2).
Therefore, I would expect three steps of 3 to follow, etc.
Tom.

gjk@talcott.UUCP (Greg Kuperberg) (05/02/85)

> I think the next numbers are: 10, 13, 16, 20, 24 ...
> Because from 2 to 3 is a step of 1 (there is one step of 1)
> from 3 to 5 and 5 to 7 are steps of 2 (there are two steps of 2).
> Therefore, I would expect three steps of 3 to follow, etc.
> Tom.

No, no, no!  The answer is obviously 8.  Why?  Let p(n)=2*n+1-(n-1)*(n-2)*
(n-3)/6.  p(0)=2, p(1)=3, p(2)=5, p(3)=7, and p(4)=8.

:-)
-- 
			Greg Kuperberg
		     harvard!talcott!gjk

"The eerily accurate drawing of Goetz showed the face of the 'before'
figure in comic-book ads for body-building devices."-Time Magazine, April 8