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.

A376956 a(n) = least k such that n^(2k)/(2 k)! < 1.

This page as a plain text file.
%I A376956 #10 Oct 16 2024 22:26:49
%S A376956 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 A376956 33,34,36,37,38,40,41,42,44,45,46,48,49,51,52,53,55,56,57,59,60,61,63,
%U A376956 64,65,67,68,69,71,72,74,75,76,78,79,80,82,83,84,86,87,88
%N A376956 a(n) = least k such that n^(2k)/(2 k)! < 1.
%C A376956 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 A376956 a(n) ~ exp(1)*n/2 - log(n)/4. - _Vaclav Kotesovec_, Oct 13 2024
%t A376956 a[n_] := Select[Range[200], n^(2 #)/(2 #)! < 1 &, 1];
%t A376956 Flatten[Table[a[n], {n, 0, 200}]]
%o A376956 (Python)
%o A376956 from itertools import count
%o A376956 from math import gcd
%o A376956 def A376956(n):
%o A376956     a, b = 1, 1
%o A376956     for k in count(1):
%o A376956         a *= n**2
%o A376956         b *= (m:=k<<1)*(m-1)
%o A376956         if a < b: return k
%o A376956         c = gcd(a,b)
%o A376956         a, b = a//c, b//c # _Chai Wah Wu_, Oct 16 2024
%Y A376956 Cf. A370507, A376284, A376952, A376953, A376954, A376955, A376957, A376958, A376959, A376960.
%K A376956 nonn
%O A376956 0,3
%A A376956 _Clark Kimberling_, Oct 12 2024