TITLE: Question on OEIS A000085
QUESTION [7 upvotes]: The OEIS sequence A000085 is defined by
$$ a_n \!=\! (n-1)a_{n-2} + a_{n-1} \;\text{with }\; a_0\!=\!1, a_1\!=\!1.$$
If $n$ of the form  $b^2-b+1, b \in \mathbb{N}, b > 2, \;\text{then: }\;$ $$ \left\lfloor \frac{a_n}{a_{n-1}} \right\rfloor > \left\lfloor \frac{a_{n-1}}{a_{n-2}} \right\rfloor$$
How to prove this?

REPLY [3 votes]: Let $q_n$ be the quotient
$$q_n=\frac{a_n}{a_{n-1}}\ .$$
It may be useful to see the numerical values for the first terms of the $q$-sequence:
$$
\scriptsize
\begin{array}{|r|l||r|l||r|l||r|l||r|l|}
\hline
n & q(n) & n & q(n)  & n & q(n)  & n & q(n)  & n & q(n) 
\\\hline
1 &  1.0000000 & 41 &  6.8807053 & 81 &  9.4846377 & 121 & 11.4876422 & 161 & 13.1779753 \\\hline
2 & \color{blue}{ 2.0000000} & 42 & \color{blue}{ 6.9586914} & 82 &  9.5401259 & 122 & 11.5330579 & 162 & 13.2173548 \\\hline
3 & \color{red}{ 2.0000000} & 43 & \color{red}{ 7.0356175} & 83 &  9.5952744 & 123 & 11.5782873 & 163 & 13.2566128 \\\hline
4 &  2.5000000 & 44 &  7.1117592 & 84 &  9.6500913 & 124 & 11.6233328 & 164 & 13.2957503 \\\hline
5 &  2.6000000 & 45 &  7.1869362 & 85 &  9.7045808 & 125 & 11.6681966 & 165 & 13.3347684 \\\hline
6 & \color{blue}{ 2.9230769} & 46 &  7.2613608 & 86 &  9.7587503 & 126 & 11.7128808 & 166 & 13.3736682 \\\hline
7 & \color{red}{ 3.0526316} & 47 &  7.3349008 & 87 &  9.8126038 & 127 & 11.7573877 & 167 & 13.4124509 \\\hline
8 &  3.2931034 & 48 &  7.4077213 & 88 &  9.8661482 & 128 & 11.8017192 & 168 & 13.4511174 \\\hline
9 &  3.4293194 & 49 &  7.4797254 & 89 &  9.9193876 & 129 & 11.8458774 & 169 & 13.4896687 \\\hline
10 &  3.6244275 & 50 &  7.5510426 & 90 & \color{blue}{ 9.9723281} & 130 & 11.8898645 & 170 & 13.5281060 \\\hline
11 &  3.7590564 & 51 &  7.6216021 & 91 & \color{red}{10.0249738} & 131 & 11.9336822 & 171 & 13.5664302 \\\hline
12 & \color{blue}{ 3.9262662} & 52 &  7.6915065 & 92 & 10.0773304 & 132 & \color{blue}{11.9773327} & 172 & 13.6046423 \\\hline
13 & \color{red}{ 4.0563388} & 53 &  7.7607042 & 93 & 10.1294019 & 133 & \color{red}{12.0208177} & 173 & 13.6427433 \\\hline
14 &  4.2048605 & 54 &  7.8292772 & 94 & 10.1811936 & 134 & 12.0641392 & 174 & 13.6807341 \\\hline
15 &  4.3294803 & 55 &  7.8971884 & 95 & 10.2327092 & 135 & 12.1072989 & 175 & 13.7186157 \\\hline
16 &  4.4646191 & 56 & \color{blue}{ 7.9645039} & 96 & 10.2839538 & 136 & 12.1502987 & 176 & 13.7563891 \\\hline
17 &  4.5837324 & 57 & \color{red}{ 8.0311975} & 97 & 10.3349311 & 137 & 12.1931404 & 177 & 13.7940551 \\\hline
18 &  4.7087680 & 58 &  8.0973227 & 98 & 10.3856456 & 138 & 12.2358257 & 178 & 13.8316147 \\\hline
19 &  4.8226559 & 59 &  8.1628614 & 99 & 10.4361009 & 139 & 12.2783562 & 179 & 13.8690687 \\\hline
20 & \color{blue}{ 4.9397378} & 60 &  8.2278576 & 100 & 10.4863015 & 140 & 12.3207337 & 180 & 13.9064181 \\\hline
21 & \color{red}{ 5.0487979} & 61 &  8.2922992 & 101 & 10.5362507 & 141 & 12.3629597 & 181 & 13.9436637 \\\hline
22 &  5.1594060 & 62 &  8.3562227 & 102 & 10.5859526 & 142 & 12.4050360 & 182 & \color{blue}{13.9808064} \\\hline
23 &  5.2640568 & 63 &  8.4196203 & 103 & 10.6354106 & 143 & 12.4469640 & 183 & \color{red}{14.0178471} \\\hline
24 &  5.3692538 & 64 &  8.4825227 & 104 & 10.6846284 & 144 & 12.4887454 & 184 & 14.0547865 \\\hline
25 &  5.4698949 & 65 &  8.5449253 & 105 & 10.7336094 & 145 & 12.5303816 & 185 & 14.0916254 \\\hline
26 &  5.5704717 & 66 &  8.6068541 & 106 & 10.7823571 & 146 & 12.5718742 & 186 & 14.1283648 \\\hline
27 &  5.6674683 & 67 &  8.6683071 & 107 & 10.8308746 & 147 & 12.6132247 & 187 & 14.1650054 \\\hline
28 &  5.7640320 & 68 &  8.7293062 & 108 & 10.8791653 & 148 & 12.6544344 & 188 & 14.2015481 \\\hline
29 &  5.8577107 & 69 &  8.7898516 & 109 & 10.9272322 & 149 & 12.6955049 & 189 & 14.2379934 \\\hline
30 & \color{blue}{ 5.9507395} & 70 &  8.8499619 & 110 & \color{blue}{10.9750786} & 150 & 12.7364375 & 190 & 14.2743424 \\\hline
31 & \color{red}{ 6.0413902} & 71 &  8.9096386 & 111 & \color{red}{11.0227073} & 151 & 12.7772336 & 191 & 14.3105957 \\\hline
32 &  6.1312693 & 72 & \color{blue}{ 8.9688979} & 112 & 11.0701214 & 152 & 12.8178946 & 192 & 14.3467540 \\\hline
33 &  6.2191477 & 73 & \color{red}{ 9.0277422} & 113 & 11.1173236 & 153 & 12.8584218 & 193 & 14.3828182 \\\hline
34 &  6.3061933 & 74 &  9.0861857 & 114 & 11.1643169 & 154 & 12.8988164 & 194 & 14.4187889 \\\hline
35 &  6.3915252 & 75 &  9.1442315 & 115 & 11.2111039 & 155 & 12.9390799 & 195 & 14.4546668 \\\hline
36 &  6.4760013 & 76 &  9.2018921 & 116 & 11.2576875 & 156 & \color{blue}{12.9792134} & 196 & 14.4904528 \\\hline
37 &  6.5589859 & 77 &  9.2591710 & 117 & 11.3040700 & 157 & \color{red}{13.0192183} & 197 & 14.5261474 \\\hline
38 &  6.6411159 & 78 &  9.3160793 & 118 & 11.3502543 & 158 & 13.0590957 & 198 & 14.5617514 \\\hline
39 &  6.7219299 & 79 &  9.3726209 & 119 & 11.3962428 & 159 & 13.0988469 & 199 & 14.5972655 \\\hline
40 &  6.8019052 & 80 &  9.4288057 & 120 & 11.4420380 & 160 & 13.1384730 & 200 & 14.6326903 \\\hline
\end{array}
$$
The code producing the table is given at the end.
So (at least empirically so far) the sequence is increasing, has the asymptotic $O(\sqrt n)$, and jumps over the integers
as shown at the colored places:

