Given the set a = {0, 2, A2}, B = {1, a}, if a ∪ B = {0, 1, 2, 4}, then the value of real number a is______ .

Given the set a = {0, 2, A2}, B = {1, a}, if a ∪ B = {0, 1, 2, 4}, then the value of real number a is______ .

According to the meaning of the topic, if the set a = {0, 2, A2}, B = {1, a}, and a ∪ B = {0, 1, 2, 4}, then a = 4, or a = 2, a = 4, a = {0, 2, 16}, B = {1, 4}, a ∪ B = {0, 1, 2, 4, 16}, which is not suitable for the topic; if a = 2, a = {0, 2, 4}, B = {1, 2}, a ∪ B = {0, 1, 2, 4}, which is consistent; so a = 2