login
Smallest triangular number which is a multiple (>1) of the n-th triangular number.
5

%I #13 Jan 19 2016 23:46:11

%S 3,6,36,120,45,105,1176,2016,630,990,528,780,3003,210,3240,32640,9180,

%T 11628,2850,630,3003,26565,16836,20100,44850,52650,17766,20706,10440,

%U 12090,461280,61776,11781,3570,25200,43956,221445,30381,5460,189420

%N Smallest triangular number which is a multiple (>1) of the n-th triangular number.

%H Zak Seidov and Chai Wah Wu, <a href="/A068084/b068084.txt">Table of n, a(n) for n = 1..10000</a> n = 1..1000 from Zak Seidov

%e The fifth triangular number is 15; the next triangular number that's divisible by 15 is 45, so a(5)=45.

%t a[n_] := For[k=n+1, True, k++, If[Mod[k(k+1), n(n+1)]==0, Return[k(k+1)/2]]]

%o (Python)

%o from __future__ import division

%o def A068084(n):

%o u,v,t = 4*(n+1),(2*(n+1))**2-1,4*n*(n+1)

%o while True:

%o if not v % t:

%o return v//8

%o v += u+1

%o u += 2 # _Chai Wah Wu_, Jan 13 2016

%K easy,nonn

%O 1,1

%A _Amarnath Murthy_, Feb 18 2002

%E Edited by _Dean Hickerson_, Feb 20 2002