%I #10 Oct 16 2024 22:26:49
%S 1,1,2,4,5,6,7,9,10,11,13,14,15,17,18,19,21,22,24,25,26,28,29,30,32,
%T 33,34,36,37,38,40,41,42,44,45,46,48,49,51,52,53,55,56,57,59,60,61,63,
%U 64,65,67,68,69,71,72,74,75,76,78,79,80,82,83,84,86,87,88
%N a(n) = least k such that n^(2k)/(2 k)! < 1.
%C The numbers n^(2k)/(2 k)! are the coefficients in the Maclaurin series for cos x when x = 1. If m>a(n), then n^(2k)/(2 k)! < 1.
%F a(n) ~ exp(1)*n/2 - log(n)/4. - _Vaclav Kotesovec_, Oct 13 2024
%t a[n_] := Select[Range[200], n^(2 #)/(2 #)! < 1 &, 1];
%t Flatten[Table[a[n], {n, 0, 200}]]
%o (Python)
%o from itertools import count
%o from math import gcd
%o def A376956(n):
%o a, b = 1, 1
%o for k in count(1):
%o a *= n**2
%o b *= (m:=k<<1)*(m-1)
%o if a < b: return k
%o c = gcd(a,b)
%o a, b = a//c, b//c # _Chai Wah Wu_, Oct 16 2024
%Y Cf. A370507, A376284, A376952, A376953, A376954, A376955, A376957, A376958, A376959, A376960.
%K nonn
%O 0,3
%A _Clark Kimberling_, Oct 12 2024