mersenneforum.org A Tool for Studying Aliquot Sequence Data
 Register FAQ Search Today's Posts Mark Forums Read

2021-04-03, 15:13   #12
Happy5214

"Alexander"
Nov 2008
The Alamo City

3×7×29 Posts

Quote:
 Originally Posted by garambois - For the sequences which end with a cycle, or which start with a number which belongs to a cycle, I don't know how to do it. It seems reasonable to me to have a geometric mean of 1 for perfect numbers. For amicable numbers, it's much more complicated. If n = 220, the sequence is: 220 -> 284 -> 220 -> 284 ... So I can take x = 284/220. But I can also take x = (220/220) ^ (1/2) = 1. For cycles longer than 2, it seems reasonable to go around the entire cycle before calculating the mean. But if we proceed like this, if we take a number n which belongs to the cycle, the average will always be equal to 1. I have to think about this cycle question, unless somebody here has a suggestion for me ?
I'm leaning toward using a mean of 1 for all cycles of any length, since it never really grows. For sequences ending in cycles, go all the way around (to cancel the cycle out) in order to compute the length for the exponent.

2021-04-05, 06:34   #13
garambois

"Garambois Jean-Luc"
Oct 2011
France

32×5×13 Posts

Quote:
 Originally Posted by Happy5214 I'm leaning toward using a mean of 1 for all cycles of any length, since it never really grows. For sequences ending in cycles, go all the way around (to cancel the cycle out) in order to compute the length for the exponent.
I agree !
I will also be working on this soon !

2021-04-11, 18:10   #14
EdH

"Ed Hall"
Dec 2009

372010 Posts

I've added a little bit to my program. Hopefully it is of more interest than just mine. The new source code is attached.

It should compile under linux with the following command:
Code:
g++ seqinfo.cpp -o seqinfo
I have no idea what may be necessary to try to compile it under Windows.

