mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2010-08-31, 00:05   #1233
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
oh wait k*b^b+1 would give k*1+1 for b=1 still all the primes I think.
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, ...
CRGreathouse is offline   Reply With Quote
Old 2010-08-31, 00:15   #1234
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

finally a question on Pari commands again:

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

Last fiddled with by science_man_88 on 2010-08-31 at 00:20
science_man_88 is offline   Reply With Quote
Old 2010-08-31, 00:21   #1235
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175B16 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
finally a question on Pari commands again:

how do you make alter an print the antidiagonals of a matrix:
#1216 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.
CRGreathouse is offline   Reply With Quote
Old 2010-08-31, 00:25   #1236
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

24·3·5·7 Posts
Default

Quote:
Originally Posted by 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, ...
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, ...

Last fiddled with by 3.14159 on 2010-08-31 at 00:27
3.14159 is offline   Reply With Quote
Old 2010-08-31, 00:27   #1237
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
#1216 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.
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 ?
science_man_88 is offline   Reply With Quote
Old 2010-08-31, 00:30   #1238
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
heres a better first question lol how do you originally create the matrix ?
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.
CRGreathouse is offline   Reply With Quote
Old 2010-08-31, 00:33   #1239
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by 3.14159 View Post
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, ...
What is this, exactly?
CRGreathouse is offline   Reply With Quote
Old 2010-08-31, 00:35   #1240
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

203008 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
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.
did he start if if not this will be hard for me to find lol.
science_man_88 is offline   Reply With Quote
Old 2010-08-31, 00:36   #1241
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

I found how to make a matrix but I don't see how the way they make it differs from a vector.
science_man_88 is offline   Reply With Quote
Old 2010-08-31, 00:37   #1242
3.14159
 
3.14159's Avatar
 
May 2010
Prime hunting commission.

69016 Posts
Default

Quote:
Originally Posted by CRGreathouse
What is this, exactly?
1. What I sent to the OEIS.
2. The sequence with the restriction. (k * bb + 1, k < bb)

Last fiddled with by 3.14159 on 2010-08-31 at 00:38
3.14159 is offline   Reply With Quote
Old 2010-08-31, 00:38   #1243
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

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 ?
science_man_88 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do I sometimes see all the <> formatting commands when I quote or edit? cheesehead Forum Feedback 3 2013-05-25 12:56
Passing commands to PARI on Windows James Heinrich Software 2 2012-05-13 19:19
Ubiquity commands Mini-Geek Aliquot Sequences 1 2009-09-22 19:33
64-bit Pari? CRGreathouse Software 2 2009-03-13 04:22
Are these commands correct? jasong Linux 2 2007-10-18 23:40

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


Fri Aug 6 23:13:52 UTC 2021 up 14 days, 17:42, 1 user, load averages: 4.55, 4.31, 4.10

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.