OFFSET
1,3
COMMENTS
This sequences provides insight into the manner of convergence of n*sin(1/n). One may also consider: [1/(1 - n*sin(1/n))] = 6*n^2 = A033581(n) for n >= 1.
a(n+1) - a(n) is in {0,1} for n >= 1, so that the position sequences A138235 and A022840 partition the positive integers.
a(n) = A194986(n). - Clark Kimberling, Jan 15 2015
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..3000
FORMULA
a(n) = ceiling (n/sqrt(6)) for n >= 1.
EXAMPLE
Approximations:
n 1-k*sin(1/k) 1/n^2
1 0.158529 1
2 0.041148 0.25
3 0.018415 0.11111
4 0.010384 0.0625
5 0.006653 0.04
a(5) = 3 because 1 - 3*sin(1/3) < 1/25 < 1 - 2*sin(1/2).
MATHEMATICA
z = 120; p[k_] := p[k] = k*Sin[1/k]; N[Table[1 - p[n], {n, 1, z/5}]]
f[n_] := f[n] = Select[Range[z], 1 - p[#] < 1/n^2 &, 1];
u = Flatten[Table[f[n], {n, 1, z}]] (* A248515 *)
v = Flatten[Position[Differences[u], 0]] (* A138235 *)
w = Flatten[Position[Differences[u], 1]] (* A022840 *)
Table[Ceiling[n / Sqrt[6]], {n, 70}] (* Vincenzo Librandi, Jun 17 2015 *)
PROG
(Magma) [Ceiling(n/Sqrt(6)): n in [1..70]]; // Vincenzo Librandi, Jun 17 2015
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Clark Kimberling, Oct 08 2014
STATUS
approved