mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PARI/GP (https://www.mersenneforum.org/forumdisplay.php?f=155)
-   -   PARI's commands (https://www.mersenneforum.org/showthread.php?t=13636)

science_man_88 2010-08-30 15:35

[QUOTE=CRGreathouse;227678]I can write out the numbers for s = 11, but what do I do with them?[/QUOTE]

if you check the primes in this sequence out until the exponent of the largest Mersenne prime confirmed you'll see they are all prime for which 2^s-1 is not prime.

same with the others highlighted in red.

the numbers in orange mean that the sequence is part of another already highlighted in red.

3.14159 2010-08-30 15:37

[QUOTE=Matt]Can you post the details of the bug here? I've run into these myself in the past and if it's the kind of bug I'm thinking of, the PFGW program developer wants to hear about these.
[/QUOTE]

[code]Error occuring in PFGW at Mon Aug 30 10:54:47 2010
Expr = 3460*308^308+1
Detected in MAXERR>0.45 (round off check) in prp_using_gwnum
Iteration: 75/2557 ERROR: ROUND OFF 0.5>0.45
PFGW will automatically rerun the test with -a1[/code]

3.14159 2010-08-30 15:41

Also: I upped the sieving range to 1.5 billion.

CRGreathouse 2010-08-30 15:47

[QUOTE=3.14159;227680]@CRG: Can you make a quick script that asks NewPGen to sieve for a certain base-range?[/QUOTE]

Why don't you? I don't use these programs much -- I'm not interested in prime searching, in general.

CRGreathouse 2010-08-30 15:48

[QUOTE=science_man_88;227682]if you check the primes in this sequence out until the exponent of the largest Mersenne prime confirmed you'll see they are all prime for which 2^s-1 is not prime.[/QUOTE]

So your theory is that if p = 2^k * (s+1) - 1, then 2^p - 1 is composite?

If so, next time [i]say it that way[/i] so we can understand you.

science_man_88 2010-08-30 15:58

[QUOTE=CRGreathouse;227687]So your theory is that if p = 2^k * (s+1) - 1, then 2^p - 1 is composite?

If so, next time [i]say it that way[/i] so we can understand you.[/QUOTE]

considering I don't understand how the equation works out I can't express it in that manner.

CRGreathouse 2010-08-30 16:02

[QUOTE=science_man_88;227688]considering I don't understand how the equation works out I can't express it in that manner.[/QUOTE]

OK, well look at my last two posts on the matter and calculate out some terms to tell me if that's what you mean. (I can't do anything further until I see if this is what you mean. I never can -- communication is hard enough in general, and you seem to never give me quite enough information.)

science_man_88 2010-08-30 16:04

I see how the equation works now and I think you are accurate. so now you get what I mean ?

but more specific to s values I haven't found a way to predict them yet if I do I'll let you know. I know that's what you're afraid of.

mdettweiler 2010-08-30 16:06

[quote=3.14159;227683][code]Error occuring in PFGW at Mon Aug 30 10:54:47 2010
Expr = 3460*308^308+1
Detected in MAXERR>0.45 (round off check) in prp_using_gwnum
Iteration: 75/2557 ERROR: ROUND OFF 0.5>0.45
PFGW will automatically rerun the test with -a1[/code][/quote]
Do you by chance know if PFGW successfully reran the test with -a1 (next higher FFT length)? If so, then we're good; if not, we have a problem.

Max :max:

3.14159 2010-08-30 16:10

[QUOTE=Matt]Do you by chance know if PFGW successfully reran the test with -a1 (next higher FFT length)? If so, then we're good; if not, we have a problem.
[/QUOTE]

I tested it with WinPFGW. The tests do work, fortunately.

CRGreathouse 2010-08-30 16:11

110503 = 2^3*(13812+1)-1
132049 = 2^1*(66024+1)-1
216091 = 2^2*(54022+1)-1
756839 = 2^3*(94604+1)-1
859433 = 2^1*(429716+1)-1
1257787 = 2^2*(314446+1)-1
1398269 = 2^1*(699134+1)-1
2976221 = 2^1*(1488110+1)-1
3021377 = 2^1*(1510688+1)-1
6972593 = 2^1*(3486296+1)-1
13466917 = 2^1*(6733458+1)-1

3.14159 2010-08-30 16:18

[QUOTE=CRGreathouse]110503 = 2^3*(13812+1)-1
132049 = 2^1*(66024+1)-1
216091 = 2^2*(54022+1)-1
756839 = 2^3*(94604+1)-1
859433 = 2^1*(429716+1)-1
1257787 = 2^2*(314446+1)-1
1398269 = 2^1*(699134+1)-1
2976221 = 2^1*(1488110+1)-1
3021377 = 2^1*(1510688+1)-1
6972593 = 2^1*(3486296+1)-1
13466917 = 2^1*(6733458+1)-1[/QUOTE]

Are these numbers prime? What's the intent here?

CRGreathouse 2010-08-30 16:19

[QUOTE=3.14159;227695]Are these numbers prime? What's the intent here?[/QUOTE]

They're in reply to posts #1165 and #1172.

science_man_88 2010-08-30 16:21

[QUOTE=CRGreathouse;227694]110503 = 2^3*(13812+1)-1
132049 = 2^1*(66024+1)-1
216091 = 2^2*(54022+1)-1
756839 = 2^3*(94604+1)-1
859433 = 2^1*(429716+1)-1
1257787 = 2^2*(314446+1)-1
1398269 = 2^1*(699134+1)-1
2976221 = 2^1*(1488110+1)-1
3021377 = 2^1*(1510688+1)-1
6972593 = 2^1*(3486296+1)-1
13466917 = 2^1*(6733458+1)-1[/QUOTE]

figures I suck lol well if you take only s sequences that are red you don't hit any that I can find. and knock out Mersenne exponents if you use Mersenne numbers

can we use your disproof for a way to find Mersenne exponents for example all of these seem to use 2^1 2^2 or 2^3 anyways I guess I need a new idea lol.

CRGreathouse 2010-08-30 16:27

[QUOTE=science_man_88;227697]well if you take only s sequences that are red you don't hit any that I can find.[/QUOTE]

Which are red?

