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.

A076713 Harshad (Niven) triangular numbers: triangular numbers which are divisible by the sum of their digits.

This page as a plain text file.
%I A076713 #28 Aug 30 2024 16:34:21
%S A076713 1,3,6,10,21,36,45,120,153,171,190,210,300,351,378,465,630,666,780,
%T A076713 820,990,1035,1128,1275,1431,1540,1596,1770,2016,2080,2556,2628,2850,
%U A076713 2926,3160,3240,3321,3486,3570,4005,4465,4560,4950,5050,5460,5565,5778,5886
%N A076713 Harshad (Niven) triangular numbers: triangular numbers which are divisible by the sum of their digits.
%C A076713 Intersection of A000217 and A005349. - _K. D. Bajpai_, Aug 13 2014
%H A076713 K. D. Bajpai, <a href="/A076713/b076713.txt">Table of n, a(n) for n = 1..15436</a>
%H A076713 Shyam Sunder Gupta <a href="http://www.shyamsundergupta.com/triangle.htm">Fascinating Triangular Numbers</a>
%e A076713 a(5)=21: 21 is a triangular number and also a Harshad number as 21 is divisible by 2+1=3. So 21 is Harshad triangular number.
%t A076713 TriangularNumberQ[k_] := If[IntegerQ[1/2 (Sqrt[1 + 8 k] - 1)], True, False]; Harshad[k_] := Select[Range[k], IntegerQ[ #/(Plus @@ IntegerDigits[ # ])] &]; TriangularHarshad[k_] := Select[Harshad[k], TriangularNumberQ[#] &]; TriangularHarshad[5886] (* _Ant King_, Dec 13 2010 *)
%t A076713 A076713 = {}; Do[k = n*(n + 1)*1/2; If[IntegerQ[k/(Plus @@ IntegerDigits[k])], AppendTo[A076713, k]], {n,1000}]; A076713  (* _K. D. Bajpai_, Aug 13 2014 *)
%Y A076713 Cf. A000217, A005349. Includes A037156(n) for n >= 2. Includes A068127.
%K A076713 nonn,base
%O A076713 1,2
%A A076713 _Shyam Sunder Gupta_, Oct 26 2002