login
Positive integers m for which f(m-1) < f(m) < f(m+1), where f(m) = floor(cot(Pi/(2m))).
4

%I #45 Oct 19 2017 10:44:20

%S 4,7,12,15,18,23,26,29,34,37,40,45,48,51,54,59,62,65,70,73,76,81,84,

%T 87,92,95,98,103,106,109,114,117,120,125,128,131,136,139,142,147,150,

%U 153,158,161,164,169,172,175,180,183,186,191,194,197,202,205,208,213,216,219,224,227

%N Positive integers m for which f(m-1) < f(m) < f(m+1), where f(m) = floor(cot(Pi/(2m))).

%C Conjecture (verified for m < 10^6 by _M. F. Hasler_): A024813(n) = 2*A024812(n) - n + 1, n=1,2,.... - _L. Edson Jeffery_, Mar 21 2013

%C The above conjecture follows from the Laurent series for cot(x) = 1/x - x/3 + O(x^3) and the conjecture n/a(n) ~ 4/Pi-1. - _M. F. Hasler_, Mar 25 2013

%H Harvey P. Dale, <a href="/A024813/b024813.txt">Table of n, a(n) for n = 1..1000</a>

%H Robert G. Wilson v, <a href="/A024813/a024813.pdf">Graph of f(n), see Mathematica program</a>

%F n/a(n) ~ 4/Pi - 1 (as n -> oo), or a(n) ~ 3.65979 n. (Conjectured.) - _M. F. Hasler_, Mar 25 2013

%F Alternate formula: cot(Pi/(2m)) = tan((Pi/2)*(1 - 1/m)).

%F Conjecture: a(n) = a(n-1) + a(n-3) - a(n-4); g.f.: x*(2*x^15-2*x^14-x^3+5*x^2+3*x+4) / ((x-1)^2*(x^2+x+1)). - _Colin Barker_, Jan 03 2014

%t f[n_] := Floor[Tan[Pi (1 - 1/n)/2]]; Select[Range[2, 100], f[# - 1] < f[#] < f[# + 1] &] (* _Robert G. Wilson v_, Mar 19 2013 *)

%t Flatten[Position[Partition[Floor[Cot[Pi/(2Range[250])]],3,1],_?(Min[ Differences[ #]]>0&),{1},Heads->False]]+1 (* _Harvey P. Dale_, Feb 04 2016 *)

%o (PARI) {my(f(m)=floor(cotan(Pi/2/m))); for(m=2,99,f(m-1)<f(m) & f(m)<f(m+1) & print1(m","))} \\ See comment in A024812; _M. F. Hasler_, Mar 20 2013

%Y A024812 yields the corresponding values of f.

%K nonn

%O 1,1

%A _Clark Kimberling_

%E Definition corrected by _M. F. Hasler_, following posts to the SeqFan list from _Harvey P. Dale_ and _Don Reble_, Mar 19 2013