cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A115017 a(n) = largest triangular number dividing n.

This page as a plain text file.
%I A115017 #21 Jun 25 2025 01:08:23
%S A115017 1,1,3,1,1,6,1,1,3,10,1,6,1,1,15,1,1,6,1,10,21,1,1,6,1,1,3,28,1,15,1,
%T A115017 1,3,1,1,36,1,1,3,10,1,21,1,1,45,1,1,6,1,10,3,1,1,6,55,28,3,1,1,15,1,
%U A115017 1,21,1,1,66,1,1,3,10,1,36,1,1,15,1,1,78,1,10,3,1,1,28,1,1,3,1,1,45,91,1,3,1
%N A115017 a(n) = largest triangular number dividing n.
%H A115017 Amiram Eldar, <a href="/A115017/b115017.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%F A115017 a(n) = A083312(n) * (A083312(n) + 1)/2.
%e A115017 a(12) = 6 because the triangular numbers dividing 12 are 1, 3 and 6.
%p A115017 a:=proc(n) local P,j; P:={}: for j from 1 to n do if type(n/(j*(j+1)/2),integer)=true then P:=P union {j*(j+1)/2} else P:=P: fi od: P[nops(P)]; end: seq(a(n),n=1..105); # _Emeric Deutsch_, Mar 01 2006
%t A115017 With[{trnos=Accumulate[Range[100]]},Table[Last[Select[trnos,Divisible[ n,#]&]],{n,100}]] (* _Harvey P. Dale_, Nov 08 2011 *)
%t A115017 a[n_] := Module[{d = Divisors[2*n], nd, m}, nd = Floor[Length[d]/2]; m = Max[Intersection[d[[1 ;; nd]] + 1, d]]; m*(m-1)/2]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Jun 25 2025 *)
%Y A115017 Cf. A000217, A083312.
%K A115017 nonn
%O A115017 1,3
%A A115017 _Leroy Quet_, Feb 23 2006
%E A115017 More terms from _Emeric Deutsch_, Mar 01 2006