[QUOTE=science_man_88;227697]can we use your disproof for a way to find Mersenne exponents for example all of these seem to use 2^1 2^2 or 2^3 anyways I guess I need a new idea lol.[/QUOTE]

If these are randomly distributed (as Dirichlet tells us for primes in general) then you'd expect about half of them to have 2^1, a quarter to have 2^2, and an eighth to have 2^3. That seems to match my numbers reasonably. Here are more terms, you can check them if you like.

3 = 2^2*(0+1)-1
5 = 2^1*(2+1)-1
7 = 2^3*(0+1)-1
13 = 2^1*(6+1)-1
17 = 2^1*(8+1)-1
19 = 2^2*(4+1)-1
31 = 2^5*(0+1)-1
61 = 2^1*(30+1)-1
89 = 2^1*(44+1)-1
107 = 2^2*(26+1)-1
127 = 2^7*(0+1)-1
521 = 2^1*(260+1)-1
607 = 2^5*(18+1)-1
1279 = 2^8*(4+1)-1
2203 = 2^2*(550+1)-1
2281 = 2^1*(1140+1)-1
3217 = 2^1*(1608+1)-1
4253 = 2^1*(2126+1)-1
4423 = 2^3*(552+1)-1
9689 = 2^1*(4844+1)-1
9941 = 2^1*(4970+1)-1
11213 = 2^1*(5606+1)-1
19937 = 2^1*(9968+1)-1
21701 = 2^1*(10850+1)-1
23209 = 2^1*(11604+1)-1
44497 = 2^1*(22248+1)-1
86243 = 2^2*(21560+1)-1
110503 = 2^3*(13812+1)-1
132049 = 2^1*(66024+1)-1
216091 = 2^2*(54022+1)-1
756839 = 2^3*(94604+1)-1
859433 = 2^1*(429716+1)-1
1257787 = 2^2*(314446+1)-1
1398269 = 2^1*(699134+1)-1
2976221 = 2^1*(1488110+1)-1
3021377 = 2^1*(1510688+1)-1
6972593 = 2^1*(3486296+1)-1
13466917 = 2^1*(6733458+1)-1

CRGreathouse 2010-08-30 16:29

Pi: What did you think of [url]http://oeis.org/classic/?q=id%3AA180065|id%3AA180066[/url]?

[QUOTE=3.14159;227699]@CRG: That any numbers of the supposed format you use form composites via 2[sup]p[/sup] - 1 ?

It's painfully obvious that for all those numbers, 2[sup]p[/sup] - 1 is composite.[/QUOTE]

Wrong, see either of my lists.

3.14159 2010-08-30 16:31

[QUOTE=CRGreathouse]Wrong, see either of my lists.
[/QUOTE]

It was then I realized those were the exponents for the prime Mersenne numbers.


[QUOTE=CRGreathouse]Pi: What did you think of [url]http://oeis.org/classic/?q=id%3AA180065|id%3AA180066?[/url][/QUOTE]

You really did expand on them. Excellent. Also: Did you factor the b-file numbers on the list of base 2 pseudoprimes? Or did you generate them on your own?

I'm up to b = 389. I have an idea. I should write the sequence to the OEIS, starting from 60.

science_man_88 2010-08-30 16:36

[QUOTE]3 = 2^2*(0+1)-1
5 = 2^1*(2+1)-1
7 = 2^3*(0+1)-1
13 = 2^1*(6+1)-1
17 = 2^1*(8+1)-1
19 = 2^2*(4+1)-1
31 = 2^5*(0+1)-1
61 = 2^1*(30+1)-1
89 = 2^1*(44+1)-1
107 = 2^2*(26+1)-1
127 = 2^7*(0+1)-1
521 = 2^1*(260+1)-1
607 = 2^5*(18+1)-1
1279 = 2^8*(4+1)-1
2203 = 2^2*(550+1)-1
2281 = 2^1*(1140+1)-1
3217 = 2^1*(1608+1)-1
4253 = 2^1*(2126+1)-1
4423 = 2^3*(552+1)-1
9689 = 2^1*(4844+1)-1
9941 = 2^1*(4970+1)-1
11213 = 2^1*(5606+1)-1
19937 = 2^1*(9968+1)-1
21701 = 2^1*(10850+1)-1
23209 = 2^1*(11604+1)-1
44497 = 2^1*(22248+1)-1
86243 = 2^2*(21560+1)-1
110503 = 2^3*(13812+1)-1
132049 = 2^1*(66024+1)-1
216091 = 2^2*(54022+1)-1
756839 = 2^3*(94604+1)-1
859433 = 2^1*(429716+1)-1
1257787 = 2^2*(314446+1)-1
1398269 = 2^1*(699134+1)-1
2976221 = 2^1*(1488110+1)-1
3021377 = 2^1*(1510688+1)-1
6972593 = 2^1*(3486296+1)-1
13466917 = 2^1*(6733458+1)-1[/QUOTE]

well technically I know way's to put these all into a form 2^1,2^2 or 2^3, but I doubt anything would come to a pattern.

3.14159 2010-08-30 16:41

Humor.
 
Captain Obvious's Conjecture:

For any given base b, k * b[sup]b[/sup] + 1 has an infinite amount of members.

Can you prove or disprove Captain Obvious's conjecture?

CRGreathouse 2010-08-30 16:46

[QUOTE=3.14159;227704]Did you factor the b-file numbers on the list of base 2 pseudoprimes? Or did you generate them on your own?[/QUOTE]

For both I used Jan Fetisma's list of pseudoprimes, which took several CPU-years to calculate with an advanced algorithm.

The graph of A180066 is intriguing and should be studied further.

[QUOTE=3.14159;227704]I'm up to b = 389. I have an idea. I should write the sequence to the OEIS, starting from 60.[/QUOTE]

One sequence for each b? I hope not...

This is better suited to a project page, like [url]http://www.15k.org/riesellist.html[/url]

mdettweiler 2010-08-30 16:46

[quote=3.14159;227693]I tested it with WinPFGW. The tests do work, fortunately.[/quote]
Hmm...I tried testing the number on my own computer to see if the problem is repeatable (indicating a program bug) but it wasn't--the test finished on the first try, no roundoff error. That points to a possible hardware error on your computer. You may want to try running a Prime95 stress test on all cores for a while (12 hours at least) to make sure that you're not throwing bad results here and there and potentially missing primes.

