MathGroup Archive 2011

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

Search the Archive

Re: How to force integers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122972] Re: How to force integers
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sat, 19 Nov 2011 06:44:54 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <sig.0303901581.4EC6438F.5080306@csl.pl>
  • Reply-to: drmajorbob at yahoo.com

Because

ff = MinimalPolynomial[GoldenRatio, z];
tableFF = Table[FF[z, i], {i, 1, 10}];
quotients = Table[ PolynomialQuotient[FF[z, i], ff, z], {i, 1, 10}];
remainders = Table[PolynomialRemainder[FF[z, i], ff, z], {i, 10}];
tableFF == ff quotients + remainders // Simplify

True

and both

ff /. z -> GoldenRatio // FullSimplify

0

(obvious from the definition of MinimalPolynomial)

and

IntegerQ /@ remainders

{True, True, True, True, True, True, True, True, True, True}

(also obvious, from Andrzej's output)

Bobby

On Fri, 18 Nov 2011 06:05:49 -0600, Andrzej Kozlowski <akoz at mimuw.edu.pl>  
wrote:

>
> 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


-- 
DrMajorBob at yahoo.com



  • Prev by Date: What is the point of having Initializations in DynamicModule and Manipulate?
  • Next by Date: Re: NIntegrate to compute LegendreP approximations to functions
  • Previous by thread: Re: How to force integers
  • Next by thread: Pattern replacement