login
a(n) is the least k > 0 such that Sum_{j=1..n} j*k^j/(k+n) is integer, for n > 1.
3

%I #24 Dec 10 2021 22:54:47

%S 1,3,1,4,1,7,1,6,1,11,1,4,1,5,1,12,1,19,1,12,1,4,1,40,1,15,1,58,1,31,

%T 1,18,1,7,1,58,1,13,1,22,1,43,1,24,1,10,1,10,1,27,1,22,1,15,1,8,1,31,

%U 1,46,1,9,1,78,1,15,1,36,1,71,1,112,1,10,1,14,1,55

%N a(n) is the least k > 0 such that Sum_{j=1..n} j*k^j/(k+n) is integer, for n > 1.

%C a(n) represents the smallest integer solution of the equation (x + 2*x^2 + ... + (n - 1)*x^(n - 1) + n*x^n)/(x + n) = m, where m is any positive integer.

%C We have a(2*k) = 1 for k > 0 because Sum_{j=1..n} j/(1+n) is equal to n/2. For x > 1, Sum_{j=1..n} j*x^j/(x+n) can be simplified to (x + x^(1+n)*(n*x-n-1))/(n+x)*(x-1)^2). - _Giovanni Resta_, May 24 2020

%H Antti Karttunen, <a href="/A335113/b335113.txt">Table of n, a(n) for n = 2..3612</a>

%F a(2*n) = 1, for n > 0. - _Giovanni Resta_, May 24 2020

%e For n = 3, a(3) is the smallest integer k > 0 such that f(k) = (3k^3 + 2k^2 + k)/(k + 3) is an integer. Since f(k) is integer for k = 3, 8, 19, 30, 63, we have a(3) = 3.

%t f[n_, x_] := Sum[j x^j/(x + n), {j, n}]; a[n_] := Block[{k=1}, While[! IntegerQ@ f[n, k], k++]; k]; a /@ Range[2, 79] (* _Giovanni Resta_, May 24 2020 *)

%o (PARI) A335113(n) = for(k=1,oo,if(!(sum(j=1,n,j*(k^j))%(k+n)),return(k))); \\ _Antti Karttunen_, Dec 09 2021

%Y Cf. A335112, A335114.

%K nonn

%O 2,2

%A _Marco RipĂ _, May 23 2020

%E More terms from _Giovanni Resta_, May 24 2020