science_man_88 2010-08-30 16:47

[QUOTE=3.14159;227706]Captain Obvious's Conjecture:

For any given base b, k * b[sup]b[/sup] + 1 has an infinite amount of members.

Can you prove or disprove Captain Obvious's conjecture?[/QUOTE]

given k=-infinity to k = infinity

k * b[sup]b[/sup] + 1 will therefore have infinite members because infinite k are involved.

CRGreathouse 2010-08-30 16:47

[QUOTE=3.14159;227706]Captain Obvious's Conjecture:

For any given base b, k * b[sup]b[/sup] + 1 has an infinite amount of members.

Can you prove or disprove Captain Obvious's conjecture?[/QUOTE]

sm solves that in #1186. Assuming you mean prime members, I addressed it in #1138. :cool:

3.14159 2010-08-30 16:48

[QUOTE=CRGreathouse]One sequence for each b? I hope not...
[/QUOTE]

No! The sequence applies to all b!

[quote=Matt]Hmm...I tried testing the number on my own computer to see if the problem is repeatable (indicating a program bug) but it wasn't--the test finished on the first try, no roundoff error. That points to a possible hardware error on your computer. You may want to try running a Prime95 stress test on all cores for a while (12 hours at least) to make sure that you're not throwing bad results here and there and potentially missing primes.
[/quote]

Well, you stated that this happened to you as well, which makes me doubt that it happens to be only me.

And, it only fucks up when dealing with k * 308[sup]308[/sup] + 1. There have been no other errors before or afterwards. I'm going to test the original Primeform to make sure that this is just a minor problem.

science_man_88 2010-08-30 16:49

by the way CRG [url]http://oeis.org/classic/A138576[/url] are the sums of inside the parentheses for 2^1.

science_man_88 2010-08-30 16:53

[QUOTE=3.14159;227711]No! The sequence applies to all b!



Well, you stated that this happened to you as well, which makes me doubt that it happens to be only me.

And, it only [SPOILER]fucks[/SPOILER] up when dealing with k * 308[sup]308[/sup] + 1. There have been no other errors before or afterwards. I'm going to test the original Primeform to make sure that this is just a minor problem.[/QUOTE]

this would be more appropriate.

3.14159 2010-08-30 16:54

Tested the original Primeform, there seems to be no issue. Luckily, I missed no primes.

[QUOTE=science_man_88]this would be more appropriate.
[/QUOTE]

Swearwords. Big deal. Everyone uses them.

CRGreathouse 2010-08-30 16:58

[QUOTE=3.14159;227711]No! The sequence applies to all b![/QUOTE]

So the sequence you're thinking of is the primes themselves?

[QUOTE=3.14159;227711]Well, you stated that this happened to you as well, which makes me doubt that it happens to be only me.

And, it only fucks up when dealing with k * 308[sup]308[/sup] + 1. There have been no other errors before or afterwards. I'm going to test the original Primeform to make sure that this is just a minor problem.[/QUOTE]

I tend to agree, but mdettweiler's advice is good -- better be sure.

science_man_88 2010-08-30 16:59

[QUOTE=3.14159;227715]Tested the original Primeform, there seems to be no issue. Luckily, I missed no primes.



Swearwords. Big deal. Everyone uses them.[/QUOTE]

I only remember using them around family the people that make me most mad most days.

3.14159 2010-08-30 17:01

[QUOTE=CRGreathouse]So the sequence you're thinking of is the primes themselves?
[/QUOTE]

Not at all. I was thinking of the k-values, 1 to 10000, for the b values, and the sequence would be the k-values for b = 60; Followed by k-values for b = 61, b = 62, b = 63, etc,

CRGreathouse 2010-08-30 17:03

[QUOTE=3.14159;227715]Swearwords. Big deal. Everyone uses them.[/QUOTE]

I have to admit, the idea of an innocent child wading through [b]eleven hundred pages[/b] of reasonably complicated math to learn a swear word is fairly amusing to me.

CRGreathouse 2010-08-30 17:04

[QUOTE=3.14159;227720]Not at all. I was thinking of the k-values, 1 to 10000, for the b values, and the sequence would be the k-values for b = 60; Followed by k-values for b = 61, b = 62, b = 63, etc,[/QUOTE]

That seems pretty contrived, I don't know that you should submit that. Maybe the k-values by antidiagonals? But even so, the n >= 60 restriction seems unnatural.

3.14159 2010-08-30 17:08

[QUOTE=CRGreathouse]I have to admit, the idea of an innocent child wading through [B]eleven hundred pages[/B] of reasonably complicated math to learn a swear word is fairly amusing to me.
[/QUOTE]

Would a kid even bother flipping through 1100 pages of math anyway?

[QUOTE=CRGreathouse]That seems pretty contrived, I don't know that you should submit that. Maybe the k-values by antidiagonals? But even so, the n >= 60 restriction seems unnatural.
[/QUOTE]

So you suggest I use b = 2 as a starting point?

CRGreathouse 2010-08-30 17:15

[QUOTE=3.14159;227723]Would a kid even bother flipping through 1100 pages of math anyway?[/QUOTE]

Would a kid read even one?

3.14159 2010-08-30 17:29

[QUOTE=CRGreathouse]Would a kid read even one?
[/QUOTE]

Only if it were basic arithmetic.

mdettweiler 2010-08-30 17:31

[quote=3.14159;227711]Well, you stated that this happened to you as well, which makes me doubt that it happens to be only me.

And, it only :censored: up when dealing with k * 308[sup]308[/sup] + 1. There have been no other errors before or afterwards. I'm going to test the original Primeform to make sure that this is just a minor problem.[/quote]
The errors I encountered before were [i]repeatable[/i], i.e. program errors not hardware errors. Your error is not repeatable, which usually indicates a hardware error. (Sorry for the ambiguity there.)