The file regina_file is necessary. The program has been written such that a new regina_file can be as large as to sequence 20M. The format of any new regina_file must remain the same for the first four elements ([n,a,b,c).

The (h)elp entry displays all the current functions available:
Code:
--Available options for the following prompts--
(##/h/p/p##/q/u): prompt
## displays info for sequence ## if it is within the range.
h provides this text block.
p lists counts of all primes that terminate
a sequence within the limit of regina_file.
This will take a long time to complete.
Due to the large return count, the list is
sent to a primescount.txt file.  This file is
overwritten with each run.
p## searches for sequences that terminate with the prime ##.
u (not available yet!) run a routine to make a file of updates.
The file OE_3000000_C80.txt must be available.
This will take a long time.  If the file exists
it will be overwritten with a new file.
(y/n/c/f): prompt
y performs the procedure referenced.
n provides a negative response. (default if an entry is omitted)
c provides a count only, without a listing.
f provides a listing to screen and to results.txt.
(results.txt is never removed by the program.
It is only appended to.  It has to be manually deleted.)
Here is a sample run with entries in bold:
Code:
Data available for sequences 2 through 14000000
Sequence endings - prime: 10644411, cycle: 205473, open: 3150115
Enter sequence (##/h/p/p##/q/u): 276
276 is open ended. List any sequences that merge with 276? (y/n/c/f): c
7696 sequences found.
Enter sequence (##/h/p/p##/q/u): 13923160
13923160 is open ended. It merges with 4788.
Enter sequence (##/h/p/p##/q/u): 28
28 ends in a cycle. Display cycle? (starts at entry point) (y/n/f): y
28
Display all sequences that end in this cycle? (y/n/c/f): y
28
1 sequence found.
Enter sequence (##/h/p/p##/q/u): 496
496 ends in a cycle. Display cycle? (starts at entry point) (y/n/f): n
Display all sequences that end in this cycle? (y/n/c/f): y
496       608       650       652       790       1294      1574      1778
2162      2582      3142      5158      368449    1492799   1535075   1767455
1842215   2256401   2974751   3157729   3837505   3873551   4018945   4170127
4605213   4669921   5076873   5251285   5616985   6977649   7349365   7463965
7505901   7589845   7601365   7675345   8109041   8697385   8837245   8924241
11035163  12856335  13157075  13384167  13631207
45 sequences found.
Enter sequence (##/h/p/p##/q/u): p14604141802777
List all sequences that terminate with 14604141802777? (y/n/c/f): y
1923540   2967858   3462540   6232740   8361636   11070756  11079640  11470428
11788640  11792880  12125052  13462620  13896164
13 sequences found.
Enter sequence (##/h/p/p##/q/u): 13991486
13991486 ends in a cycle. Display cycle? (starts at entry point) (y/n/f): y
19916
17716
14316
19116
31704
47616
83328
177792
295488
629072
589786
294896
358336
418904
366556
274924
275444
243760
376736
381028
285778
152990
122410
97946
48976
45946
22976
22744
Display all sequences that end in this cycle? (y/n/c/f): c
8870 sequences found.
Enter sequence (##/h/p/p##/q/u): q
It can also now make a list of all the primes that terminate sequences present in regina_file. This process takes several hours. Here is an example run:
Code:
Enter sequence (#/h/p/q/u): p
Generating list of prime counts. . .
910307 unique primes found!
Listing took 102791 seconds to generate.
The time shown is exaggerated due to the machine being suspended overnight. There is also now a prompt, ensuring you really want to turn it loose for a few hours. I've attached the listing produced.

Here's a sample of primescount.txt:
Code:
2: 1
3: 270105
5: 1
7: 508095
11: 203297
13: 116153
17: 57124
. . .
13245150197: 3
27422578871: 1
28112302063: 2
80727104827: 21
94164320077: 2
14604141802777: 13
Attached Files
 seqinfo.cpp.txt (18.0 KB, 13 views) primescount.txt.zip (2.38 MB, 11 views)

Last fiddled with by EdH on 2021-04-11 at 18:31 Reason: Added a sample fo primescount.txt.

 2021-04-12, 05:33 #15 Happy5214     "Alexander" Nov 2008 The Alamo City 3·7·29 Posts As a suggestion (without looking at the code), would it be possible to treat perfect numbers as a special case? For example, instead of the above output for 28, perhaps something like: Code: Enter sequence (##/h/p/p##/q/u): 28 28 is a perfect number. Display all sequences that end at 28? (y/n/c/f): y 28 1 sequence found. Similarly, instead of the following for 608: Code: Enter sequence (##/h/p/p##/q/u): 608 608 ends in a cycle. Display cycle? (starts at entry point) (y/n/f): y 496 Display all sequences that end in this cycle? (y/n/c/f): c 45 sequences found. You could do something like this: Code: Enter sequence (##/h/p/p##/q/u): 608 608 ends at perfect number 496. Display all sequences that end at 496? (y/n/c/f): c 45 sequences found. To me, the extra step of prompting for a cycle of length 1 is overkill when it could just be printed in a single line, and perfect numbers are a special cycle in that you can point to a "terminating number".
2021-04-12, 12:54   #16
garambois

"Garambois Jean-Luc"
Oct 2011
France

58510 Posts

Quote:
 Originally Posted by EdH The file regina_file is necessary. The program has been written such that a new regina_file can be as large as to sequence 20M. The format of any new regina_file must remain the same for the first four elements ([n,a,b,c).
There is no reason for me to change this format.
The only thing I risk doing is adding a variable "o" in each line which will be the geometric mean of the quotients of the successive terms of the sequence.
I wanted to do this really fast, but sequences that merge with other Open End sequences are problematic and need to be recalculated.
I am thinking of making the change when I reach 15M, because then I will have to stop everything and modify the main program.
I will probably do this in July or August ...

Otherwise, I will do different tests with your program in the next few days ...

2021-04-12, 13:36   #17
EdH

"Ed Hall"
Dec 2009

23×3×5×31 Posts

Quote:
 Originally Posted by Happy5214 As a suggestion (without looking at the code), would it be possible to treat perfect numbers as a special case?. . .
Thanks! i was already looking at that very issue, but haven't delved into coding it yet. I'll probably just use a quick check to catch them, since we know all the perfect numbers of a size we will run across in the near future. But, I still need to fit it into the existing code.

@garambois: Adding elements won't bother at all. I just need the front to remain the same.

Are there any extra searches within regina_file that I should try adding?

A side question: (From the merges/termination thread) do you have the maximum heights for sequences listed in your files?

2021-04-12, 15:55   #18
garambois

"Garambois Jean-Luc"
Oct 2011
France

24916 Posts

Quote:
 Originally Posted by EdH @garambois: Adding elements won't bother at all. I just need the front to remain the same. Are there any extra searches within regina_file that I should try adding? A side question: (From the merges/termination thread) do you have the maximum heights for sequences listed in your files?

Unfortunately, I don't have the maximum heights reached by the sequences in my files !

Reminder : here is a line for a sequence of the file "regina_file"
[n, a, b, c, d, e, f, g, h, i, j, k, l, m]
"e" is the number of relative maxima (peaks) for the sequence that begins with the integer "n".
"f" is the number of parity changes found in this sequence, that is, the number of times a perfect square or double of a perfect square is found in this sequence.
I think these two data would be interesting to add to your program, because they are interesting elements which make the "identity" of a sequence.
It would also be interesting to be able to classify the sequences according to their number of peaks or changes in parity.

At the start of my research, I wanted to see if there was a correlation between the prime factorization of the starting numbers of the sequences and the numbers "e" and "f" (and the others of the table) or if there was a correlation between the ending prime numbers of the sequences and these "e" and "f" numbers.
But I failed in this search for correlation.
Your work and your program have rekindled my interest in this research ...

2021-04-12, 18:10   #19
EdH

"Ed Hall"
Dec 2009

23·3·5·31 Posts

Quote:
 Originally Posted by Happy5214 As a suggestion (without looking at the code), would it be possible to treat perfect numbers as a special case? . . .
I have added the recognition of the first few perfect numbers. The first 7 are within the current input for a sequence request, but I coded for the first 8. I coded the first 10 as sequence terminations. Any larger perfect numbers should be treated as before.
Quote:
 Originally Posted by garambois . . . Reminder : here is a line for a sequence of the file "regina_file" [n, a, b, c, d, e, f, g, h, i, j, k, l, m] "e" is the number of relative maxima (peaks) for the sequence that begins with the integer "n". "f" is the number of parity changes found in this sequence, that is, the number of times a perfect square or double of a perfect square is found in this sequence. I think these two data would be interesting to add to your program, because they are interesting elements which make the "identity" of a sequence. It would also be interesting to be able to classify the sequences according to their number of peaks or changes in parity. . . .
I will study this, but I might be slow. Let me look it over. . .
Attached Files
 seqinfo.cpp.txt (19.7 KB, 12 views)

Last fiddled with by EdH on 2021-04-12 at 18:12 Reason: Might help to actually attach the source.

2021-04-12, 19:11   #20
EdH

"Ed Hall"
Dec 2009

23×3×5×31 Posts

Quote:
 Originally Posted by garambois . . . At the start of my research, I wanted to see if there was a correlation between the prime factorization of the starting numbers of the sequences and the numbers "e" and "f" (and the others of the table) or if there was a correlation between the ending prime numbers of the sequences and these "e" and "f" numbers. But I failed in this search for correlation. Your work and your program have rekindled my interest in this research ...
As you have probably noticed over the years, I often have some area of interest in Aliquot sequences that sends me off to somewhere. I'm always happy when some of those studies benefit others' interests. I'm also interested in finding ways to use already gathered data, such as in your files. I hope to eventually be able to contribute to the tables again, if I can ever complete this other factoring project.

2021-04-13, 14:09   #21
EdH

"Ed Hall"
Dec 2009

23×3×5×31 Posts

Quote:
 Originally Posted by garambois . . . Reminder : here is a line for a sequence of the file "regina_file" [n, a, b, c, d, e, f, g, h, i, j, k, l, m] "e" is the number of relative maxima (peaks) for the sequence that begins with the integer "n". "f" is the number of parity changes found in this sequence, that is, the number of times a perfect square or double of a perfect square is found in this sequence. I think these two data would be interesting to add to your program, because they are interesting elements which make the "identity" of a sequence. It would also be interesting to be able to classify the sequences according to their number of peaks or changes in parity. At the start of my research, I wanted to see if there was a correlation between the prime factorization of the starting numbers of the sequences and the numbers "e" and "f" (and the others of the table) or if there was a correlation between the ending prime numbers of the sequences and these "e" and "f" numbers. But I failed in this search for correlation. Your work and your program have rekindled my interest in this research ...
I'm wondering what I should add regarding e and f.

I should be able to easily add a function that lists sequences based on the count but more complexities might be problematic.* What would you actually like to be able to list?

* Many years ago, I used to select sequences to work on based on their graphs, expecting that the more changes, the higher probability of termination. That didn't seem to turn out as a valid indicator of a pending termination.

2021-04-14, 09:30   #22
garambois

"Garambois Jean-Luc"
Oct 2011
France

32×5×13 Posts

Quote:
 Originally Posted by EdH I will study this, but I might be slow. Let me look it over.
No problem, we take the time we want. We do this for fun and if we start to feel rushed and stressed, we won't like working on these things anymore !
;-)

Quote:
 Originally Posted by EdH * Many years ago, I used to select sequences to work on based on their graphs, expecting that the more changes, the higher probability of termination. That didn't seem to turn out as a valid indicator of a pending termination.
I think that when you say that, you are right.
But what if we are wrong in thinking that ?
In any case, it only costs us a little time to do some tests, we could come across correlations that nobody expected !

Quote:
 Originally Posted by EdH I'm wondering what I should add regarding e and f. I should be able to easily add a function that lists sequences based on the count but more complexities might be problematic.* What would you actually like to be able to list?
I have a suggestion.
For example when you display all the starting numbers of the sequences that end with a prime number, personally, I tend to look at these numbers in their usual representation in base 10, but especially also in the factorized form in prime numbers : this gives us much more information about the number, which is important if we want to notice properties.

Concerning e and f, I don't know if your program can show some things I would like to see.
But I ask myself many questions.
Let me introduce you to some ideas I've been working on recently, after Edwin started this topic.

Here are some examples :

1) For each prime number, show a table that counts the number of sequences that end with that prime number that have 0 peak (this number will most likely be 0), 1 peak, 2 peaks...
Example :
3 [(number of sequences that have 0 peaks and end in 3), (number of sequences that have 1 peak and end in 3), (number of sequences that have 2 peaks and end in 3), ...]
5 [(number of sequences that have 0 peaks and end with 5), (number of sequences that have 1 peak and end with 5), (number of sequences that have 2 peaks and end with 5), ...]
...
The question to answer : will the distribution be the same for every prime number ?

2) A very simple way to visualize the data would also be to be able to launch a regina_file analysis by entering this in a program for example :
[n%2==0, a==0, b, c, d, e==0, f, g, h, i, j, 1.7<k<2.3, l, m]
Thus, for each of the 14 variables in each row of regina_file, we could specify characteristics.
In the example above, the analysis would give us all the sequences that start with an even number, that are Open-End, that have no peak (so they are strictly increasing) and that have a slope of about 2 (so at each iteration, the size of the terms multiplies by about a factor of 2).
This entry would allow us for example to find all the sequences that have the same very special graph as the sequence 19560.
Thus, just for all the sequences with 0 peaks, there are several types : we could find again the drivers which are the perfect numbers by specifying a slope k rather close to 1, find the guides which ensure slopes of 2, and above all, maybe see things not yet known ...
Another example : you want a bell-shaped sequence.
You enter :
[n, a==1, b, c, d, e==1, f, g, h, i, j, 0.8<k<1.2, l, m]
And you find sequences such as 2174880.
Of course, the goal is to try to notice correlations between these forms of graphs and the factorization in prime factors of the starting number of the sequence (and this correlation exists at least for the sequences with 0 peaks, because of the perfect numbers drivers, of the 2-perfect numbers, of the 3-perfect numbers...) or according to the prime number which ends the sequences (belonging to such or such branch of the infinite graph of the aliquot sequences).

I have the same questions about the number of parity changes for each sequence.

But as said above, all this is a very long work started years ago.
And my problem is that in python, I can't do this work anymore, because regina_file is too big.
I have to work in C, and there, I'm not at ease !

 Similar Threads Thread Thread Starter Forum Replies Last Post schickel Aliquot Sequences 3465 2021-05-17 20:45 garambois Aliquot Sequences 24 2021-02-25 23:31 arbooker Aliquot Sequences 5 2020-11-07 15:58 schickel Aliquot Sequences 67 2012-01-20 17:53 10metreh Aliquot Sequences 2 2009-07-31 17:43

All times are UTC. The time now is 17:05.

Tue May 18 17:05:31 UTC 2021 up 40 days, 11:46, 0 users, load averages: 2.66, 2.64, 2.63