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.

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