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

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())])
Showing 1-2 of 2 results.