OFFSET
0,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..5000
EXAMPLE
tan(0) = 0, so a(0) = 0.
tan(1) = 1.557407724654902230506974807... so a(1) = 1.
For m = 2, 3, 4, ... , 13, 15, 16, 18, 19, tan(m) < 2, tan (14) = 7.24460661609480..., tan(17) = 3.493915645474... and tan(20) = 2.2371609442247422652871732477... so a(2) = 20.
MATHEMATICA
Array[Block[{m = 0}, While[IntegerPart@ Tan@ m != #, m++]; m] &, 40, 0] (* Michael De Vlieger, Oct 05 2019 *)
PROG
(Python) import numpy as np
import math as m
n = 1
i = 0
inp = np.zeros(1)
out = inp
while n < 10001:
k=m.trunc(m.tan(i))
if k==n:
inp = np.append(inp, int(n))
out = np.append(out, int(i))
print(n, i)
n += 1
i = 0
continue
else:
i+=1
(Magma) a:=[]; for n in [0..50] do m:=0; while Floor(Tan(m)) ne n do m:=m+1; end while; Append(~a, m); end for; a; // Marius A. Burtea, Oct 05 2019
(PARI) a(n) = my(k=0); while (floor(tan(k)) != n, k++); k; \\ Michel Marcus, Oct 05 2019
CROSSREFS
KEYWORD
AUTHOR
James Carruthers, Sep 25 2019
STATUS
approved