for $\color{blue}n$ in the "blue" list
$\color{blue}{1\cdot 2}=2$,
$\color{blue}{2\cdot 3}=6$,
$\color{blue}{3\cdot 4}=12$,
$\color{blue}{4\cdot 5}=20$ ... an entry which is $\le$ then respectively
$2,3,4,5$ ... , and
for $\color{red}n$ in the "red" list
$\color{red}{1\cdot 2+1}=3$,
$\color{red}{2\cdot 3+1}=7$,
$\color{red}{3\cdot 4+1}=13$,
$\color{red}{4\cdot 5+1}=21$ ... an entry which is $\ge$ then respectively
$2,3,4,5$ ...

The OP question addresses only the "blue to red jumps".
It would be nice to have control on the asymptotic of the $q$-sequence that
reflects this observed behavior, so let us show in the sequel an explicit simple double inequality that separates the $q$-terms in pairwise disjoint intervals:
$$
\color{blue}
{
\tag{$\dagger$}
\underbrace{\sqrt{n+\sqrt {n-1}}}_{=A(n)}
\le 
q_n
\le
\underbrace{\sqrt{n+\sqrt{n-\frac 12}}}_{=B(n)}
\qquad\text{ for }n\ge 15\ .
}
$$
For the values for $n$ less than $15$ see the table.

