Re: Square roots of N * i (for all i from 1 to N)
- From: alessandra_cabrini@xxxxxxxxxxx
- Date: 21 Apr 2005 04:22:25 -0700
OK, this is the algorithm scheme (I'm still working on a java program
to calculate it for each N):
NB = with this algorithm you'll find a number b such that floor(SQRT(N
* b)) = a_(i + 1)
If N = 1 mod 4
The 1st occurrence of the b to obtain a_i = a_(i + 1), for each N in
the sequence of the integers is the sequence
of all the integers but the perfect squares (starting at N= 5, b = 3).
Example:
5 3
9 5 (not 4 because it's a perfect square)
13 6
17 7
21 8 (not 9 because it's a perfect square)
25 10
If N = 3 mod 4
we have a similar situation, with a sequence of integers.
This time we have to jump numbers far from each other an odd number.
This should be done 3 times for each odd number.
We start at N = 7, b = 5 and the first number to jump is 6 (don't ask
me why....)
Example:
7 5
11 7
15 8
19 10
23 11
27 13
31 14
35 15
39 16
43 18
47 19
51 20
55 21
59 23
63 24
67 25
71 26
75 28
79 29
83 30
87 31
91 32
95 33
99 35
103 36
We have jumped 6, 9, 12 (6 + 3 = 9, 9 + 3 = 12)
Then we jumped 17, 22, 27, (12 + 5 = 17, 17 + 5 = 22, 22 + 5 = 27)
Then we jumped 34, 41, 49 (27 + 7 = 34 and so on)
I hope I've been intelligible, if anyone would be interested in this or
have questions, suggestions or wish to
use this for something, please let me know.
Sandra
.
- References:
- Square roots of N * i (for all i from 1 to N)
- From: Sandra
- Re: Square roots of N * i (for all i from 1 to N)
- From: alessandra_cabrini
- Re: Square roots of N * i (for all i from 1 to N)
- From: Helmut Richter
- Square roots of N * i (for all i from 1 to N)
- Prev by Date: Re: Searching a linked list?
- Next by Date: JSH: Interesting behavior
- Previous by thread: Re: Square roots of N * i (for all i from 1 to N)
- Next by thread: Re: Square roots of N * i (for all i from 1 to N)
- Index(es):
Relevant Pages
|