The same number working just fine with the original Primeform is consistent with what I'd expect with a hardware error. Hardware errors are often not exactly repeatable even with the same test on the same software. Try running k*308^308+1 again with the latest PFGW--my guess is that the error won't show up again. Your issue looks to me like a mild CPU instability; hence my suggestion of a 12-hour Prime95 stress test which should be able to better uncover sporadic errors than lots of tiny tests, many of which can "slip between the errors" and turn out just fine. Also note that many errors are undetectable, i.e. they don't produce visible roundoff errors but nonetheless do not produce the correct residue on tests; your one roundoff error may be a symptom of undetectable errors happening more often. Prime95 will detect these as well.

Oh, and BTW--it's Max, not Matt, though it's a common mistake. (mdett... tends to get alliterated to matt...) :smile:

3.14159 2010-08-30 18:10

[QUOTE=Max]Try running k*308^308+1 again with the latest PFGW--my guess is that the error won't show up again. [/QUOTE]

Are the latest binaries pfgw 3.3.4 ?

mdettweiler 2010-08-30 18:12

[quote=3.14159;227739]Are the latest binaries pfgw 3.3.4 ?[/quote]
Yes. (The latest client is always available from [URL]http://sourceforge.net/projects/openpfgw/files/[/URL].)

3.14159 2010-08-30 18:21

[QUOTE=Max]Yes. (The latest client is always available from [url]http://sourceforge.net/projects/openpfgw/files/[/url].)
[/QUOTE]

That's the version I have.

Also: I'll subject it to p95's wrath later tonight. 12 hours? p95 recommends 16. I just have to decide which 12-hour period to use.

What happens when p95 does catch errors? Blue screen of death? Or does it stop immediately?

mdettweiler 2010-08-30 19:05

[quote=3.14159;227745]That's the version I have.

Also: I'll subject it to p95's wrath later tonight. 12 hours? p95 recommends 16. I just have to decide which 12-hour period to use.

What happens when p95 does catch errors? Blue screen of death? Or does it stop immediately?[/quote]
16 hours is even better. :smile:

As to what happens when an error is found, that depends on the type and severity of the error. If the system is seriously unstable, you can get a BSOD. But in this case, if there is a problem with your system I suspect it's a minor one, in which case Prime95 would stop the stress test upon detecting the error and output the details of the error to the screen and log file.

3.14159 2010-08-30 20:01

[QUOTE=Max]As to what happens when an error is found, that depends on the type and severity of the error. If the system is seriously unstable, you can get a BSOD. But in this case, if there is a problem with your system I suspect it's a minor one, in which case Prime95 would stop the stress test upon detecting the error and output the details of the error to the screen and log file.
[/QUOTE]

To see the logs, I'll move p95 to my main primefinding equipment folder.

3.14159 2010-08-30 21:41

Well, I'm going to be working on the collection of k-b-b's for a while, eliminating the need to search for small b values. (< 500 is what's been done, for now.)

3.14159 2010-08-30 21:54

Commencing work on 501-750.

I got to the range where I predicted the error would happen.

And.. no error has occurred.

Dammit. Let's hope I didn't speak too soon! :no:

3.14159 2010-08-30 22:30

Okay: Back to previous topic:

@CRG: Concerning the OEIS sequence: You suggested I start with b = 2, and continue from there?

CRGreathouse 2010-08-30 22:57

[QUOTE=3.14159;227782]Concerning the OEIS sequence: You suggested I start with b = 2, and continue from there?[/QUOTE]

We need to find a good sequence without arbitrary points. So no minimum of 60 on b and no maximum of 10,000 on k.

I can think of a few ways to do this, but I'll let you decide. One example: consider a two-dimensional array where each row corresponds to a b-value and the values in a row are the least k-values that produce a prime. Then read this array by antidiagonals (or some other reasonable way). The first column is A070855, while the first row is A000040.

Another way: for each prime p, give the largest b value such that there exists a k with k*b^b+1 = p. Then give the values for 2, 3, 5, ....

Maybe both of these are good.


These examples avoid not only the arbitrariness of bounds, but also make ordinary sequences or 'tabl's rather than 'tabf's.

3.14159 2010-08-30 23:12

[QUOTE=CRGreathouse]We need to find a good sequence without arbitrary points. So no minimum of 60 on b and no maximum of 10,000 on k.
[/QUOTE]

Oh.

We can construct it similarly to how the Proth numbers are constructed. Should there be a k < b[sup]b[/sup] restriction? Or do we allow all the 4n + 1 primes in?

CRGreathouse 2010-08-30 23:17

[QUOTE=3.14159;227786]Oh.

We can construct it similarly to how the Proth numbers are constructed. Should there be a k < b[sup]b[/sup] restriction? Or do we allow all the 4n + 1 primes in?[/QUOTE]

My sequences include even b = 1.

Good thought for a third way to do it, though: a sequence of all the primes of the form k*b^b+1, subject to k < b^b.

3.14159 2010-08-30 23:21

[QUOTE=CRGreathouse]Mt sequences include even b = 1.
[/QUOTE]

b can't be 1, or else it would be an exact duplicate of [URL="http://www.research.att.com/~njas/sequences/A000040"]this[/URL].

b has to be greater than 2.

CRGreathouse 2010-08-30 23:23

[QUOTE=3.14159;227789]b can't be 1, or else it would be an exact duplicate of [URL="http://www.research.att.com/~njas/sequences/A000040"]this[/URL].[/QUOTE]

I suppose you didn't understand my suggestions, then, as all three included b = 1 and none of them are the same as A000040.

3.14159 2010-08-30 23:27

[QUOTE=CRGreathouse]I suppose you didn't understand my suggestions, then, as all three included b = 1 and none of them are the same as A000040.
[/QUOTE]

It would in fact be the same because:

(p-1) * 1[sup]1[/sup] + 1 = p

And therefore, can be any odd prime number.

science_man_88 2010-08-30 23:29

[QUOTE=CRGreathouse;227785]We need to find a good sequence without arbitrary points. So no minimum of 60 on b and no maximum of 10,000 on k.

I can think of a few ways to do this, but I'll let you decide. One example: consider a two-dimensional array where each row corresponds to a b-value and the values in a row are the least k-values that produce a prime. Then read this array by antidiagonals (or some other reasonable way). The first column is A070855, while the first row is A000040.

Another way: for each prime p, give the largest b value such that there exists a k with k*b^b+1 = p. Then give the values for 2, 3, 5, ....

Maybe both of these are good.


These examples avoid not only the arbitrariness of bounds, but also make ordinary sequences or 'tabl's rather than 'tabf's.[/QUOTE]

in that case the anti-diagonals read 2,5,3,109 ? Or 2,3,5,109, neither are found in what I'm searching.

CRGreathouse 2010-08-30 23:39

[QUOTE=science_man_88;227792]in that case the anti-diagonals read 2,5,3,109 ? Or 2,3,5,109, neither are found in what I'm searching.[/QUOTE]

I'm sure neither are in.

The canonical antidiagonal mapping functions for the OEIS are
[code]t1(n)=floor(-1/2+sqrt(2+2*n))
t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2)[/code]
so I get
2, 3, 5, 5, 13, 109, 7, 29,163, 257, ...
although flipping rows and columns gives the equally-valid
2, 5, 3, 109, 13, 5, 257, 163, 29, 7, ...
.

3.14159 2010-08-30 23:39

[QUOTE=CRGreathouse]That doesn't match any of my sequences, sorry.
[/QUOTE]

They are irrelevant to what I was discussing.

3.14159 2010-08-30 23:41

If there's no k < b[sup]b[/sup] restriction, b > 1.

If there is a k < b[sup]b[/sup] restriction, b ≥ 1.

CRGreathouse 2010-08-30 23:42

[QUOTE=3.14159;227796]They are irrelevant to what I was discussing.[/QUOTE]

I was quite precise, actually. Admittedly, I didn't define how to read by antidiagonals, but there's a standard way to do that in the OEIS. But regardless, none of them could be interpreted as A000040 except by a person who thinks "antidiagonal" means "row".

science_man_88 2010-08-30 23:43

[QUOTE=CRGreathouse;227795]I'm sure neither are in.

The canonical antidiagonal mapping functions for the OEIS are
[code]t1(n)=floor(-1/2+sqrt(2+2*n))
t2(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2)[/code]
so I get
2, 3, 5, 5, 13, 109, 7, 29,163, 257, ...
although flipping rows and columns gives the equally-valid
2, 5, 3, 109, 13, 5, 257, 163, 29, 7, ...
.[/QUOTE]

closest I find is [url]http://www.research.att.com/~njas/sequences/A097453[/url]

3.14159 2010-08-30 23:45

[QUOTE=CRGreathouse]I was quite precise, actually. Admittedly, I didn't define how to read by antidiagonals, but there's a standard way to do that in the OEIS. But regardless, none of them could be interpreted as A000040 except by a person who thinks "antidiagonal" means "row".
[/QUOTE]

If there is no k < b[sup]b[/sup] restriction, and b = 1 is allowed, it is precisely the same as A000040.

I will begin work on the sequence with the k < b[sup]b[/sup] restriction.

CRGreathouse 2010-08-30 23:49

[QUOTE=3.14159;227797]If there is a k < b[sup]b[/sup] restriction, b ≥ 1.[/QUOTE]

That was my third suggestion.

[QUOTE=3.14159;227797]If there's no k < b[sup]b[/sup] restriction, b > 1.[/QUOTE]

That would be a fourth way to do it. It has relative density ≈ 0.528 in the primes.

science_man_88 2010-08-30 23:49

[QUOTE=3.14159;227801]If there is no k < b[sup]b[/sup] restriction, and b = 1 is allowed, it is precisely the same as A000040.

I will begin work on the sequence with the k < b[sup]b[/sup] restriction.[/QUOTE]

sorry CRG I see what he means today lol k*2^1+1 can give all primes.

3.14159 2010-08-30 23:51

Also: Is there a command or script that allows printing in numerical order?

CRGreathouse 2010-08-30 23:51

[QUOTE=3.14159;227801]If there is no k < b[sup]b[/sup] restriction, and b = 1 is allowed, it is precisely the same as A000040.[/QUOTE]

Neither of my first two sequences restrict k to be less than b^b and both allow b = 1, but neither is A000040. I invite you to re-read #1209.

science_man_88 2010-08-30 23:51

[QUOTE=3.14159;227804]Also: Is there a command or script that allows printing in numerical order?[/QUOTE]

maybe vecsort could help you in pari but I'm not sure how to use it.

CRGreathouse 2010-08-30 23:52

[QUOTE=3.14159;227804]Also: Is there a command or script that allows printing in numerical order?[/QUOTE]

If you put the numbers in a vector, you can use vecsort to order them. vecsort(v) returns a sorted version of v, while vecsort(v,,8) returns a sorted version of v with the duplicates removed.

CRGreathouse 2010-08-30 23:55

[QUOTE=science_man_88;227806]maybe vecsort could help you in pari but I'm not sure how to use it.[/QUOTE]

Bingo! sm88 beat me to it.

science_man_88 2010-08-30 23:56

[QUOTE=CRGreathouse;227808]Bingo! sm88 beat me to it.[/QUOTE]

calls for a celebration I think that's a first lol.

CRGreathouse 2010-08-30 23:57

[QUOTE=science_man_88;227803]sorry CRG I see what he means today lol k*2^1+1 can give all primes.[/QUOTE]

You can see that I understand that, since I mention A000040 explicitly in post #1209. But none of my three sequences are equal to A000040, as even a cursory examination will show.

CRGreathouse 2010-08-30 23:58

[QUOTE=science_man_88;227809]calls for a celebration I think that's a first lol.[/QUOTE]

I'll lift a glass in your honor. (Literally, why not!)

science_man_88 2010-08-30 23:59

[QUOTE=CRGreathouse;227810]You can see that I understand that, since I mention A000040 explicitly in post #1209. But none of my three sequences are equal to A000040, as even a cursory examination will show.[/QUOTE]

oh wait k*b^b+1 would give k*1+1 for b=1 still all the primes I think.

doh I fell to his thinking lol.

CRGreathouse 2010-08-31 00:05

[QUOTE=science_man_88;227812]oh wait k*b^b+1 would give k*1+1 for b=1 still all the primes I think.[/QUOTE]

Indeed. This the first *row* in the array calculated by my first suggestion is precisely the prime numbers, A000040. But the sequence is not its first row. It starts 2, 3, 5, 5, 13, 109, ... and so is clearly different from A000040. The second sequence is about half 1s and so is clearly distinct from the primes; it starts 1, 1, 2, 1, 1, 2, 2, 1, ... if I haven't made any mistakes. The third sequence is 5, 13, 109,163, ...

science_man_88 2010-08-31 00:15

finally a question on Pari commands again:

how do you make alter and print the antidiagonals of a matrix:

CRGreathouse 2010-08-31 00:21

[QUOTE=science_man_88;227814]finally a question on Pari commands again:

how do you make alter an print the antidiagonals of a matrix:[/QUOTE]

[url=http://mersenneforum.org/showpost.php?p=227795&postcount=1216]#1216[/url] has details. If you have a matrix T, you flatten it with vector(100,n,T[t1(n)+1, t2(n)+1]). If you have a function T, you flatten it with vector(100,n,T(t1(n)+1, t2(n)+1)). (The +1s are if you want it to be 1-based instead of 0-based; remove otherwise.) Of course you can replace 100 with whatever number you like.

3.14159 2010-08-31 00:25

[QUOTE=CRGreathouse]Indeed. This the first *row* in the array calculated by my first suggestion is precisely the prime numbers, A000040. But the sequence is not its first row. It starts 2, 3, 5, 5, 13, 109, ... and so is clearly different from A000040. The second sequence is about half 1s and so is clearly distinct from the primes; it starts 1, 1, 2, 1, 1, 2, 2, 1, ... if I haven't made any mistakes. The third sequence is 5, 13, 109,163, ...
[/QUOTE]

The sequence, with the restriction is:

2, 3, 5, 109, 163, 257, 271, 379, 433, 487, 541, 769, 3329, 7681, 7937, 9473, 10753, 11777, 12289, 13313, 14081, 14593, 15361, 17921, 18433, 19457, 22273, 23041, 23297, 25601, 26113, 26881, 30977, 31489, 32257, 36097, 36353, 37501, 37633, 37889, 39937, 40193, 40961, 41729, 43777, 45569, 46337, 49409, 49921, 50177, 51713, 57089, 57601, 58369, 59393, 60161, 61441, 62501, 64513, 65537, ...

science_man_88 2010-08-31 00:27

[QUOTE=CRGreathouse;227815][url=http://mersenneforum.org/showpost.php?p=227795&postcount=1216]#1216[/url] has details. If you have a matrix T, you flatten it with vector(100,n,T[t1(n)+1, t2(n)+1]). If you have a function T, you flatten it with vector(100,n,T(t1(n)+1, t2(n)+1)). (The +1s are if you want it to be 1-based instead of 0-based; remove otherwise.) Of course you can replace 100 with whatever number you like.[/QUOTE]

heres a better first question lol how do you originally create the matrix ? or am I missing something do you just map vectors into another vector ?

CRGreathouse 2010-08-31 00:30

[QUOTE=science_man_88;227817]heres a better first question lol how do you originally create the matrix ?[/QUOTE]

Ah. Well, Pi here has a whole thread devoted to that topic... maybe he'll post instructions there and you can help him on his project. :smile:

CRGreathouse 2010-08-31 00:33

[QUOTE=3.14159;227816]The sequence, with the restriction is:

2, 3, 5, 109, 163, 257, 271, 379, 433, 487, 541, 769, 3329, 7681, 7937, 9473, 10753, 11777, 12289, 13313, 14081, 14593, 15361, 17921, 18433, 19457, 22273, 23041, 23297, 25601, 26113, 26881, 30977, 31489, 32257, 36097, 36353, 37501, 37633, 37889, 39937, 40193, 40961, 41729, 43777, 45569, 46337, 49409, 49921, 50177, 51713, 57089, 57601, 58369, 59393, 60161, 61441, 62501, 64513, 65537, ...[/QUOTE]

What is this, exactly?

science_man_88 2010-08-31 00:35

[QUOTE=CRGreathouse;227818]Ah. Well, Pi here has a whole thread devoted to that topic... maybe he'll post instructions there and you can help him on his project. :smile:[/QUOTE]

did he start if if not this will be hard for me to find lol.

science_man_88 2010-08-31 00:36

I found how to make a matrix but I don't see how the way they make it differs from a vector.

3.14159 2010-08-31 00:37

[QUOTE=CRGreathouse]What is this, exactly?
[/QUOTE]

1. What I sent to the OEIS.
2. The sequence with the restriction. (k * b[sup]b[/sup] + 1, k < b[sup]b[/sup])

science_man_88 2010-08-31 00:38

I got the matrix formed and vectors to fill it but can you get it to print them as rows not just all at once ?

CRGreathouse 2010-08-31 00:46

[QUOTE=3.14159;227816]The sequence, with the restriction is:

2, 3, 5, 109, 163, 257, 271, 379, 433, 487, 541, 769, 3329, 7681, 7937, 9473, 10753, 11777, 12289, 13313, 14081, 14593, 15361, 17921, 18433, 19457, 22273, 23041, 23297, 25601, 26113, 26881, 30977, 31489, 32257, 36097, 36353, 37501, 37633, 37889, 39937, 40193, 40961, 41729, 43777, 45569, 46337, 49409, 49921, 50177, 51713, 57089, 57601, 58369, 59393, 60161, 61441, 62501, 64513, 65537, ...[/QUOTE]

[QUOTE=3.14159;227824]The sequence with the restriction. (k * b[sup]b[/sup] + 1, k < b[sup]b[/sup])[/QUOTE]

So why is 2 a member? Why is 3 a member? Why is 13 not a member? Why is 65537 a member?

I get
[code]5, 13, 109, 163, 257, 271, 379, 433, 487, 541, 769, 3329, 7681, 7937, 9473, 10753, 11777, 12289, 13313, 14081, 14593, 15361, 17921, 18433, 19457, 22273, 23041, 23297, 25601, 26113, 26881, 30977, 31489, 32257, 36097, 36353, 37501, 37633, 37889, 39937, 40193, 40961, 41729, 43777, 45569, 46337, 49409, 49921, 50177, 51713, 57089, 57601, 58369, 59393, 60161, 61441, 62501, 64513, 112501, 118751, 131251, 139969, 150001, 193751, 206251, 212501, 262501, 281251, 287501, 318751, 325001, 326593, 418751, 431251, 437501, 450001, 466561, 506251, 525001, 562501, 568751, 606251, 643751, 681251, 700001, 731251, 737501, 746497, 756251, 768751, 812501, 825001, 839809, 862501, 900001, 918751, 937501, 943751, 1068751, 1073089, 1093751, 1125001, 1162501, 1166401, 1168751, 1213057, 1237501, 1331251, 1350001, 1387501, 1393751, 1492993, 1539649, 1556251, 1637501, 1650001, 1656251, 1675001, 1706251, 1726273, 1731251, 1806251, 1862501, 1968751, 1987501, 2031251, 2043751, 2068751, 2081251, 2099521, 2100001, 2118751, 2125001, 2156251, 2218751, 2256251, 2287501, 2293751, 2350001, 2362501, 2379457, 2387501, 2400001, 2425001, 2426113, 2443751, 2512501, 2537501, 2550001, 2593751, 2606251, 2625001, 2662501, 2725001, 2743751, 2775001, 2799361, 2800001, 2837501, 2875001, 2912501, 2925001, 2950001, 2962501, 3032641, 3037501, 3131251, 3150001, 3175001, 3294173, 3300001, 3312577, 3337501, 3343751, 3381251, 3405889, 3437501, 3512501, 3543751, 3581251, 3600001, 3643751, 3656251, 3700001, 3718751, 3731251, 3750001, 3756251, 3787501, 3825793, 3868751, 3918751, 3937501, 3993751, 4068751, 4093751, 4106251, 4181251, 4187501, 4218751, 4237501, 4312501, 4331251, 4368751, 4387501, 4393751, 4406251, 4506251, 4543751, 4562501, 4575001, 4581251, 4618751, 4631251, 4712501, 4725001, 4750001, 4758913, 4762501, 4825001, 4837501, 4893751, 4900001, 4945537, 4956251, 4975001, 4987501, 5031251, 5038849, 5087501, 5106251, 5132161, 5143751, 5162501, 5181251, 5193751, 5237501, 5287501, 5362501, 5365441, 5368751, 5381251, 5400001, 5481251, 5493751, 5556251, 5575001, 5593751, 5612501, 5687501, 5725001, 5762501, 5831251, 5837501, 5925001, 5925313, 6006251, 6025001, 6056251, 6065281, 6100001, 6112501, 6118751, 6137501, 6187501, 6225001, 6268751, 6318751, 6343751, 6381251, 6487501, 6531251, 6550001, 6581251, 6600001, 6618751, 6625001, 6625153, 6671809, 6750001, 6756251, 6806251, 6825001, 6858433, 6887501, 6900001, 6937501, 6943751, 6956251, 6981251, 6993751, 6998401, 7018751, 7087501, 7091713, 7106251, 7168751, 7256251, 7262501, 7275001, 7281251, 7300001, 7371649, 7393751, 7406251, 7518751, 7543751, 7631251, 7687501, 7698241, 7712501, 7768751, 7900001, 7950001, 8050001, 8062501, 8071489, 8106251, 8137501, 8156251, 8162501, 8164801, 8175001, 8193751, 8211457, 8235431, 8256251, 8268751, 8293751, 8312501, 8387501, 8443751, 8550001, 8631251, 8681251, 8700001, 8706251, 8737501, 8775001, 8850001, 8856251, 8864641, 8875001, 8893751, 8906251, 8911297, 8925001, 8950001, 8981251, 8987501, 9118751, 9137501, 9191233, 9237889, 9287501, 9300001, 9337501, 9343751, 9356251, 9362501, 9375001, 9393751, 9487501, 9493751, 9550001, 9606251, 9657793, 9712501, 9737501, 9750001, 9937729, 10031041, 10497601, 11010817, 11337409, 11803969, 12597121, 13156993, 13763521, 14043457, 14090113, 14230081, 14510017, 14556673, 14696641, 14789953, 14836609, 15069889, 15443137, 15536449, 15909697, 16329601, 16469569, 16562881, 16702849, 16796161, 17122753, 17356033, 17496001, 18522433, 18942337, 19268929, 19688833, 19828801, 19968769, 20901889, 20995201, 21041857, 21088513, 21974977, 22254913, 22768129, 22908097, 23001409, 23234689, 23421313, 23561281, 23654593, 23841217, 24074497, 24401089, 25007617, 25287553, 25334209, 25707457, 25800769, 26220673, 26453953, 26500609, 26827201, 26920513, 27900289, 27993601, 28000463, 28086913, 28133569, 28460161, 28600129, 28740097, 28973377, 29253313, 29486593, 29626561, 29906497, 30093121, 30139777, 30466369, 30559681, 30792961, 31352833, 31492801, 31866049, 32006017, 32239297, 32332609, 32565889, 32659201, 32941721, 32985793, 33825601, 33872257, 34292161, 34385473, 34525441, 34805377, 34852033, 35271937, 35971777, 36484993, 36671617, 36764929, 36998209, 37231489, 37698049, 37931329, 38397889, 38631169, 38724481, 39051073, 39191041, 39284353, 39331009, 39657601, 39890881, 40264129, 40357441, 40404097, 40590721, 40824001, 41057281, 41197249, 41383873, 41523841, 41803777, 41850433, 41990401, 42037057, 42363649, 42456961, 42596929, 42783553, 42970177, 43016833, 43156801, 43250113, 43296769, 43483393, 43530049, 43856641, 44136577, 44416513, 44463169, 44603137, 45116353, 45396289, 45489601, 45629569, 45722881, 45816193, 45956161, 46189441, 46422721, 46562689, 46702657, 46935937, 47169217, 47215873, 47402497, 47589121, 47869057, 48148993, 48755521, 48895489, 49035457, 49082113, 49502017, 50155201, 50621761, 50948353, 51321601, 52068097, 52301377, 52348033, 52394689, 52581313, 53281153, 53327809, 54214273, 54447553, 55100737, 55194049, 55987201, 56313793, 56593729, 56733697, 56966977, 57246913, 57480193, 57526849, 57713473, 57900097, 58553281, 58693249, 59299777, 59859649, 60186241, 60559489, 60932737, 61119361, 61632577, 63032257, 63078913, 63265537, 63358849, 63452161, 63685441, 63778753, 64012033, 64431937, 64525249, 64898497, 65178433, 65318401, 65411713, 65458369, 65831617, 66344833, 66531457, 67091329, 67277953, 67464577, 67651201, 67744513, 67791169, 68257729, 68724289, 68910913, 69050881, 69564097, 69750721, 70357249, 70963777, 71290369, 71383681, 71663617, 71850241, 72316801, 72690049, 72923329, 73156609, 73296577, 73529857, 74789569, 74882881, 74929537, 74976193, 75349441, 75489409, 76142593, 76329217, 76422529, 76515841, 76889089, 77215681, 77262337, 77915521, 78148801, 78382081, 78475393, 78848641, 79060129, 79175233, 79221889, 79548481, 79595137, 79688449, 79828417, 79921729, 80015041, 80061697, 80481601, 80808193, 81041473, 81414721, 81554689, 81974593, 82021249, 82487809, 83047681, 83327617, 83794177, 83980801, 84001387, 84074113, 84307393, 84494017, 84820609, 85240513, 85940353, 85987009, 86406913, 86453569, 86593537, 86640193, 86920129, 87246721, 87293377, 87526657, 87619969, 88506433, 88646401, 88693057, 89159617, 89486209, 89952769, 90186049, 90372673, 90605953, 90652609, 90792577, 90839233, 91212481, 92425537, 93312001, 93545281, 93778561, 93871873, 94758337, 94851649, 94944961, 95224897, 95458177, 95784769, 96437953, 96671233, 96811201, 96904513, 97137793, 97324417, 97417729, 97744321, 97837633, 98490817, 98817409, 99190657, ...[/code]
though I can't post much of what I have.

3.14159 2010-08-31 00:59

[QUOTE=CRGreathouse]So why is 2 a member? Why is 3 a member? Why is 13 not a member? Why is 65537 a member?
[/QUOTE]

Ah. Didn't see that. Correct those, please?
My computer is subject to p95 at the moment.

CRGreathouse 2010-08-31 01:03

[QUOTE=3.14159;227828]Ah. Didn't see that. Correct those, please?
My computer is subject to p95 at the moment.[/QUOTE]

If you already submitted it I'll have to wait until the next time Neil updates. But I suppose I needed to edit it regardless to add my b-file...

What is the sequence number?

3.14159 2010-08-31 04:04

[QUOTE=CRGreathouse]If you already submitted it I'll have to wait until the next time Neil updates. But I suppose I needed to edit it regardless to add my b-file...
[/QUOTE]

I made errors everywhere! I need to repair Karsten's database! :sad: + :max:

CRGreathouse 2010-08-31 04:12

Do you have the Sloane A-number? (It should be in the confirmation email.) I can use that to store my b-file until the sequence shows up.

science_man_88 2010-08-31 10:46

[QUOTE=CRGreathouse;227811]I'll lift a glass in your honor. (Literally, why not!)[/QUOTE]

well I can give you a few reasons lol 1) hangover (I'm not allowed to drink so luckily I've never got one)

2) if you can't understand Pi when sober will drinking really help that ?

science_man_88 2010-08-31 10:49

[QUOTE=science_man_88;227825]I got the matrix formed and vectors to fill it but can you get it to print them as rows not just all at once ?[/QUOTE]

I realized I can just use print(v[i])) for matrix v.

no I can't lol.

science_man_88 2010-08-31 10:55

[QUOTE=science_man_88;227869]well I can give you a few reasons lol 1) hangover (I'm not allowed to drink so luckily I've never got one)

