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.

Original entry on oeis.org

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, 33, 34, 36, 37, 38, 40, 41, 42, 44, 45, 46, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 72, 74, 75, 76, 78, 79, 80, 82, 83, 84, 86, 87, 88
Offset: 0

Views

Author

Clark Kimberling, Oct 12 2024

Keywords

Comments

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.

Crossrefs

Programs

  • Mathematica
    a[n_] := Select[Range[200], n^(2 #)/(2 #)! < 1 &, 1];
    Flatten[Table[a[n], {n, 0, 200}]]
  • Python
    from itertools import count
    from math import gcd
    def A376956(n):
        a, b = 1, 1
        for k in count(1):
            a *= n**2
            b *= (m:=k<<1)*(m-1)
            if a < b: return k
            c = gcd(a,b)
            a, b = a//c, b//c # Chai Wah Wu, Oct 16 2024

Formula

a(n) ~ exp(1)*n/2 - log(n)/4. - Vaclav Kotesovec, Oct 13 2024