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.
%I A382564 #76 May 06 2025 10:55:21 %S A382564 1,3,22,355,5419351,411557987,1068966896,2549491779 %N A382564 Indices of records of the sequence abs((cos n)^n) starting from n = 1. %C A382564 I conjecture that this sequence is a subsequence of the numerators of convergents to Pi (A002485). %e A382564 The first few values of abs((cos n)^n), n >= 1, are: %e A382564 abs(cos(1)^1) = 0.5403023058 %e A382564 abs(cos(2)^2) = 0.1731781895 %e A382564 abs(cos(3)^3) = 0.9702769379 %e A382564 abs(cos(4)^4) = 0.1825425480 %e A382564 abs(cos(5)^5) = 0.0018365688 %e A382564 and the record high points are at n = 1, 3, 22, ... %t A382564 Module[{x, y, runningMax = 0, positions = {}}, %t A382564 x = Range[10^6]; y = Abs[Cos[x]^x]; %t A382564 Do[If[y[[i]] > runningMax, runningMax = y[[i]]; AppendTo[positions, i]; ], {i, Length[y]}]; %t A382564 positions %t A382564 ] %o A382564 (Python) %o A382564 import numpy as np %o A382564 x = np.arange(1, 1+10**8) %o A382564 y = abs(np.cos(x) ** x) %o A382564 A382564 = sorted([1+int(np.where(y==m)[0][0]) for m in set(np.maximum.accumulate(y))]) %o A382564 (Python) %o A382564 from mpmath import mp %o A382564 mp.dps = 1 %o A382564 running_max, A382564 = 0, [] %o A382564 for n in range(1, 1+10**5): %o A382564 while ((y:=abs(mp.cos(n)**n)) == 1): %o A382564 mp.dps += 1 %o A382564 if y > running_max: %o A382564 running_max = y %o A382564 A382564.append(n) %Y A382564 C.f. A002485, A382815, A383283, A383541. %K A382564 nonn,more %O A382564 1,2 %A A382564 _Jwalin Bhatt_, Apr 28 2025 %E A382564 a(6)-a(8) from _Jakub Buczak_, May 04 2025