From the relation $\dagger$ we have than immediately the claimed property. If $n=b^2-b+1\ge 15$ then
$$
\begin{aligned}
q_n &\ge A(n)=\sqrt{b^2-b+1+\sqrt{b^2-b}} > b\ ,\\
q_{n-1} &\le B(n-1)=\sqrt{b^2-b+\sqrt{b^2-b-\frac 12}} < b\ .
\end{aligned}
$$

Here are some words on the proof of $(\dagger)$.
(The main issue was finding the two functions $A$, $B$ in $O\left(\sqrt n +\frac 12 -\frac 1{8\sqrt n}\right)$ that allow an inductive proof.)
For $n=15$ the above inequality is satisfied, computer check.
Then we try to use inductively the relation
$$
q_{n+1}=
\frac{a_{n+1}}{a_n}=
\frac{a_n+na_{n-1}}{a_n}=
1+\frac n{a_n/a_{n-1}}=
1+\frac n{q_n}\ ,
$$
so from the bounds for $q_n$ we would obtain the corresponding bounds for
$q_{n+1}$ if the
inequalities marked below with $(?)$ are true:
$$
A(n+1) 
\ \overset{(?)}\le\ 1+\frac n{B(n)}
\ \le\ 1+\frac n{q_n} 
\ \le\ 1+\frac n{A(n)}
\ \overset{(??)}\le
\ B(n+1) \ .
$$

For $(?)$ we equivalently rewrite step by step:
$$
\begin{aligned}
A(n+1) 
&\overset?\le
1 + \frac n{B(n)}
\ ,
\\
A(n+1)B(n)
&\overset?\le
n + B(n)
\ ,
\\
(n+1+\sqrt n)\left(n+\sqrt{n-\frac 12}\right)
&\overset?\le
n^2 + 2n\sqrt{n+\sqrt{n-\frac 12}} + n+\sqrt{n-\frac 12}
\ ,
\\
n\sqrt{n-\frac 12} + n\sqrt n + \sqrt{n\left(n-\frac 12\right)}
&\overset?\le
2n\sqrt{n+\sqrt{n-\frac 12}}
\ ,
\\
\sqrt{n\left(n-\frac 12\right)} + n + \sqrt{n-\frac 12}
&\overset?\le
2\sqrt{n\left(n+\sqrt{n-\frac 12}\right)}
\ ,
\\
\frac 12(n-1) +2n\sqrt{n\left(n-\frac 12\right)}
+ 2\sqrt n\left(n-\frac 12\right)
&\overset?\le
2n^2 + 2n\sqrt{n-\frac 12}
\ .
\end{aligned}
$$
And the last inequality can be shown,
estimate first
$$
2n^2
-
2n\sqrt{n\left(n-\frac 12\right)}
=
2n\cdot\frac 
{n^2 -n\left(n-\frac 12\right)}
{n+\sqrt{n\left(n-\frac 12\right)}}
\ge
2n\cdot\frac{\frac n2}{n+n}=\frac n2\ .
$$

For $(??)$ we equivalently rewrite step by step:
$$
\begin{aligned}
 1 + \frac n{A(n)} 
