Find the Generating Function for the following sequences
$a)1,4,16,64,256$
$b)2,4,8,16,32\cdots $
My Attempt-: $a)G\left ( x \right )=\sum_{n=0}^{n=4}4^{k}x^{k}=\sum_{n=0}^{n=4}\left ( 4x \right )^{k}=\frac{\left ( 4x \right )^{5}-1}{4x-1}$
$b)G\left ( x \right )=\sum_{n=1}^{n=\infty}2^{n}x^{n}=\frac{1}{1-2}$
Is My Attempt right ?