login
a(n) = smallest number encountered when iterating the map x -> floor(tan(x)) starting from the initial value x = n.
5

%I #10 Jun 05 2015 03:56:08

%S 0,1,-3,-3,1,-4,-3,0,-7,-3,0,-226,-3,0,0,-3,0,-3,-3,0,-3,-3,0,1,-3,-3,

%T 1,-4,-3,0,-7,-3,0,-76,-3,0,0,-3,0,-3,-3,0,-3,-3,0,1,-3,-3,1,-4,-3,0,

%U -7,-3,0,-46,-3,0,-7,-3,0,-3,-3,0,-3,-3,0,1,-3,-3,1,-4,-3,0,-6,-3,0,-33,-3,0

%N a(n) = smallest number encountered when iterating the map x -> floor(tan(x)) starting from the initial value x = n.

%C Note that this sequence lists such values only for nonnegative integers, although the function is defined in all Z.

%H Antti Karttunen, <a href="/A258201/b258201.txt">Table of n, a(n) for n = 0..10000</a>

%F If n is equal to floor(tan(n)) then a(n) = n, otherwise (for any other n whether positive or negative) a(n) = min(n, a(floor(tan(n))). [Recurrence defined in whole Z.]

%o (MIT/GNU Scheme) (define (A258201 n) (let loop ((n n) (m n)) (let ((next (floor->exact (tan n)))) (if (= n next) m (loop next (min m next))))))

%Y Cf. A000503, A258020, A258021, A258022, A258024, A258202.

%K sign

%O 0,3

%A _Antti Karttunen_, May 26 2015