&\overset?\le
B(n+1)
\ ,
\\
n+A(n)
&\overset?\le
A(n)B(n+1)
\ ,
\\
n^2 + 2n\sqrt{n+\sqrt{n-1}} + n+\sqrt{n-1}
&\overset?\le
(n+\sqrt{n-1})\left(n+1+\sqrt{n+\frac 12}\right)
\ ,
\\
2n\sqrt{n+\sqrt{n-1}}
&\overset?\le
n\sqrt{n+\frac 12} + n\sqrt{n-1} + \sqrt{(n-1)\left(n+\frac 12\right)}
\ ,
\\
4n^2(n+\sqrt{n-1})
&\overset?\le
n^2\left(n+\frac 12\right) + n^2(n-1) + (n-1)\left(n+\frac 12\right)
\\
&\qquad
+2n^2\sqrt{(n-1)\left(n+\frac 12\right)}
+2n\left(n+\frac 12\right)\sqrt{n-1}
\\
&\qquad\qquad
+2n(n-1)\sqrt{n+\frac 12}
\ ,
\\
2n^3 + 2n^2\sqrt{n-1}
&\overset?\le
2n^2\sqrt{(n-1)\left(n+\frac 12\right)}
+
2n^2\sqrt{n+\frac 12}
+
\frac{n^2}2
\\
&\qquad
-
2n\sqrt{n+\frac 12}
+
n\sqrt{n-1}
-\frac{n+1}2
\ ,
\\
2n^2\cdot
\frac
{n^2 -(n-1)\left(n+\frac 12\right)}
{n + \sqrt{(n-1)\left(n+\frac 12\right)}}
-\frac{n^2}2
&\overset?\le
2n^2\cdot\frac{\left(n+\frac 12\right)-(n-1)}{\sqrt{n+\frac 12}+\sqrt{n-1}}
\\
&\qquad
+n\sqrt{n-1}-2n\sqrt{n+\frac 12}-\frac{n+1}2
\ ,
\\[3mm]
&\qquad\text{ and for the last relation, we estimate the LHS}
\\
2n^2\cdot
\frac
{n^2 -(n-1)\left(n+\frac 12\right)}
{n + \sqrt{(n-1)\left(n+\frac 12\right)}}
-\frac{n^2}2
&=
2n^2\left(\frac{\frac{n+1}2}{n+\sqrt{(n-1)\left(n+\frac 12\right)}}-\frac 14\right)
\\
&\le n^2\left(\frac{n+1}{n+\left(n-\frac 14\right)}-\frac 12\right)
=n^2\cdot\frac{2+\frac 14}{2\left(2n-\frac 14\right)}\in O(n)\ ,
\\
&\qquad\text{ and the first term on the RHS}
\\
2n^2\cdot\frac{\frac 32}{\sqrt{n+\frac 12}+\sqrt{n-1}}
&\ge
2n^2\cdot\frac{\frac 32}{2\sqrt{n-\frac 14}}
=\frac32\cdot\frac{n^2}{\sqrt{n-\frac 14}}\sim \frac 32n\sqrt n
\ ,
\end{aligned}
$$
and from the factor $\frac 32=1+\frac 12$
we need (only) the $1$ to compensate the other terms in $O(n\sqrt n)$ for "big values" of $n$.
(Computations can be done explicitly.)

Sage code producing the table:
a = [1, 1]
B_blue = [b^2 - b     for b in [2..99]]
B_red  = [b^2 - b + 1 for b in [2..99]]

for n in [2..1000]:
    a.append( a[-1] + (n-1)*a[-2] )

def q(n): return RR(a[n]/a[n - 1])
def q_color(n): 
    if n in B_red :    return r'\color{red}{%10.7f}' % q(n)
    if n in B_blue:    return r'\color{blue}{%10.7f}' % q(n)
    return '%10.7f' % q(n)

for k in [1..40]:
    print(' & '.join(['{} & {}'.format(j*40+k, q_color(j*40+k))
                      for j in [0..4]]), r'\\\hline')


Computer check of the relation $A(n) \le q_n\le B(n)$ for $n$ between $15$ and $1000$, here $A$ is low and $B$ is up:
def low(n): return sqrt(n + sqrt(n -  1 ))
def up (n): return sqrt(n + sqrt(n - 1/2))

prod([ int( bool(low(n) < a[n]/a[n-1]) and bool(a[n]/a[n-1] < up(n)) )
       for n in [15..1000] ])

And we get the $1$.

Computer check of the relation inductively shown above:
$$A(n+1) \le 1+\frac n{B(n)} \le q_{n+1}\le 1 +\frac n{A(n)} \le B(n+1)$$
for $n$ between $15$ and $999$.
ok = True
for n in [15..999]:
    qq = RR( a[n+1] / a[n])
    if ( bool( RR(low(n+1))     < 1 + n/RR(up(n))  ) and
         bool( 1 + n/RR(up(n) ) < qq               ) and
         bool(               qq < 1 + n/RR(low(n)) ) and
         bool( 1 + n/RR(low(n)) < up(n+1)          ) ):
        continue
    ok = False
    break

print(f'ok = {ok}')

and we get ok = True. (The flag remained as set initially.)