In Jack's piggy bank, there is a collection of pennies, nickels, dimes, and quarters which amounts to $2.87.The number of quarters is one less than twice the number of nickels. There are 4 more pennies than nickels.
The number of dimes is twice the number of pennies. How many coins of each kind are there?
p+5n+10d+25q=287
q=2n-1
p=n+4
d=2p
substitution:
d=2n+8
n+4+5n+20n+80+50n-25=287
76n+59=287
76n=228
n=$\boxed{3}$
q=$\boxed{5}$
p=$\boxed{7}$
d=$\boxed{14}$