![]() |
|
|
#1 |
|
May 2004
22×79 Posts |
On page 19 of " number theory" by Borevich and Shefarevich you will find a sequence that leads to 7-adic numbers. The sequence depends on the solution of a linear equation at every stage. An alternate method using pari is illustrated below:
10 = = 3 (mod 7) 108== 10(mod 7^2) 451 = = 108 (mod 7^3) we now use code: {is(n) = Mod((108 + 343*n),7^4)^2 = = 2}; select (is,[1..100]). we get a sequence of numbers satisfying the code. The smallest value of n obtained is 6 leading to the next member of above sequence: 2166. Thus we have obtained a sequence ( using pari) without having to solve any linear equation.This can be continued indefinitely. |
|
|
|
|
|
#2 |
|
"Curtis"
Feb 2005
Riverside, CA
22×1,217 Posts |
Why did you use 108 rather than 59 in the second congruence?
|
|
|
|
|
|
#3 | |
|
Aug 2006
3·1,993 Posts |
Quote:
|
|
|
|
|
|
|
#4 |
|
Feb 2017
Nowhere
13·359 Posts |
|
|
|
|
|
|
#5 |
|
Aug 2006
597910 Posts |
The GP code in A034945 just uses the built-in p-adic type. It takes 9 milliseconds to find the 100,000-th term on my machine. devaraj, feel free to compare to your code, I'm not sure how to extend it to that case. As a quick check my answer has 84,510 decimal digits and is of the form
Code:
259265345916500277712186481134963754311965201010586807205594069157787134361146417423434312945701993552539489...9746222274903009641714981399405417166669775352016495125084837567091444060752850366048748957882425104 In fairness, it errors out if I ask for the millionth term: Code:
> a(10^6) *** _+_: Warning: increasing stack size to 40000000. *** _+_: Warning: increasing stack size to 80000000. *** at top-level: a(10^6) *** ^------- *** in function a: truncate(sqrt(2+O(7^n))) *** ^--------- *** _+_: overflow in precp(). *** Break loop: type 'break' to go back to GP prompt Last fiddled with by CRGreathouse on 2018-06-27 at 14:51 |
|
|
|
|
|
#6 |
|
May 2004
22×79 Posts |
|
|
|
|
|
|
#7 |
|
May 2004
13C16 Posts |
|
|
|
|
|
|
#8 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pari- p-adic numbers | devarajkandadai | Software | 0 | 2017-09-23 04:31 |
| LLL in GP/Pari | paul0 | Programming | 2 | 2015-11-17 13:04 |
| PARI vs GAP | skan | Miscellaneous Math | 0 | 2012-12-16 00:13 |
| pari | devarajkandadai | Programming | 21 | 2012-08-31 18:08 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |