login
Triangle read by rows (row length 2*n+1). Row n lists the integer solutions for x in the equation x - 2^n = x/y (x and y are integers).
2

%I #28 May 20 2023 23:17:31

%S 2,1,3,4,2,3,5,6,8,4,6,7,9,10,12,16,8,12,14,15,17,18,20,24,32,16,24,

%T 28,30,31,33,34,36,40,48,64,32,48,56,60,62,63,65,66,68,72,80,96,128,

%U 64,96,112,120,124,126,127,129,130,132,136,144,160,192,256,128,192,224,240,248,252,254,255

%N Triangle read by rows (row length 2*n+1). Row n lists the integer solutions for x in the equation x - 2^n = x/y (x and y are integers).

%F T(n, k) = 2^n - 2^(n-k-1), if k < n.

%F T(n, k) = 2^n + 2^(k-n), if k >= n.

%F T(n, 0..n-2) = 2*T(n-1, 0..n-2), for n > 1.

%F T(n, n-1) = 2^n - 1, for n > 0.

%F T(n, n) = 2^n + 1, for n > 0.

%F T(n, n+1..2*n) = 2*T(n-1, n-1..2*(n-1)), for n > 0.

%e Triangle begins:

%e k=0 1 2 3 4 5 6 7 8

%e n=0: 2

%e n=1: 1, 3, 4

%e n=2: 2, 3, 5, 6, 8

%e n=3: 4, 6, 7, 9,10,12,16

%e n=4: 8,12,14,15,17,18,20,24,32

%e ...

%e Corresponding values for y in the equation:

%e k=0 1 2 3 4 5 6 7 8

%e n=0: 2

%e n=1: -1, 3, 2

%e n=2: -1,-3, 5, 3, 2

%e n=3: -1,-3,-7, 9, 5,3,2

%e n=4: -1,-3,-7,-15,17,9,5,3,2

%e ...

%o (PARI) T(n,k) = if(k >= n, 2^n + 2^(k-n), 2^n - 2^(n-k-1));

%o (MATLAB)

%o function a = A362311( max_row )

%o r = 2; a = [];

%o for n = 1:max_row

%o a = [a r];

%o r = [2*r(1:n-1) 2^n-1 2^n+1 2*r(end-n+1:end)];

%o end

%o end

%Y Cf. A036289 (row sums).

%Y Cf. A362310.

%K nonn,tabf,easy

%O 0,1

%A _Thomas Scheuerle_, Apr 15 2023