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-4 of 4 results.

A004112 Numbers k where |cos(k)| (or |cosec(k)| or |cot(k)|) decreases monotonically to 0; also numbers k where |tan(k)| (or |sec(k)|, or |sin(k)|) increases.

Original entry on oeis.org

0, 1, 2, 5, 8, 11, 344, 699, 1054, 1409, 1764, 2119, 2474, 2829, 3184, 3539, 3894, 4249, 4604, 4959, 5314, 5669, 6024, 6379, 6734, 7089, 7444, 7799, 8154, 8509, 8864, 9219, 9574, 9929, 10284, 10639, 10994, 11349, 11704, 12059, 12414, 12769, 13124, 13479, 13834
Offset: 1

Views

Author

Keywords

Comments

a(100), a(1000), and a(10000) have 5, 215, and 221 digits, respectively. - Jon E. Schoenfield, Nov 08 2019
a(n) is also the smallest nonnegative integer k such that k mod Pi is closer to Pi/2 than any previous term. - Colin Linzer, Apr 27 2022

Examples

			After the 151st term, the sequence continues 51819, 52174, 260515, 573204, 4846147, ...
|cos(4846147)| = 0.000000255689511369808141413171..., |cosec(4846147)| = 1.00000000000003268856311..., or |cot(4846147)| = 0.000000255689511369816499535901...
|tan(4846147)| = 3910993.43356970986068082..., |sec(4846147)| = 3910993.43356983770543651..., |sin(4846147)| = 0.999999999999967311436888...
		

Crossrefs

Programs

  • Mathematica
    a = -1; Do[b = N[ Abs[ Tan[n]], 24]; If[b > a, Print[n]; a = b], {n, 0, 13833}]
  • PARI
    e=2;for(n=0,1e9,abs(cos(n))M. F. Hasler, Apr 01 2013

Extensions

More terms from Olivier Gérard
Edited by Robert G. Wilson v, Jan 28 2003

A382564 Indices of records of the sequence abs((cos n)^n) starting from n = 1.

Original entry on oeis.org

1, 3, 22, 355, 5419351, 411557987, 1068966896, 2549491779
Offset: 1

Views

Author

Jwalin Bhatt, Apr 28 2025

Keywords

Comments

I conjecture that this sequence is a subsequence of the numerators of convergents to Pi (A002485).

Examples

			The first few values of abs((cos n)^n), n >= 1, are:
abs(cos(1)^1) = 0.5403023058
abs(cos(2)^2) = 0.1731781895
abs(cos(3)^3) = 0.9702769379
abs(cos(4)^4) = 0.1825425480
abs(cos(5)^5) = 0.0018365688
and the record high points are at n = 1, 3, 22, ...
		

Crossrefs

Programs

  • Mathematica
    Module[{x, y, runningMax = 0, positions = {}},
      x = Range[10^6]; y = Abs[Cos[x]^x];
      Do[If[y[[i]] > runningMax, runningMax = y[[i]]; AppendTo[positions, i]; ], {i, Length[y]}];
      positions
    ]
  • Python
    import numpy as np
    x = np.arange(1, 1+10**8)
    y = abs(np.cos(x) ** x)
    A382564 = sorted([1+int(np.where(y==m)[0][0]) for m in set(np.maximum.accumulate(y))])
    
  • Python
    from mpmath import mp
    mp.dps = 1
    running_max, A382564 = 0, []
    for n in range(1, 1+10**5):
        while ((y:=abs(mp.cos(n)**n)) == 1):
            mp.dps += 1
        if y > running_max:
            running_max = y
            A382564.append(n)

Extensions

a(6)-a(8) from Jakub Buczak, May 04 2025

A383540 Positive numbers k such that (sin k)^k sets a new record.

Original entry on oeis.org

1, 8, 33, 48269, 48624, 48979, 49334, 49689, 50044, 50399, 50754, 51109, 51464, 51819, 52174, 573204, 37362253, 42781604
Offset: 1

Views

Author

Jwalin Bhatt, Apr 29 2025

Keywords

Examples

			The first few values of (sin k)^k, k >= 1, are:
sin(1)^1   =  0.841470984807896
sin(2)^2   =  0.826821810431805
sin(3)^3   =  0.002810384734461
sin(4)^4   =  0.328042581863883
sin(5)^5   = -0.81081460609467
sin(6)^6   =  0.000475886020687
sin(7)^7   =  0.052831820502919
sin(8)^8   =  0.917970288581835
sin(9)^9   =  0.000342924768404
sin(10)^10 =  0.002270688337734
sin(11)^11 = -0.99989227733272
and the record high points are at k = 1, 8, 33, ...
		

Crossrefs

Programs

  • Mathematica
    Module[{x, y, runningMax = 0, positions = {}},
      x = Range[1, 10^6]; y = Sin[x]^x;
      Do[If[y[[i]] > runningMax, runningMax = y[[i]]; AppendTo[positions, i]; ], {i, Length[y]}];
      positions
    ]
  • Python
    import numpy as np, pandas as pd
    x = np.arange(1, 1+10**8)
    y = pd.Series(np.sin(x) ** x)
    A383540 = sorted([1+int(np.where(y==m)[0][0]) for m in set(y.cummax())])

A383229 Indices of record low-water marks of the sequence abs((sin n)^n).

Original entry on oeis.org

0, 1, 2, 3, 6, 9, 13, 16, 19, 22, 44, 66, 88, 110, 132, 154, 176, 179, 198, 201, 223, 245, 267, 289, 311, 333, 355, 710, 1065, 1420, 1775, 2130, 2485, 2840, 3195, 3550, 3905, 4260, 4615, 4970, 5325, 5680, 6035, 6390, 6745, 7100, 7455, 7810, 8165, 8520, 8875, 9230, 9585, 9940
Offset: 0

Views

Author

Jwalin Bhatt, Apr 28 2025

Keywords

Comments

(sin 0) ^ 0 is interpreted as limit of (sin(x)) ^ x as x -> 0.

Examples

			The first few values of abs((sin n)^n) are:
abs(sin(0)^0) = 1
abs(sin(1)^1) = 0.841470984807896
abs(sin(2)^2) = 0.826821810431805
abs(sin(3)^3) = 0.002810384734461
abs(sin(4)^4) = 0.328042581863883
abs(sin(5)^5) = 0.810814606094671
abs(sin(6)^6) = 0.000475886020687
abs(sin(7)^7) = 0.052831820502919
and the record low points are at n = 0, 1, 2, 3, 6, ...
		

Crossrefs

Programs

  • Mathematica
    Module[{x, y, runningMin = 1.1, positions = {0}},
      x = Range[10^6];y = Abs[Sin[x]^x];
      Do[If[y[[i]] < runningMin,runningMin = y[[i]];AppendTo[positions, i];],{i, Length[y]}];
      positions
    ]
  • Python
    from mpmath import mp
    A383229, min_val = [0], 1
    for i in range(1, 1+10**5):
        if (current_val:=abs(mp.sin(i)**i)) < min_val:
            min_val = current_val
            A383229.append(i)
Showing 1-4 of 4 results.