# Investigating the density of special integers

I was working on a problem earlier and came up with a solution using the following type of integers:

Call an integer $n \geq 3$ convenient if the following hold:

1. $n$ is a squarefree odd integer
2. if $\frac{n-1}{2}$ is even, then $\frac{n-1}{2} + 3$ is squarefree
3. if $\frac{n-1}{2}$ is odd, then $\frac{n-1}{2} + 2$ is squarefree

So as an example, $1997$ is a convenient integer as $1997 = 2*998 + 1$ and $998 + 3 = 1001$ is squarefree, As is $6551$ since $6551 = 2*3275 + 1$ and $3275 + 2 = 3277$ is squarefree.

I am interested in the density of convenient integers. Using a bruteforce program I found that there are $32$ convenient integers below $100$, $322658$ below $10^6$, $32263455$ below $10^8$, and $322634174$ below $10^9$.

Now from looking at this data, it appears that the ratio of convenient integers to integers approaches some constant.

I am not sure if there is any method to determine what this is (if it is actually non-zero). I was wondering if anyone has any ideas, or maybe if someone is able to generate more data using a better approach.

• Can you say something about how this is recreational mathematics? Commented Nov 4, 2013 at 22:04
• This is mathematics done "just for fun".
– Tim
Commented Nov 5, 2013 at 4:46
• Usually the term "recreational mathematics" refers to mathematics of a certain kind, not to the mindset of those who are involved with it, per se. Your problem is serious mathematics. Cheers! Commented Nov 5, 2013 at 5:28

This density is equal to the density of the set of integers $n$ such that both $n$ and $n+1$ are squarefree. This density is $$\prod_{p} \left( 1-\frac{2}{p^2} \right) = 0.3226340989...$$ This is known as the Feller-Tornier constant.