OFFSET
1,2
COMMENTS
The sequence is the first result in the chain of iteration leading to the ultimate sequence A258024.
Sequence terms are also the roots of A000503(i)=1, starting from i=1.
This is a subsequence of A258024 from which this differs for the first time at n=11, where a(11) = 111, while A258024(11) = 105, the term not included in this sequence. Note that A000503(105) = 4, a term which is included in this sequence. - Antti Karttunen, Oct 30 2017
Numbers k such that Pi/4 <= k - m*Pi < arctan(2) for some m. - Robert Israel, Nov 06 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
rootsp = Flatten[Position[Table[Floor[Tan[i]], {i, 1, 10^6}], 1]
(*a(n) = rootsp[[n]]*)
Alternatively:
rootsp = {}; Do[If[Floor[Tan[n]] == 1, AppendTo[rootsp, n]], {n, 1, 10^6}]
rootsp (*a(n) = rootsp[[n]]*)
Select[ Range@ 622, Floor@ Tan@ # == 1 &] (* Robert G. Wilson v, Nov 06 2017 *)
PROG
(PARI) isok(n) = floor(tan(n)) == 1; \\ Michel Marcus, Oct 24 2017
(PARI) first(n) = {my(res = vector(n), i = 0, pi = [Pi, Pi], sols = [atan(1), atan(2)]); while(1, for(j = ceil(sols[1]), floor(sols[2]), i++; if(i>n, return(res)); res[i] = j); sols+=[Pi(), Pi()])} \\ David A. Corneth, Oct 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
V.J. Pohjola, Oct 15 2017
STATUS
approved