login
a(n) is the least k > 0 such that A000217(k) is divisible by n+k, except a(2) = 0.
1

%I #31 Aug 10 2020 13:18:19

%S 1,2,0,3,8,15,4,7,48,15,5,11,21,26,12,6,32,255,16,19,56,7,11,23,45,15,

%T 24,12,8,87,28,31,960,63,17,35,9,74,36,18,25,164,40,43,128,10,23,47,

%U 93,63,20,24,16,159,52,11,21,76,29,59,117,122,60,30,128,255,12,67

%N a(n) is the least k > 0 such that A000217(k) is divisible by n+k, except a(2) = 0.

%C a(2) = 0 as there is no k > 0 such that A000217(k) is divisible by k+2 (Proof: Suppose a(2) = k > 0. Then z = (k*(k+1)/2)/(k+2) is an integer. Notice that z = (k*(k+1)/2)/(k+2) = (k-1)/2 + 1/(k+2). Let (k-1)/2 = m, 1/(k+2) = t. Since k-1 is an integer, either m or m + 1/2 is also an integer. Since z = m+t and z is an integer, either t or t + 1/2 is an integer. However, for any k > 0, we have t < 1/2 and t > 0, so neither t nor t + 1/2 is an integer, which is a contradiction. Hence, there is no k > 0 such that a(2) = k).

%H Maciej Skrzypczak, <a href="/A336326/b336326.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = Min_{k>0} (1/2) * (k-n+1+n*(n-1)/(k+n)) is an integer.

%e a(9) = 15, because A000217(15) (i.e., the 15th triangular number: 120) is divisible by 15+9 (indeed, 120/(15+9) = 120/24 = 5) and there is no other k > 0 and < 15 such that A000217(k) is divisible by k+9.

%t a[2] = 0; a[n_] := Module[{k = 1}, While[!Divisible[k*(k + 1)/2, n + k], k++]; k]; Array[a, 68, 0] (* _Amiram Eldar_, Aug 08 2020 *)

%o (PARI) a(n) = {if (n!=2, my(k=1); while(k*(k+1)/2 % (n+k), k++); k);} \\ _Michel Marcus_, Jul 18 2020

%Y Cf. A000217.

%K nonn

%O 0,2

%A _Maciej Skrzypczak_, Jul 17 2020