/project-euler-046

Find the smallest odd composite that cannot be written as the sum of a prime and twice a square as described in https://projecteuler.net/problem=46

Primary LanguageHTML

Project Euler 046 - Goldbach's Other Conjecture

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

UX

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.

Features

Allows the user to show or hide the solution to the problem as described in Project Euler 046.

Technologies

Uses HTML5, CSS3, JavaScript, Bootstrap 5.2.2 and Google Fonts.

Testing

Ensure all user stories have been met.

Deployment

Deployed on GitHub Pages at the main branch.

Credits

Content

Written by me.

Acknowledgements