OFFSET
1,3
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..200
EXAMPLE
n = 5: (k^2 + k + 1) / (2^5 - 1) is true for the least k = 5, thus a(5) = 5.
n = 7: (k^2 + k + 1) / (2^7 - 1) is true for the least k = 19, thus a(7) = 19.
PROG
(Python)
from sympy import sqrt_mod_iter
def A372494(n):
k = (1<<n)-1
k2 = k>>1
return min((d>>1 if d&1 else (d>>1)+k2 for d in sqrt_mod_iter(-3, k)), default=-1) # Chai Wah Wu, May 03 2024
CROSSREFS
KEYWORD
sign
AUTHOR
Ctibor O. Zizka, May 03 2024
STATUS
approved