Commands follows
511 clear 512 history 513 history -d 505 514 history 515 history -d 507 510 513 516 history 517 history -d 509 518 hist
Try the following:
for i in {511..520}; do history -d $i; echo "history -d $i"; done