2) if you can't understand Pi when sober will drinking really help that ?[/QUOTE]

oh wait I forgot it's him that needs to understand you drink away lol

3.14159 2010-08-31 12:38

[QUOTE=CRGreathouse]Do you have the Sloane A-number? (It should be in the confirmation email.) I can use that to store my b-file until the sequence shows up.
[/QUOTE]

A180362!

CRGreathouse 2010-08-31 13:03

[QUOTE=science_man_88;227870]I realized I can just use print(v[i])) for matrix v.[/QUOTE]

With
[code]M=[1,2;3,4][/code]
you can use
[code]M[2,1][/code]
to show the element in the second row, first column.

3.14159 2010-08-31 14:25

Reached the halfway point for 501 to 750.

science_man_88 2010-08-31 17:30

[QUOTE=CRGreathouse;227882]With
[code]M=[1,2;3,4][/code]
you can use
[code]M[2,1][/code]
to show the element in the second row, first column.[/QUOTE]

that isn't quite what I wanted I figure it out though now I can make a multiplication table lol.

science_man_88 2010-08-31 17:41

maybe not lol I can't get one thing to work lol if I could I can generate a multiplication table.

CRGreathouse 2010-08-31 18:33

[QUOTE=science_man_88;227921]that isn't quite what I wanted[/QUOTE]

