MathGroup Archive 2011

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

Search the Archive

Re: How to force integers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122977] Re: How to force integers
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 19 Nov 2011 06:45:48 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <sig.0303901581.4EC6438F.5080306@csl.pl>

On 18 Nov 2011, at 12:37, Artur wrote:

> Table[(7/10 - (6/5)*(-1)^
>      n*(1/2)*(f^(15*(2 n - 1)) - (1/f)^(15 (2 n - 1))) + (1/
>       20)*(f^(30 (2 n - 1)) + (1/f)^(30 (2 n - 1)))) /.
>  f -> GoldenRatio, {n, 1, 10}]
>
> Is possible to force integers without use Round or Floor of numeric values?
>
> Best wishes
> Artur
> P.S. If You haveany  idea please together to group send also copy to me privately because I have dayly import of meesages from mathgroup.


The brute force way does not work that well:

FunctionExpand[
   Table[(7/
        10 - (6/5)*(-1)^
         n*(1/2)*(f^(15*(2 n - 1)) - (1/f)^(15 (2 n - 1))) + (1/
          20)*(f^(30 (2 n - 1)) + (1/f)^(30 (2 n - 1)))) /.
     f -> GoldenRatio, {n, 1, 10}]] // FullSimplify

Select[%, Element[#, Integers] &]

{93844,322001299796379844}


But if you use a little mathematics it's not very hard:

FF[f_, n_] := (7/
    10 - (6/5)*(-1)^
     n*(1/2)*(f^(15*(2 n - 1)) - (1/f)^(15 (2 n - 1))) + (1/
      20)*(f^(30 (2 n - 1)) + (1/f)^(30 (2 n - 1))))

ff = MinimalPolynomial[GoldenRatio, z]
z^2 - z - 1


Table[PolynomialRemainder[FF[z, i], ff, z], {i, 1, 10}]

 =
{93844,322001299796379844,1114592308630995805123571151844,3858108676488182444301031186675778188809844,13354661111806898918013326915229994453818137920195953844,46226529205379101535753002137929887361907500739491537481331321383844,160010949322145952773860086493177869262966073764598370932427950656393852476099844,553870349842207826713557631069951923197518136739527343011649668972409965997313866676253301844,1917196077730360379396905729379390922093236623252862757213367138733759339591732105556176108739747928389844,6636283746750176594270824850360024773860275215653614881604406793661771442602555440763226294492207181462603574958963844}


Andrzej Kozlowski



  • Prev by Date: Data binning with CUDA
  • Next by Date: Integrating a rotated function inbetween two circles
  • Previous by thread: Re: How to force integers
  • Next by thread: Re: How to force integers