Search Problems   RSS Feed
projecteuler.net

123-Separable

 Published on Saturday, 17th December 2022, 07:00 pm and solved by 257
Difficulty: Level 35 [89%]

Problem 821

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 $$(S\cup 2S \cup 3S)\cap \{1,2,3,\ldots,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(10^{16})$.



Copied to Clipboard