%I #9 Aug 24 2022 17:25:37
%S 0,1,6,120,153,190,231,630,703,780,1035,1540,1770,2016,2701,2850,3003,
%T 3160,4005,4560,4950,6670,6903,7140,9180,9730,10011,10296,10585,10878,
%U 12090,12403,12720,13041,14028,14706,15051,15400,16110,17205,19110
%N Hexagonal numbers for which the product of the digits is also a hexagonal number.
%H Amiram Eldar, <a href="/A117063/b117063.txt">Table of n, a(n) for n = 1..10000</a>
%e 24531 is in the sequence because (1) it is a hexagonal number and (2) the product of its digits 2*4*5*3*1 = 120 is also a hexagonal number.
%t pod[n_] := Times @@ IntegerDigits[n]; hexQ[n_] := n == 0 || IntegerQ[(Sqrt[32*n + 4] + 2)/8]; Select[Table[n*(2*n - 1), {n, 0, 120}], hexQ[pod[#]] &] (* _Amiram Eldar_, Feb 06 2021 *)
%t Module[{nn=100,hx},hx=PolygonalNumber[6,Range[0,nn]];Select[hx,MemberQ[ hx,Times@@ IntegerDigits[ #]]&]] (* _Harvey P. Dale_, Aug 24 2022 *)
%Y Cf. A000384, A007954.
%K base,nonn
%O 1,3
%A Luc Stevens (lms022(AT)yahoo.com), Apr 16 2006
%E Offset corrected by _Amiram Eldar_, Feb 06 2021
|