Re: May we trust IntegerQ ?

• To: mathgroup at smc.vnet.net
• Subject: [mg107508] Re: May we trust IntegerQ ?
• From: Raffy <adraffy at gmail.com>
• Date: Mon, 15 Feb 2010 05:47:10 -0500 (EST)
• References: <hl8t3l\$26h\$1@smc.vnet.net>

```On Feb 14, 5:16 am, Artur <gra... at csl.pl> wrote:
> Procedure: find such x that ChebyshevT[x/2, x] isn't integer
> aa = {}; Do[ If[IntegerQ[ChebyshevT[x/2, x]], , AppendTo[aa, x]], {x, 0,
> 20}]; aa
> and answer Mathematica is set:
> {3, 5, 7, 9, 11, 13, 15, 17, 19}
> where occered e.g. number 7
> N[ChebyshevT[7/2, 7],100]
> 5042.00000000000000000000000000000000000000000000000000000000000000000\
> 0000000000000000000000000000000
> evidently is integer 5042
>
> Best wishes
> Artur

IntegerQ is equivalent to: Head[#] === Integer &

To explicitly test if an expression is not an Integer:  NotElement[#,
Integers] &

Select[Range[20], NotElement[ChebyshevT[#/2, #], Integers] &] === {3,
5, 9, 11, 13, 15}

```

• Prev by Date: Re: May we trust IntegerQ ?
• Next by Date: can't get ListVectorPlot3D to work.
• Previous by thread: Re: May we trust IntegerQ ?
• Next by thread: Re: May we trust IntegerQ ?