login
Numbers k such that both k and k+1 are Zumkeller numbers (A083207).
4

%I #36 Dec 07 2023 16:10:44

%S 5984,7424,21735,21944,26144,27404,39375,43064,49664,56924,58695,

%T 61424,69615,70784,76544,77175,79695,81080,81675,82004,84524,84644,

%U 89775,91664,98175,103455,104895,106784,109395,111824,116655,116864,120015,121904,122264,126224

%N Numbers k such that both k and k+1 are Zumkeller numbers (A083207).

%C Terms k such that both k and k+1 are primitive Zumkeller numbers (A180332) are 82004, 84524, 158235, 516704, 2921535, 5801984, ... (A361934).

%C There are infinitely many such k as proven by Somu et al. (2023). - _Duc Van Khanh Tran_, Dec 07 2023

%H Amiram Eldar, <a href="/A328327/b328327.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..5000 from Giovanni Resta)

%H Sai Teja Somu, Andrzej Kukla, and Duc Van Khanh Tran, <a href="https://arxiv.org/abs/2310.14149">Some results on Zumkeller numbers</a>, arXiv:2310.14149 [math.NT], 2023.

%t zumkellerQ[n_] := Module[{d = Divisors[n], t, ds, x}, ds = Plus @@ d; If[Mod[ds, 2] > 0, False, t = CoefficientList[Product[1 + x^i, {i, d}], x]; t[[1 + ds/2]] > 0]]; zq1 = False; s = {}; Do[zq2 = zumkellerQ[n]; If[zq1 && zq2, AppendTo[s, n - 1]]; zq1 = zq2, {n, 2, 10^5}]; s (* after _T. D. Noe_ at A083207 *)

%o (Python)

%o from itertools import count, islice

%o from sympy import divisors

%o def A328327_gen(startvalue=1): # generator of terms >= startvalue

%o m = -1

%o for n in count(max(startvalue,1)):

%o d = divisors(n)

%o s = sum(d)

%o if s&1^1 and n<<1<=s:

%o d = d[:-1]

%o s2, ld = (s>>1)-n, len(d)

%o z = [[0 for _ in range(s2+1)] for _ in range(ld+1)]

%o for i in range(1, ld+1):

%o y = min(d[i-1], s2+1)

%o z[i][:y] = z[i-1][:y]

%o for j in range(y,s2+1):

%o z[i][j] = max(z[i-1][j],z[i-1][j-y]+y)

%o if z[i][s2] == s2:

%o if m == n-1:

%o yield m

%o m = n

%o break

%o A328327_list = list(islice(A328327_gen(),5)) # _Chai Wah Wu_, Feb 13 2023

%Y Cf. A083207, A180332, A361934.

%Y Subsequence of A096399.

%K nonn

%O 1,1

%A _Amiram Eldar_, Oct 12 2019