It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.
9 = 7 + 2 x 12
15 = 7 + 2 x 22
21 = 3 + 2 x 32
25 = 7 + 2 x 32
27 = 19 + 2 x 22
33 = 31 + 2 x 12
It turns out that the conjecture was false.
Find the smallest odd composite that cannot be written as the sum of a prime and twice a square.
Information at Project Euler 046
Getting Started
Select Show Solution to show the solution. Select Hide Solution to hide the solution.
User Stories
As a user, I can show or hide the solution by selecting the appropriate button.
As a user, I expect the function goldbachsOtherConjecture()
to return a number.
As a user, I expect the function goldbachsOtherConjecture()
to return 5777.
User Stories on function goldbachsOtherConjecture()
taken from FreeCodeCamp - Coding Interview Prep - Project Euler 046
Information Architecture
The function goldbachsOtherConjecture()
returns a number.
Allows the user to show or hide the solution to the problem as described in Project Euler 046.
Uses HTML5, CSS3, JavaScript, Bootstrap 5.2.2 and Google Fonts.
Ensure all user stories have been met.
Deployed on GitHub Pages at the main branch.
Written by me.