OFFSET
1,2
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..419 (terms 1..253 from David A. Corneth)
EXAMPLE
a(6) = 27 as the triangular number 27*(27 + 1)/2 = 378 is divisible by 2^6-1 = 63. - David A. Corneth, May 30 2021
MATHEMATICA
Table[Min[Most[m /. Solve[{(m*(m + 1)) == c*(2^(n + 1) - 2), c > 0, m > 0}, Integers] /. C[1] -> 0]], {n, 1, 50}] (* Vaclav Kotesovec, May 30 2021 *)
PROG
(PARI) a(n) = { my(d = divisors((2^n-1)*2)); res = oo; for(i = 1, (#d + 1)\2, if(gcd(d[i], d[#d + 1 - i])==1, c = lift(chinese(Mod(-1, d[i]), Mod(0, d[#d + 1 - i]))); process(c); c = lift(chinese(Mod(0, d[i]), Mod(-1, d[#d + 1 - i]))); process(c))); res}
process(c) = { if(c < res, if(c > 0, res = c))} \\ David A. Corneth, May 30 2021
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from itertools import product
def A343995(n):
plist = [p**q for p, q in factorint(2*(2**n-1)).items()]
return min(k for k in (crt(plist, d)[0] for d in product([0, -1], repeat=len(plist))) if k > 0) # Chai Wah Wu, May 30 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 30 2021
STATUS
approved