The term “child” means (1) the child or legally adopted child of an individual, (2) a stepchild who has been such stepchild for not less than one year immediately preceding the day on which application for child’s insurance benefits is filed or (if the insured individual is deceased) not less than nine months immediately preceding the day on which such individual died, and (3) a person who is the grandchild or stepgrandchild of an individual or his spouse, but only if (A) there was no natural or adoptive parent (other than such a parent who was under a disability, as defined in section 423(d) of this title ) of such person living at the time (i) such individual became entitled to old-age insurance benefits or disability insurance benefits or died, or (ii) if such individual had a period of disability which continued until such individual became entitled to old-age insurance benefits or disability insurance benefits, or died, at the time such period of disability began, or (B) such person was legally adopted after the death of such individual by such individual’s surviving spouse in an adoption that was decreed by a court of competent jurisdiction within the United States and such person’s natural or adopting parent or stepparent was not living in such individual’s household and making regular contributions toward such person’s support at the time such individual died. For purposes of clause (1), a person shall be deemed, as of the date of death of an individual, to be the legally adopted child of such individual if such person was either living with or receiving at least one-half of his support from such individual at the time of such individual’s death and was legally adopted by such individual’s surviving spouse after such individual’s death but only if (A) proceedings for the adoption of the child had been instituted by such individual before his death, or (B) such child was adopted by such individual’s surviving spouse before the end of two years after (i) the day on which such individual died or (ii) August 28, 1958 . For purposes of clause (2), a person who is not the stepchild of an individual shall be deemed the stepchild of such individual if such individual was not the mother or adopting mother or the father or adopting father of such person and such individual and the mother or adopting mother, or the father or adopting father, as the case may be, of such person went through a marriage ceremony resulting in a purported marriage between them which, but for a legal impediment described in the last sentence of subsection (h)(1)(B), would have been a valid marriage. For purposes of clause (2), a child shall be deemed to have been the stepchild of an individual for a period of one year throughout the month in which occurs the expiration of such one year. For purposes of clause (3), a person shall be deemed to have no natural or adoptive parent living (other than a parent who was under a disability) throughout the most recent month in which a natural or adoptive parent (not under a disability) dies.
42 USC § 416(e)
For the purposes of this subchapter