Converting a year from the Gregorian calendar to the Mayan calendar is a complex task that involves many calculations based on the Mayan Long Count system. Here is a Python function that can perform this conversion:

```
def gregorian_to_mayan(year):
    # The Mayan Long Count starts at 3114 BCE
    start_year = -3113

    # Calculate the number of days between the start of the Mayan Long Count and the given year
    days = (year - start_year) * 365 + (year - start_year) // 4 - (year - start_year) // 100 + (year - start_year) // 400

    # Convert the number of days to the Mayan Long Count format
    baktun = days // 144000
    katun = (days % 144000) // 7200
    tun = (days % 7200) // 360
    uinal = (days % 360) // 20
    kin = days % 20

    # Return the Mayan Long Count as a string
    return f"{baktun}.{katun}.{tun}.{uinal}.{kin}"
```
Scrivi una funzione per convertire un anno dal calendario gregoriano al calendario maya