Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #37 Jan 09 2022 02:36:20
%S 1,2,2,12,16,96,16,224,23296,9761280,15872,107520,184320,319488,2048,
%T 61440,7186350080,200933376,94812623732736,10223616,4874025566208,
%U 10759916740583034417814216835787128832,63739789312,29320282112,59516348042566359318528
%N a(n) is the least positive integer such that 2^n + a(n)*n*(n+1) equals a power of 2.
%C We can always find a value for a(n). It is an elementary consequence of Fermat's little theorem, Hensel's lemma, and the Chinese remainder theorem, that more generally for every pair of positive integers u,v there exist x,y such that x*u = (2^y - 1)*2^v. - _Fred Lunnon_, Dec 26 2021 in SeqFan
%e 2^5 + 16*30 = 512, so a(5) = 16.
%t a[n_] := Module[{ob = n*(n + 1), pow = 2^n, k = n + 1}, While[! Divisible[2^k - pow, ob], k++]; (2^k - pow)/ob]; Array[a, 25] (* _Amiram Eldar_, Dec 26 2021 *)
%o (Python)
%o def A350329(n):
%o a, b, c = 2**n, n*(n+1),2**(n+1)
%o while (x := divmod(c-a,b))[1] != 0:
%o c *= 2
%o return x[0] # _Chai Wah Wu_, Jan 07 2022
%Y Cf. A000079, A002378.
%K nonn
%O 1,2
%A _Ali Sada_, Dec 26 2021
%E More terms from _Amiram Eldar_, Dec 26 2021