Let

be an enumeration of

(or

--- I'll just drop the mention unless it is significantly different). Recall

vanishes at

, and this serves as our building block.

Start with

,

. There are now two variants to how we choose the sequence

--- either we use a cardinality argument, or we construct a power series directly.

**Cardinality argument**: We choose

sufficiently small so that

converges uniformly on compacts, e.g., let

be a sequence of positive reals such that

and

. Then the limit

is analytic and

for all

(since only finitely many summands are nonzero at

). Now the choice of sequence

bijects with the continuum, but there are only countably many polynomials in

(or

for rational case).

Of course, you can dress that up in a diagonal argument instead --- choose your

sufficiently small and yet

disagrees with

, where

is an enumeration of

(or

).

**Constructing power series directly**: Note that

, so if we let

(say) we have the coefficients of various

's will not interfere with each other, so it remains to choose the coefficients

. Now choose

with size sufficiently rapidly decreasing so the

converges on compacts (and for the rational case, it is easy to make it transcendence --- indeed in this case this is guaranteed by the arbitrarily long string of zeros).