login
A383117
Indices of record high-water marks of the sequence abs((cos p)^p) where p is the numerator of the n-th convergent to Pi (A002485), starting from n = 1.
1
1, 2, 3, 5, 13, 17, 18, 19, 20, 22, 26, 28, 30, 32, 33, 34, 38, 39, 40, 43, 44, 46, 48, 49, 50, 52, 53, 55, 59, 62, 65, 67, 70, 71, 72, 73, 75, 76, 77, 78, 80, 81, 83, 86, 88, 90, 91, 95, 97, 98, 100, 102, 103, 105, 106, 107, 109, 110, 111, 112, 114, 117, 119, 122, 123, 124, 125, 127, 129
OFFSET
1,2
LINKS
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
Sequence in context: A268509 A260594 A228940 * A045311 A356196 A045312
KEYWORD
nonn
AUTHOR
Jwalin Bhatt, May 01 2025
STATUS
approved