OFFSET
1,2
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10344
EXAMPLE
a(3) = 12 = 3*(3 * 3 - 1)/2 is a pentagonal number. Since 12 is divisible by 1 + 2 = 3, it is also a Harshad number and therefore in the sequence.
a(5) = 117 = 9*(3 * 9 - 1)/2 is a pentagonal number. Since 117 is divisible by 1 + 1 + 7 = 9 is also a Harshad number, and therefore in the sequence.
MATHEMATICA
A242043 = {}; Do[k = (3*n^2 - n)/2; If[IntegerQ[k/(Plus @@ IntegerDigits[k])], AppendTo[A242043, k]], {n, 300}]; A242043 (* Bajpai *)
Select[Table[n(3n - 1)/2, {n, 200}], Divisible[#, Plus@@IntegerDigits[#]] &] (* Alonso del Arte, Aug 16 2014 *)
Select[PolygonalNumber[5, Range[200]], Mod[#, Total[IntegerDigits[#]]]==0&] (* Harvey P. Dale, Nov 30 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Aug 12 2014
STATUS
approved