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.

Showing 1-6 of 6 results.

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

Original entry on oeis.org

1, 4, 8, 12, 16, 20, 25, 29, 33, 37, 42, 46, 50, 54, 59, 63, 67, 71, 76, 80, 84, 88, 93, 97, 101, 105, 110, 114, 118, 122, 127, 131, 135, 140, 144, 148, 152, 157, 161, 165, 169, 174, 178, 182, 186, 191, 195, 199, 203, 208, 212, 216, 221, 225, 229, 233, 238
Offset: 0

Views

Author

Clark Kimberling, Oct 01 2024

Keywords

Comments

The numbers (n*Pi)^(2k)/(2 k)! are the coefficients in the Maclaurin series for cos x when x = n*Pi.
(n*pi)^k/(2 k)! < 1 for every k >= a(n).

Crossrefs

Programs

  • Mathematica
    a[n_] := Select[Range[300], (n Pi)^(2 #)/(2 #)! < 1 &, 1]
    Flatten[Table[a[n], {n, 0, 300}]]

Extensions

Edited by Clark Kimberling, Oct 10 2024

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

Original entry on oeis.org

1, 3, 7, 11, 16, 20, 24, 28, 33, 37, 41, 45, 50, 54, 58, 62, 67, 71, 75, 79, 84, 88, 92, 96, 101, 105, 109, 113, 118, 122, 126, 131, 135, 139, 143, 148, 152, 156, 160, 165, 169, 173, 177, 182, 186, 190, 194, 199, 203, 207, 212, 216, 220, 224, 229, 233, 237
Offset: 0

Views

Author

Clark Kimberling, Oct 01 2024

Keywords

Comments

The numbers (n Pi)^(2 k + 1)/(2 k + 1)! are the coefficients in the Maclaurin series for sin x when x = n*Pi.
(n Pi)^(2 k + 1)/(2 k + 1)! < 1 for every k >= a(n).

Crossrefs

Programs

  • Mathematica
    z = 300; r = Pi;
    a[n_] := Select[Range[z], (n  r)^(2 # + 1)/(2 # + 1)! < 1 &, 1]
    Flatten[Table[a[n], {n, 0, 100}]]

A375054 Let M(n,x) denote the Maclaurin polynomial of degree 2n for cos x. Let u(n) be the number of nonreal zeros of M(n,x) and v(n) the number of real zeros of M(n,x). Then a(n) = u(n) - v(n).

Original entry on oeis.org

-2, -4, 2, 0, 6, 4, 2, 8, 6, 4, 10, 8, 14, 12, 10, 16, 14, 12, 18, 16, 22, 20, 18, 24, 22, 28, 26, 24, 30, 28, 26, 32, 30, 36, 34, 32, 38, 36, 34, 40, 38, 44, 42, 40, 46, 44, 50, 48, 46, 52, 50, 48, 54, 52, 58, 56, 54, 60, 58, 64, 62, 60, 66, 64, 62, 68, 66
Offset: 1

Views

Author

Clark Kimberling, Oct 01 2024

Keywords

Comments

1

Examples

			The 6 zeros of the Maclaurin polynomial x^2/2! - x^4/4! - x^6/6! are approximately {-3.92 - 1.28 i, -3.92 + 1.2 i, -1.56, 1.56, 3.92 - 1.28 i, 3.92 + 1.28 i}; there are 4 nonreal zero and 2 real zeros, so that a(3) = 4 - 2 = 2.
		

Crossrefs

Programs

  • Mathematica
    z = 100;
    a[n_] := CountRoots[Sum[(-1)^k*x^k/(2 k)!, {k, 0, n}], {x, 0, Infinity}];
    t = 2 Table[a[n], {n, 1, z}] ; (* # real zeros of M(n,x) *)
    2 Range[z] - t (* # nonreal zeros *)
    2 Range[z] - 2 t (* # nonreal zeros minus # real zeros; *)

A376456 Let s(x) be the Maclaurin series for cos(x); then a(n) is the index k for which the (k+1)-st partial sum of s(2*n*Pi) is greatest among all partial sums.

Original entry on oeis.org

2, 6, 8, 12, 14, 18, 22, 24, 28, 30, 34, 36, 40, 44, 46, 50, 52, 56, 58, 62, 66, 68, 72, 74, 78, 80, 84, 88, 90, 94, 96, 100, 102, 106, 110, 112, 116, 118, 122, 124, 128, 132, 134, 138, 140, 144, 146, 150, 154, 156, 160, 162, 166, 168, 172, 176, 178, 182
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2024

Keywords

Examples

			For n = 2 the partial sums (of which the 1st is for k=0) are approximately 1, -18.7, 46.2, -39.2, 20.9, -5.4,..., where the greatest, 46.2..., is the 3rd, so that a(2) = 2.
		

Crossrefs

Cf. A376457.

Programs

  • Mathematica
    z = 200; r = Pi;
    f[n_, m_] := f[n, m] = N[Sum[(-1)^k  (2 n  r)^(2 k)/(2 k)!, {k, 0, m}], 10]
    t[n_] := Table[f[n, m], {m, 1, z}]
    g[n_] := Select[Range[z], f[n, #] == Max[t[n]] &]
    h[n_] := Select[Range[z], f[n, #] == Min[t[n]] &]
    Flatten[Table[g[n], {n, 1, 60}]]  (* this sequence *)
    Flatten[Table[h[n], {n, 1, 60}]]  (* A376457 *)

Formula

|a(n)-A376457(n)| = 1 for n>=1.

A374987 Let s(x) be the Maclaurin series for cos(x); then a(n) is the least index k for which all partial sums of cos(2m*Pi) are positive.

Original entry on oeis.org

6, 14, 24, 32, 40, 48, 58, 66, 74, 82, 92, 100, 108, 116, 126, 134, 142, 150, 160, 168, 176, 184, 194, 202, 210, 218, 228, 236, 244, 254, 262, 270, 278, 288, 296, 304, 312, 322, 330, 338, 346, 356, 364, 372, 382, 390, 398, 406, 416, 424, 432, 440, 450, 458
Offset: 0

Views

Author

Clark Kimberling, Oct 01 2024

Keywords

Examples

			For n=1, the partial sums (for k = 0,1,2,3,4,5,6,7) are approximately 1, -18.7, 46.2, -39.2, 20.9, -5.4, 2.4, 0.7; beginning with k=6, the partials sums are all positive, so a(1)=6.
		

Crossrefs

Programs

  • Mathematica
    z = 800; r = Pi;
    f[m_, n_] := f[m, n] = N[Sum[(-1)^k  (2 m  r)^(2 k)/(2 k)!, {k, 0, n}], 10]
    g[m_] := Select[Range[z], f[m, #] > 0 && f[m, # + 1] > 0 &, 1]
    Flatten[Table[g[m], {m, 1, 80}]]

A376454 n in base whose place values are a modified ternary sequence; see Comments.

Original entry on oeis.org

0, 1, 10, 100, 101, 110, 200, 201, 210, 1000, 1001, 1010, 1100, 1101, 1110, 1200, 1201, 1210, 2000, 2001, 2010, 2100, 2101, 2110, 2200, 2201, 2210, 10000, 10001, 10010, 10100, 10101, 10110, 10200, 10201, 10210, 11000, 11001, 11010, 11100, 11101, 11110, 11200
Offset: 0

Views

Author

Clark Kimberling, Sep 28 2024

Keywords

Comments

The modified ternary sequence, (1,2,3,9,27,81,...) consists of 2 together with all 3^k for k>=0.

Examples

			8 = 2*3 + 1*2 + 0*1, so that 8 in the modified ternary base is 210.
		

Crossrefs

Programs

  • Mathematica
    greedy[list_, n_] := Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, n, Reverse[list]]][[2, 1]];
    seq = Insert[Table[3^n, {n, 0, 5}], 2, 2]; (*1,2,3,9,27,...*)
    Table[FromDigits[greedy[seq, n]], {n, Last[seq]}]
    (* Peter J. C. Moses, Oct 18 2012; from A214973 *)
Showing 1-6 of 6 results.