Generalized Planning in PDDL Domains with Pretrained Large Language Models