← Complete problem index

PROJECT EULER · #0821

123-Separable

Statement only · UnsolvedOriginal problem ↗

A set, S, of integers is called 123-separable if S, 2S and 3S are disjoint. Here 2S and 3S are obtained by multiplying all the elements in S by 2 and 3 respectively.

Define F(n) to be the maximum number of elements of (S2S3S){1,2,3,,n} where S ranges over all 123-separable sets.

For example, F(6)=5 can be achieved with either S={1,4,5} or S={1,5,6}.
You are also given F(20)=19.

Find F(1016).

Write-up coming later

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