[seqfan] Re: Primes in Pi

Maximilian Hasler maximilian.hasler at gmail.com
Sun Oct 23 17:02:30 CEST 2011


I get another value for a(22), the difference might arise from a leading zero :

a(n)=my(p=Pi/100*n=10^n);until(ispseudoprime((p*=10)\1%n) & p%n*10>n,);p\1%n

for(i=1,42,print(i" "a(i)))

1 3
2 31
3 653
4 4159
5 14159
6 314159
7 1592653
8 28841971
9 795028841
10 5926535897
11 93238462643
12 141592653589
13 9265358979323
14 23846264338327
15 841971693993751
16 8628034825342117
17 89793238462643383
18 348253421170679821
19 3832795028841971693
20 89793238462643383279
21 338327950288419716939
22 9334461284756482337867
23 88419716939937510582097
24 384626433832795028841971
25 2384626433832795028841971
26 41592653589793238462643383
27 169399375105820974944592307
28 2384626433832795028841971693
29 86783165271201909145648566923
30 238462643383279502884197169399
31 7019385211055596446229489549303
32 34211706798214808651328230664709
33 145648566923460348610454326648213
34 9323846264338327950288419716939937
35 53589793238462643383279502884197169
36 897932384626433832795028841971693993
37 9502884197169399375105820974944592307
38 31415926535897932384626433832795028841
39 749445923078164062862089986280348253421
40 2602491412737245870066063155881748815209
41 15926535897932384626433832795028841971693
42 679821480865132823066470938446095505822317

Maximilian




On Sun, Oct 23, 2011 at 9:03 AM, Richard Mathar
<mathar at strw.leidenuniv.nl> wrote:
>
> On behalf of http://list.seqfan.eu/pipermail/seqfan/2011-October/015623.html
>
> Assuming that A104842 is correct we have the following Maple program and b104841.txt:
> A104842 := [
> 1, 1, 8, 3, 2, 1, 4, 34, 30, 5, 15, 2, 6, 17, 36, 82, 12, 87, 26, 12, 25, 133, 35, 18, 17, 3, 41, 17, 234, 17, 167, 92, 251, 15, 9, 12, 31, 1, 57, 290, 4, 99, 98, 502, 48, 164, 198, 201, 128, 7, 363, 143, 11, 138, 196, 32, 230, 82, 292, 515, 334, 186, 176, 223, 57, 135, 35
> ];
>
> Digits := 800 ;
> dgsPi := proc(strt,len)
>        Pi*10^(strt+len-2) ;
>        floor(%) ;
>        modp(%,10^len) ;
> end proc:
> for n from 1 to nops(A104842 ) do
>        printf("%d %a\n",n, dgsPi(op(n,A104842),n)) ;
> end do;
>
>
> 1 3
> 2 31
> 3 653
> 4 4159
> 5 14159
> 6 314159
> 7 1592653
> 8 28841971
> 9 795028841
> 10 5926535897
> 11 93238462643
> 12 141592653589
> 13 9265358979323
> 14 23846264338327
> 15 841971693993751
> 16 8628034825342117
> 17 89793238462643383
> 18 348253421170679821
> 19 3832795028841971693
> 20 89793238462643383279
> 21 338327950288419716939
> 22 582231725359408128481
> 23 88419716939937510582097
> 24 384626433832795028841971
...



More information about the SeqFan mailing list