OFFSET
1,2
LINKS
Jwalin Bhatt, Table of n, a(n) for n = 1..586
EXAMPLE
The first few values of abs((cos p)^p), are:
| n | p | abs((cos p)^p) |
|----|--------|-------------------|
| 1 | 1 | 0.540302305868139 |
| 2 | 3 | 0.970276937921503 |
| 3 | 22 | 0.999138535075440 |
| 4 | 333 | 0.987127208495661 |
| 5 | 355 | 0.999999838708950 |
| 6 | 103993 | 0.999980973024431 |
| 7 | 104348 | 0.999993669716665 |
| 8 | 208341 | 0.999993141212817 |
| 9 | 312689 | 0.999998684509338 |
| 10 | 833719 | 0.999997769972478 |
and the record high points are at n = 1, 2, 3, 5, 13, ...
MATHEMATICA
Module[{x, y, runningMax = 0, positions = {}},
x = Join[{1}, Numerator @ Convergents[Pi, 64]]; y = Abs[Cos[x]^x];
Do[If[y[[i]] > runningMax, runningMax = y[[i]]; AppendTo[positions, i]; ], {i, Length[y]}];
positions
]
PROG
(Python)
from sympy import pi, continued_fraction_iterator, continued_fraction_convergents
from itertools import islice
from mpmath import iv
cf_iter = continued_fraction_convergents(continued_fraction_iterator(pi))
cf_coeffs = [1] + [f.numerator for f in islice(cf_iter, 20)]
running_max, A383117 = 0, []
for i, numer in enumerate(cf_coeffs, start=1):
while True:
x = abs(iv.cos(numer)**numer)
if (comparison:=x>running_max) is None:
iv.dps += 1
max_coeff = cf_coeffs[A383117[-1]-1]
running_max = abs(iv.cos(max_coeff)**max_coeff)
else: break
if comparison:
A383117.append(i)
running_max = x
print(A383117) # Jwalin Bhatt, Jan 14 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Jwalin Bhatt, May 01 2025
STATUS
approved
