import math


def is_pentagonal(number):
    """
    Check given number to be a pentagonal number.

    :param number: value to be checked to be a pentagonal number.
    :returns: True when given value is a pentagonal number
    see http://en.wikipedia.org/wiki/Pentagonal_number

    >>> is_pentagonal(12)
    True
    >>> is_pentagonal(13)
    False
    """
    value = (math.sqrt(24 * number + 1) + 1) / 6.0
    return value > 0.0 and value == int(value)