# Numbering in phenolphthalein versus ascorbic acid

According to Wikipedia, the recommended IUPAC name for phenolphthalein is 3,3-bis(4-hydroxyphenyl)-2-benzofuran-1(3⁠H)-one, and for ascorbic acid is (5⁠R)-5-[(1⁠S)-1,2-dihydroxyethyl]-3,4-dihydroxyfuran-2(5⁠H)-one.

Why does the numbering in phenolphthalein start from the $\ce{O}$ atom next carbon atom, while in ascorbic acid it starts on the $\ce{O}$ atom? If we want to prioritize the keto group, why doesn't the numbering start on the carbonyl carbon? And other groups attached to the furan on both molecules don't seem prioritize any of the 2 counting.

The subsituents do not take the highest priority here, rather, it is the parent molecule that determines the numbering. According IUPAC's organic chemistry book for nomenclature, the Blue Book, for heteromonocyclic components fused to a benzene ring:

P-25.2.2.4 (...) The presence of a single heteroatom determines the numbering in a monocyclic compound; the heteroatom has the locant ‘1’.

This gives the following numbering for the isomers of benzofuran:

The parent molecule of ascorbic acid is a furan ring, for which the numbering is dictated by skeletal replacement ('a') nomenclature:

P-15.4.1.2 For naming and numbering purposes, the following decreasing order of seniority is followed: $\ce{F}$ > $\ce{Cl}$ > $\ce{Br}$ > $\ce{I}$ > $\ce{At}$ > $\ce{O}$ > $\ce{S}$ > $\ce{Se}$ > $\ce{Te}$ > $\ce{Po}$ > $\ce{N}$ > $\ce{P}$ > $\ce{As}$ > $\ce{Sb}$ > $\ce{Bi}$ > $\ce{C}$ > $\ce{Si}$ > $\ce{Ge}$ > $\ce{Sn}$ > $\ce{Pb}$ > $\ce{B}$ > $\ce{Al}$ > $\ce{Ga}$ > $\ce{In}$ > $\ce{Tl}$.

According to the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book), heteromonocyclic parent structures with three through ten ring members and containing one or more heteroatoms are generally named by using the extended Hantzsch-Widman system; however, retained names (such as furan) are preferred for several heteromonocyclic compounds. When a single heteroatom is present in the ring, it is assigned the locant ‘1’.

P-22.2.2.1 Constructing and numbering Hantzsch-Widman names

P-22.2.2.1.1 (…) The presence of a single heteroatom determines the numbering in a monocyclic compound; the heteroatom has the locant ‘1’ and the numbering usually proceeds clockwise, when unsubstituted.
(…)

Furthermore, the numbering for heteromonocyclic with retained names is explicitly shown in Table 2.2 of Subsection P-22.2.1.

Therefore, the oxygen atom in furan has the locant ‘1’.

Accordingly, the oxygen atom in the furan ring of ascorbic acid has the locant ‘1’, too, which leads to the systematic name (5⁠R)-5-[(1⁠S)-1,2-dihydroxyethyl]-3,4-dihydroxyfuran-2(5⁠H)-one.

In phenolphthalein, the furan ring is fused to a benzene ring. The rules for such compounds read as follows:

P-25.2.2.4 Heteromonocyclic components fused to a benzene ring

Unless listed as a retained name (…), a benzene ring fused to a heteromonocycle of five or more members (a benzoheterocycle) is named by placing the locant(s) indicating the position(s) of the heteroatom(s) at the front of the name consisting of the fusion prefix ‘benzo’ followed by a retained name, a Hantzsch-Widman systematic name, or a name formed by skeletal replacement (‘a’) nomenclature (…). The locants cited correspond to the full bicyclic structure. As in Hantzsch-Widman names, locants are placed in the order corresponding to the order of citation of the heteroatoms in the heterocyclic component. The locant ‘1’ is always assigned to the atom of the heterocyclic component next to a fusion atom. Heteroatoms are allocated lowest locants as a set, without regard to kind; if there is a choice, lowest locants are assigned in accordance with the seniority of the ‘a’ prefixes (…). In general nomenclature locants may be omitted when the name is unambiguous; for preferred IUPAC names locants must be cited. The letter ‘o’ of the ‘benzo’ prefix is elided when followed by a vowel. Indicated hydrogen is placed at the front of the name, when required.
(…)

Accordingly, the systematic name of phenolphthalein contains the name of the parent structure ‘benzofuran’, which consists of the prefix ‘benzo’ followed by the retained name ‘furan’. The locant ‘1’ is assigned to the atom of the heterocyclic component next to a fusion atom. Therefore, the oxygen atom in the furan ring of phenolphthalein has the locant ‘2’. The locant indicating the position of the heteroatom is placed at the front of the name, which leads to the name ‘2-benzofuran’ for the parent structure in phenolphthalein.

Accordingly, the oxygen atom of the furan ring of phenolphthalein has the locant ‘2’, too, which leads to the systematic name 3,3-bis(4-hydroxyphenyl)-2-benzofuran-1(3⁠H)-one.