OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16383
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
FORMULA
MATHEMATICA
A011772[n_] := Module[{m = 1}, While[!IntegerQ[(m(m+1))/(2n)], m++]; m];
a[n_] := n - A011772[n];
Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
PROG
(Python)
from sympy.ntheory.modular import crt
from sympy import factorint
from math import prod
from itertools import combinations
def A344763(n):
plist = tuple(p**q for p, q in factorint(2*n).items())
return 1-n if len(plist) == 1 else n-int(min(min(crt((m, 2*n//m), (0, -1))[0], crt((2*n//m, m), (0, -1))[0]) for m in (prod(d) for l in range(1, len(plist)//2+1) for d in combinations(plist, l)))) # Chai Wah Wu, Jun 15 2022
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, May 30 2021
STATUS
approved