Alice has an even number of n beads, and each bead has a number from 1 to n painted on it. She would like to make a necklace out of all the beads, with a special requirement: any two beads next to each other on the necklace must sum to a prime number. Alice needs your help to calculate how many ways it is possible to do so.
Answers
Answered by
1
let suppose,
we have n beads in even quantity.
all are painted.
4 is even number, so that n=4
so that there are two methods to make necklace out of all the beads.
and last bead should connect to the 1st bead.
n=1 2 3 4
or n=1 4 3 2
Attachments:
Similar questions