text: Check if the pentagonal number pn is hexagonal or not
code: seqNum = ( 1 + math . sqrt ( 8 * pn + 1 ) ) / 4 NEW_LINE if ( seqNum == ( int ) ( seqNum ) ) : NEW_LINE INDENT print ( pn , end = " , ▁ " ) NEW_LINE DEDENT