OFFSET
1,2
COMMENTS
This sequence is a subsequence of A117310.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..64
EXAMPLE
51121216 is included because 5*1*1*2*1*2*1*6=120 and 120 is a hexagonal number.
MATHEMATICA
nn=20000; Select[With[{hex=Table[n(2n-1), {n, 0, nn}]}, Select[Accumulate[ Range[ 0, nn]], MemberQ[hex, Times@@ IntegerDigits[#]]&]], DigitCount[ #, 10, 0]==0&]
PROG
(PARI) is(n)=if(ispolygonal(n, 3), my(v=digits(n), p=prod(i=1, #v, v[i])); p && ispolygonal(p, 6), 0) \\ Charles R Greathouse IV, Dec 20 2012
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Harvey P. Dale, Dec 20 2012
STATUS
approved