Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6524 > unrolled thread

Re: How to force integers

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-11-19 11:47 +0000
Last post2011-11-19 11:47 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to force integers DrMajorBob <btreat1@austin.rr.com> - 2011-11-19 11:47 +0000

#6524 — Re: How to force integers

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-11-19 11:47 +0000
SubjectRe: How to force integers
Message-ID<ja8514$igo$1@smc.vnet.net>
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@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@yahoo.com

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web