mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-08-14, 19:08   #452
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
Thanks, axn. I tend to forget that not everyone is a computer programmer.
I program a bit (pari only recently) just never heard the term.
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 19:12   #453
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

A006516 and A019279 is there a similar way to get these if so once we find a way to get one of the three to work only for the correct indexes we can apply it to the other 2.
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 19:13   #454
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

175B16 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
I program a bit (pari only recently) just never heard the term.
Maybe I should have used the term dynamic programming instead? It just seemed a little highfalutin when all I meant was "don't redo what you already did".
CRGreathouse is offline   Reply With Quote
Old 2010-08-14, 19:22   #455
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
A006516 and A019279 is there a similar way to get these if so once we find a way to get one of the three to work only for the correct indexes we can apply it to the other 2.
A006516 is 22n-1 - 2n-1, so let's look at
\sum_{n=1}^{x-1}2^{2n-1}-2^{n-1}=\sum_{n=1}^{x-1}2^{2n-1}-\sum_{n=1}^{x-1}2^{n-1}=1/2\left(\sum_{n=1}^{x-1}4^n-\sum_{n=1}^{x-1}2^n\right)=1/2\left(\frac{4^x-4}{4-1}-\frac{2^x-2}{2-1}\right)=\frac{2^{2x-1}-2}{3}-\frac{2^{x-1}-1}{1}

Can you take this the rest of the way?
CRGreathouse is offline   Reply With Quote
Old 2010-08-14, 19:32   #456
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

\frac{2^{2x-1}-2}{3}-\frac{2^{x-1}-1}{1}

3 times the first gives:

2^{2x-1}-2 add 1 and you get 2^{p=2x-1}-1


so both can become Mersenne numbers.

Last fiddled with by science_man_88 on 2010-08-14 at 20:27
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 19:46   #457
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

838410 Posts
Default

the second term's numerator could be turned into a mersenne prime but I doubt that helps the other numerator or fraction.
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 20:09   #458
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the second term's numerator could be turned into a mersenne prime but I doubt that helps the other numerator or fraction.
You should be paying attention to the first term, I think, since that's about one-third of the number you want.
CRGreathouse is offline   Reply With Quote
Old 2010-08-14, 20:17   #459
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the second term's numerator could be turned into a mersenne prime but I doubt that helps the other numerator or fraction.
I'm an idiot the second term's numerator is a Mersenne where p=x-1


times the first by 3 and add 1 to the -2 to get -1 and we get another Mersenne with p=2x-1. so these can be transformed to Mersenne numbers since we have an equation maybe it's time to apply it.
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 20:19   #460
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
times the first by 3 and add 1 to the -2 to get -1 and we get another Mersenne with p=2x-1. so these can be transformed to Mersenne numbers since we have an equation maybe it's time to apply it.
Write out the full equation first and make sure it's right.
CRGreathouse is offline   Reply With Quote
Old 2010-08-14, 20:28   #461
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

\frac{2^{2x-1}-2}{3}-\frac{2^{x-1}-1}{1}

3 times the first gives:

2^{2x-1}-2 add 1 and you get 2^{p=2x-1}-1


so both can become Mersenne numbers
science_man_88 is offline   Reply With Quote
Old 2010-08-14, 20:31   #462
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

I meant with the sum. 2^{2x-1}-1=2^{2x-1}-1 is a boring equation.
CRGreathouse is offline   Reply With Quote
Reply



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 22:54.


Fri Aug 6 22:54:22 UTC 2021 up 14 days, 17:23, 1 user, load averages: 4.43, 4.20, 3.98

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.