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)

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 ?


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

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