MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A problem in Pi digits as Lattice space filling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93892] Re: A problem in Pi digits as Lattice space filling
  • From: Roger Bagula <rlbagula at sbcglobal.net>
  • Date: Fri, 28 Nov 2008 05:05:48 -0500 (EST)
  • References: <ggj7co$j2i$1@smc.vnet.net>

Looking at the BBP digits modulo 4
by this lattice fill type of program:

Clear[f, n]
f[0] = 1;
f[n_Integer /; n > 0] := Module[{cnt, m, p},
   cnt = 0; m = Table[0, Evaluate[Apply[Sequence, Table[{4}, {n}]]]];
   p = Partition[Table[Floor[
        Mod[(4/(8*k + 1) - 2/(8*k + 4) - 1/(
            8*k + 5) - 1/(8*k + 6))*16^k, 4]], {k, 0, 20*4^n}] , n, 1];
   For[i = 1, i <= 20*4^n - n + 1, i++,
      If[m[[Apply[
            Sequence, p[[i]] +
                1]]]++ == 0, If[++cnt == 4^n, Print[i]; Break[]]];
   ]
];
Table[f[n], {n, 0, 5}]
a = {1, 6, 43, 323, 2208, 8084}

>
>  
>


  • Prev by Date: How to hold a form and convert it to a string
  • Next by Date: Re: NSum bug or am I doing something wrong?
  • Previous by thread: Re: A problem in Pi digits as Lattice space filling
  • Next by thread: Re: Re: A problem in Pi digits as Lattice space filling