login
a(n) = smallest k such that A000217(n+1) = A000217(n) + (A000217(n) mod k), or 0 if no such k exists.
7

%I #11 Mar 31 2012 14:42:50

%S 0,0,0,0,9,14,10,27,35,22,18,65,77,18,26,119,27,38,34,27,209,46,28,55,

%T 299,36,35,377,45,62,58,45,527,40,54,629,95,54,74,779,63,86,82,63,989,

%U 94,54,161,235,68,91,265,81,65,106,81,145,118,90,1769,1829

%N a(n) = smallest k such that A000217(n+1) = A000217(n) + (A000217(n) mod k), or 0 if no such k exists.

%C a(n) is the weight of triangular numbers.

%C The decomposition of triangular numbers into weight * level + gap is A000217(n) = a(n) * A184219(n) + (n + 1) if a(n) > 0.

%H Remi Eismann, <a href="/A130703/b130703.txt">Table of n, a(n) for n=1..9999</a>

%e For n = 1 we have A000217(n) = 1, A000217(n+1) = 3; there is no k such that 3 - 1 = 2 = (1 mod k), hence a(1) = 0.

%e For n = 5 we have A000217(n) = 15, A000217(n+1) = 21; 9 is the smallest k such that 21 - 15 = 6 = (15 mod k), hence a(5) = 9.

%e For n = 22 we have A000217(n) = 253, A000217(n+1) = 276; 46 is the smallest k such that 276 - 253 = 23 = (253 mod k), hence a(22) = 46.

%Y Cf. A020639, A117078, A117563, A001223, A118534, A090369, A090368.

%K nonn

%O 1,5

%A _RĂ©mi Eismann_, Aug 16 2007 - Jan 10 2011