Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2013

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

Search the Archive

Extract Integers

  • To: mathgroup at
  • Subject: [mg131416] Extract Integers
  • From: Dana DeLouis <dana01 at>
  • Date: Sun, 21 Jul 2013 04:23:57 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Hi.  I've run out of ideas.  Does anyone know the proper way to extract all the integers from the following simplified version of a larger problem I'm working on?

equ=Series[Exp[x],{x,0,5}] //Normal


When trying to extract all the integers, I understand numbers like 120 are part of Rational[1,120]

equ //FullForm

<< Not shown here >>

I thought looking at all LevelSpec was the solution, but apparently not.

Cases[equ, _Integer, Infinity]

(* Or *)

Position[equ, _Integer, Infinity]

Extract[equ, %]

Both ways extract from the numerator, but I just can't seem to extract the {2,6,24,120} inside the denominator.
Does anyone know the proper way?
Thanks in advance.  :>~

Mac & Math 9

  • Prev by Date: Re: keep special functions unexpanded
  • Next by Date: Re: keep special functions unexpanded
  • Previous by thread: Graduate student new to Mathematica would like to hire a tutor in
  • Next by thread: Re: Extract Integers