cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A327788 a(n) is the smallest nonnegative integer m such that the integer part of tan(m) is equal to n.

This page as a plain text file.
%I A327788 #36 Sep 08 2022 08:46:24
%S A327788 0,1,20,17,105,237,303,14,58,80,124,146,11151,168,46318,190,46695,212,
%T A327788 23997,58432,234,13014,38574,61649,82949,256,16586,33271,48891,63091,
%U A327788 76581,89361,278,8088,18738,28678,37908,46783,54948,63113,70568,77668,84768,91158,97193,300,4915,10240,15565,20535,25150
%N A327788 a(n) is the smallest nonnegative integer m such that the integer part of tan(m) is equal to n.
%H A327788 Rémy Sigrist, <a href="/A327788/b327788.txt">Table of n, a(n) for n = 0..5000</a>
%e A327788 tan(0) = 0, so a(0) = 0.
%e A327788 tan(1) = 1.557407724654902230506974807... so a(1) = 1.
%e A327788 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.
%t A327788 Array[Block[{m = 0}, While[IntegerPart@ Tan@ m != #, m++]; m] &, 40, 0] (* _Michael De Vlieger_, Oct 05 2019 *)
%o A327788 (Python) import numpy as np
%o A327788 import math as m
%o A327788 n = 1
%o A327788 i = 0
%o A327788 inp = np.zeros(1)
%o A327788 out = inp
%o A327788 while n < 10001:
%o A327788     k=m.trunc(m.tan(i))
%o A327788     if k==n:
%o A327788         inp = np.append(inp,int(n))
%o A327788         out = np.append(out,int(i))
%o A327788         print(n,i)
%o A327788         n += 1
%o A327788         i = 0
%o A327788         continue
%o A327788     else:
%o A327788         i+=1
%o A327788 (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
%o A327788 (PARI) a(n) = my(k=0); while (floor(tan(k)) != n, k++); k; \\ _Michel Marcus_, Oct 05 2019
%Y A327788 Cf. A000503 (floor(tan(n))).
%K A327788 nonn,look,easy
%O A327788 0,3
%A A327788 _James Carruthers_, Sep 25 2019