Background
In the beginning, God created the heavens and the earth. (Genesis 1:1) [ESV]
בראשית ברא אלהים את השמים ואת הארץ
In the beginning God made the sky and the earth. (LXX-Genesis 1:1)
ἐν ἀρχῇ ἐποίησεν ὁ θεὸς τὸν οὐρανὸν καὶ τὴν γῆν
First, not everyone agrees the meaning of the Hebrew בראשית (rendered as ἐν ἀρχῇ in the LXX) should be understood as "in the beginning." For example, Robert D. Homlstedt maintains "in the beginning" is grammatically indefensible. He states a correct understanding of Genesis 1:1-3 should reflect the phrase is not pointing to the beginning and offers this translation:
“In the beginning period that God created the heavens and earth (the earth was formless and void, and darkness was over the surface of the deep, and the wind of God was hovering over the surface of the waters), God said, ‘Let light be!'”1
Holmstedt's argument is based on the Hebrew and he cites the LXX as support for the position syntax demands a beginning period from among potentially multiple periods or stages.2
The use of בְּרֵאשִׁ֗ית elsewhere in Scripture does not support this position. Rather it is context which determines whether the beginning is correct.
Second, the Prologue repeats the phrase before making mention of things made:
1: In the beginning was the Word, and the Word was with God, and the Word was God
ἐν ἀρχῇ ἦν ὁ λόγος καὶ ὁ λόγος ἦν πρὸς τὸν θεόν καὶ θεὸς ἦν ὁ λόγος
2: He was in the beginning with God
οὗτος ἦν ἐν ἀρχῇ πρὸς τὸν θεόν
3: All things were made through him, and without him was not any thing made that was made
πάντα δι᾽ αὐτοῦ ἐγένετο καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ ἕν ὃ γέγονεν
If there is an allusion to Genesis 1:1 then is that allusion for both phrases or just one? A secondary question is if just one, then which one, and what does the other phrase refer to; or if both, then what purpose does the repetition serve?
Genesis 1
As a standalone narrative, Genesis is complete. When one begins reading at Genesis 1, "in the beginning" makes sense since the context of what follows depicts the making of the physical universe. However, an allusion in the Gospel has the entire Old Testament and possibly the New Testament in view. In that case, since the reader knows there are created things which are not detailed or found in Genesis 1, the beginning is not necessarily correct. Because creation encompasses more than what is detailed in Genesis, an understanding such as Holmstedt offers is more accurate (though not for the reason he cites).
For example, there is no mention in Genesis of the making of angelic beings and so it is possible Genesis 1:1 is not speaking to "the beginning of creation." In fact, it is clear darkness exists "in the beginning" despite there being no detail of when or how it came into being, a fact the writer of the Gospel would know:
forming light, and making darknesses, making peace, and forming evil; I am the LORD, doing all these things. (Isaiah 45:7 WYC)
יוצר אור ובורא חשך עשה שלום ובורא רע אני יהוה עשה כל־אלה
I am the one who has prepared light and made darkness, who makes peace and creates evils; I am the Lord who does all these things. (LXX-Isaiah 45:7)
ἐγὼ ὁ κατασκευάσας φῶς καὶ ποιήσας σκότος ὁ ποιῶν εἰρήνην καὶ κτίζων κακά ἐγὼ κύριος ὁ θεὸς ὁ ποιῶν ταῦτα πάντα
Just as it was God who made בָּרָא (or ποιέω) the heavens and the earth in Genesis 1:1, it was YHVH who made בָּרָא (or ποιέω) darkness which is present in Genesis 1:2. The text implies darkness was present before "the beginning." Darkness has a significant place in the Prologue and throughout the Gospel; it is vital to clarify the relationship of the Word "in the beginning" to the darkness which was (already) present.
John 1
John is drawing attention to Genesis 1:1 when he begins with ἐν ἀρχῇ, but I believe he is also clarifying בראשית and it is the second ἐν ἀρχῇ which alludes to Genesis 1:1. The first functions to resolve any uncertainty the reader may have about "the" beginning as recorded in Genesis:
In the beginning was the Word and the Word was with God and the Word was God. This was in the beginning with God [who made the heavens and the earth]. All things were made through Him, and without Him was not any thing made that was made. [The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God was hovering over the face of the waters.]
Placing the Word in the beginning before Genesis 1:1 strengthens the fact John is conveying the eternal (preexistent) nature of the Word. In addition, allusion to Genesis 1:1 in John 1:2 removes the potential for misinterpreting the Word as referring to an utterance of God found in Genesis when "God said..."
Notes:
1. Robert D. Holmstedt, Genesis 1.1-3, Hebrew Grammar, and Translation, November 11, 2011. See also The Restrictive Syntax of Genesis i 1.
2. Ibid.