That's the difficulty, isn't it -- I can only know what you write, not what you want.

[QUOTE=science_man_88;227926]maybe not lol I can't get one thing to work lol if I could I can generate a multiplication table.[/QUOTE]

[code]for(x=1,9,for(y=1,9,print1(x*y" "));print())[/code]
does a rough job. You'll have to work a bit more to get the columns to line up.

science_man_88 2010-08-31 18:48

well I was going to try to use matrices to do it but:

[CODE]multiplication(i,j)= x=Mat([]);for(i=1,i,for(j=1,j,x(i,j)=i*j));return(x(i,j))[/CODE]

was the best I could do I think

CRGreathouse 2010-08-31 18:50

Use [] for accessing the elements of vectors and matrices, not ().

I'm not sure why you're using one here, though. You fill in a multiplication table, pull out one element, throw the table away, then return the one element.

3.14159 2010-08-31 20:04

Well, I'm finishing up on b = 501-750.

I have 10 values left.

science_man_88 2010-08-31 20:16

[QUOTE=CRGreathouse;227936]Use [] for accessing the elements of vectors and matrices, not ().

I'm not sure why you're using one here, though. You fill in a multiplication table, pull out one element, throw the table away, then return the one element.[/QUOTE]

1) I couldn't get [] to work for matrices
2) I wanted the whole table but I couldn't get it all to print


All times are UTC. The time now is 23:20.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.