# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a061782 Showing 1-1 of 1 %I A061782 #18 Jul 19 2024 03:14:10 %S A061782 1,3,1,7,2,1,3,15,4,1,5,3,6,2,1,31,8,2,9,6,1,3,11,5,12,3,13,1,14,4,15, %T A061782 63,2,4,3,1,18,5,2,3,20,5,21,12,1,6,23,11,24,6,3,15,26,7,1,21,3,7,29, %U A061782 2,30,8,6,127,5,1,33,2,4,3,35,28,36,9,4,21,3,1,39,26,40,10,41,14,7,11,5 %N A061782 a(n) = smallest positive number m such that m*n is a triangular number. %H A061782 Alois P. Heinz, Table of n, a(n) for n = 1..20000 (first 1000 terms from Harvey P. Dale) %F A061782 For p an odd prime, a(p) = (p-1)/2. For nonnegative k, a(2^k) = 2^(k+1)-1. %F A061782 Formula corrected by Nick Singer, Jun 26 2006 %e A061782 a(4) = 7 as 4*7 = 28 is a triangular number and 7 is the smallest such number. %p A061782 isA000217 := proc(n) %p A061782 issqr(1+8*n) ; %p A061782 end proc: %p A061782 A061782 := proc(n) %p A061782 local a; %p A061782 for a from 1 do %p A061782 if isA000217(n*a) then %p A061782 return a; %p A061782 end if; %p A061782 end do: %p A061782 end proc: %p A061782 seq(A061782(n),n=1..40) ; # _R. J. Mathar_, Oct 03 2014 %t A061782 snt[n_]:=Module[{k=1},While[!OddQ[Sqrt[1+8k n]],k++];k]; Array[snt, 100] (* _Harvey P. Dale_, Feb 15 2017 *) %Y A061782 Cf. A000217, A011772. %K A061782 nonn,easy %O A061782 1,2 %A A061782 _Amarnath Murthy_, May 24 2001 %E A061782 Corrected and extended by _Matthew Conroy_, May 28 2001 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE