← Complete problem index

PROJECT EULER · #0846

Magic Bracelets

Statement only · UnsolvedOriginal problem ↗

A bracelet is made by connecting at least three numbered beads in a circle. Each bead can only display 1, 2, or any number of the form pk or 2pk for odd prime p.

In addition a magic bracelet must satisfy the following two conditions:

  • no two beads display the same number
  • the product of the numbers of any two adjacent beads is of the form x2+1
0846_diagram.jpg

Define the potency of a magic bracelet to be the sum of numbers on its beads.

The example is a magic bracelet with five beads which has a potency of 155.

Let F(N) be the sum of the potency of each magic bracelet which can be formed using positive integers not exceeding N, where rotations and reflections of an arrangement are considered equivalent. You are given F(20)=258 and F(102)=538768.

Find F(106).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.