Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6531
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to force integers |
| Date | 2011-11-19 11:50 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ja855u$iin$1@smc.vnet.net> (permalink) |
| 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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: How to force integers Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-11-19 11:50 +0000
csiph-web