Fortune Telling Collection - Free divination - Does anyone know how birthdays are calculated?
Does anyone know how birthdays are calculated?
Branches.
The formula for calculating the branch date from the known date is very similar to the formula of the lottery, as shown below:
g = 4C+[C/4]+5y+[y/4]+[3 *(M+ 1)/5]+d-3
Z = 8c+[c/4]+5y+[y/4]+[3 * (m+1)/5)+d+7+I (i=0 in odd months and i=6 in even months).
Where c is the number of centuries minus one, y is the last two digits of the year, m is the month and d is the number of days. 1 and February according to the previous year's 13 and.
65438+ April. The remainder of g divided by 10 is heavenly stems, and the remainder of z divided by 10 is earthly branches.
Using several formulas related to stem and branch skillfully, the stem in ancient books can be calculated without a perpetual calendar.
Branch date corresponding to Gregorian calendar date.
-
Ganzhi Jiri has been used since the Xia Dynasty. According to the solar eclipse recorded in China's ancient historical classics "Spring and Autumn Annals"
According to textual research, the date of China's official branch was from February 3rd, Lu Yingong (BC 10 February) to.
Today, it has never stopped. The chronology of cadres and branches appeared later, and it was not officially announced until the second year of Jian 'an in the Eastern Han Dynasty (AD 85).
It has been ordered to be implemented throughout the country and has not been interrupted so far. Therefore, anyone who needs to be exposed to the history of China will inevitably encounter censorship.
The main branch of a certain year or day, and the problem of calculating which year or day from the annual main branch and the daily main branch. through
Usually, this transformation can be solved by looking up the almanac. But because the main branch is also a circulatory system, there are years and years naturally.
The formula for finding the expenditure by date.
Before introducing the formulas of seeking annual dry branches and daily dry branches, first introduce the characteristics of dry branches. The branch is heavenly stems and earthly branches.
Combination. There are ten heavenly stems, namely, A, B, C, D, E, Ji, G, Xin, Ren and Gui; There are twelve earthly branches, namely
Zi, Ugly, Yin, Mao, Chen, Si, Wu, Wei, Shen, You, Xu, Hai. Heavenly stems and earthly branches starts with "Jiazi" and follows the order.
Sequences are matched one by one. When used in the last one, they continue to match from the first one to form sixty branches, also called branches.
Sixty flowers. Why are there sixty branches? This is easy to answer mathematically. According to the composition of the trunk and branches
Part, its period must be the least common multiple of the number of heavenly stems and terrestrial stems. And 60 is the least common multiple of 10 and 12.
If we number "Jiazi" as 1 and "Ugly B" as 2, we can get a stalk if we continue like this.
And serial number, as follows:
1 .jiazi 2. Ugly B 3 Bing Yin 4. Ding Mao 5. Chen Wu 6. Keith 7. Wu Geng 8. Xin Wei
9. Ren Shen 10. Gui You 1 1. JOE 12. Yihai 13. Bing Zi 14. Ding Chou 15. Wuyin 16. Ji.
17. Chen Geng 18. Xinsi 19. Renwu 20. Guiwei 2 1. Shen Jia 22. Yiyou 23. Xu Bing 24. Ding hai.
25. Wu Zi 26. Ugly 27. Geng Yin 28. Xinmao 29. Yan Chen 30. Your company 3 1. Wu Jia 32. the Kingdom of Wei(220-265 A.D)
33. bing Shen 34. Dingyou 35. The reform movement of 1898. Jihai 37. Gengzi 38. Xin Chou 39. Ren Yin 40. Guimao
4 1 .Chen Jia 42. Yisi 43. Bingwu 44. Ding Wei 45. Wu Shen 46. Ji You 47. Geng Xu 48. Xinhai
49. Xunzi 50. Guichou 5 1. Good news 52. Mao yi 53. Chen Bing 54. Ding si 55 Five, five, six Not anymore.
57. Geng Shen 58. Heart has 59. Ren Xu 60. Guihai
Looking closely at this table, it is not difficult to find that it is easy to get the corresponding branch from the serial number, and the remainder of the serial number divided by 10.
Is the ordinal number of the stem (if the remainder is 0, it is the last stem), and the remainder of the serial number divided by 12 is the order of the branches.
Number (the last branch if the remainder is 0). For example, Route 37, because 37 mod 10=7(mod means
Take the remainder), the corresponding trunk is Geng, 37 mod 12= 1, and the corresponding branch is Zi, so the trunk No.37 is Geng.
Obviously, the remainder of an integer divided by 10 is its single digit, which makes it easier to find the sky.
It is not difficult to infer its serial number from the main branch. This is actually a problem of solving congruence equations. We use initials.
The remainder theorem in China's equality theory can be solved. For example, to calculate the serial number of the five-five plan, you can get it from the serial number according to the above.
According to the principle of trunk and branch, it is easy to get the following equation:
{ x mod 10 = 5
{ x mod 12 = 7。
Where x is the sequence number of the branch to find. According to China's remainder theorem, there are:
x ≡ 6 * 5 - 5 * 7 (mod 60) = 55,
That is, the serial number of the fifth five-year plan is 55. This is consistent with the comparison table above. Generally speaking, if the number of the heavenly stems is M, the earthly branches
If the sequence number is n, the sequence number of the main branch is:
x ≡ 6m - 5n (mod 60) ( 1)
Simply put, if the result of 6m-5n is positive, this number is the serial number of the main branch; If it is negative, add 60.
Is the sequence number of the main branch.
Understand the mutual calculation of main branches and their serial numbers. First, introduce the calculation of annual main branches. It should be noted that,
The calendar year of the main branch is the lunar year, not the Gregorian year. However, because the beginning of the lunar year is closer to the beginning of the Gregorian year,
So that the lunar year always coincides with most of the time in a Gregorian calendar year, so it is usually represented by the Gregorian calendar year and most of its time.
Coincident lunar year. In this way, it is easy for us to give the serial numbers of the main branches in the lunar year as follows:
x = (Y-3) mod 60,(2)
Where y is the year. Get the serial number X of the trunk and you can find the corresponding trunk. For example, the number of main branches in 2004:
x =(2004-3)mod 60 = 200 1 mod 60 = 2 1,
2 1 mod 10= 1, the aerial stem is a, 2 1 mod 12=9, and the underground branch is Shen, so 2004 is Shen Nian.
After careful observation, it can be found that in fact, if you directly divide Y-3 by 10, you can get Tiangan, and divide it directly by Y-3.
12, you can get the ground branch. this is because
x = (Y-3) mod 60
be equal to
Y-3 = 60 * n + x,
Where n is the quotient of Y-3 divided by 60. When both sides of the equation are divided by 10 at the same time, the remainder must be equal. The first item on the right is 60.
Multiplication, also a multiple of 10, can be an integer of 10, so the remainder of Y-3 divided by 10 must be equal to the remainder of x divided by 10.
Count.
Therefore, in fact, you don't need to find the serial number of the stem first, you can find the heavenly stem and the earthly branch separately, and together they are dry.
Branch, thus reducing one step operation. For Nianzao, just look at the last one. Year ending in 4
Our heavenly stems are always A, and the heavenly stems of years ending in 5 are always B … and so on.
Let's look at the calculation of daily cadres. We can imitate the calculation of a week and get a more intuitive calculation of daily expenses.
The formula is as follows:
g =(Y- 1)* 5+[(Y- 1)/4]-[(Y- 1)/ 100]+[(Y- 1)/400]+D+ 15,(3)
Where y is the year, d is the cumulative number of days, and [...] represents the quotient, that is, only the integer part of the calculation result is taken. Divide g
With 60, the remainder is the serial number of the main branch. Or divide g by 10 or 12, and you can directly get the sun-sky stem and the sun-earth branch. no
However, like the similar formula for finding Zhou Gong, this formula is not concise enough, especially the first term (Y- 1)*5, in
When y is a four-digit year, the calculation result is a large four-digit or five-digit number, which is not convenient for oral calculation.
We can improve this formula by deducing Culler formula. Let's first look at the improvement related to the year.
We know that according to the leap rule of the Gregorian calendar, the total number of days in a century may be 36,524 days, which is 36,525 days. If this
The year with 00 at the end of the century is a leap year, and this century has only 36,525 days; Otherwise, it will only be 36,524 days. We might as well.
A century with 36,524 days is called a "flat century" and a century with 36,525 days is called a "leap century". Ping century, because
36524 mod 60 = 44,
So every century, the main branch of the same day will push back 44 serial numbers. Similarly, every leap century, the same
One day, the main branch was pushed back by 45 serial numbers. This makes it easy for us to get the calculation of the first year (year) of each century.
Formula ending in 0 1) March 1:
G = 44C + [C/4] + 15,(4)
Where c is the number of centuries minus one.
And the formula for calculating the trunk and branches on March 1 day of any year can also be obtained quickly:
g = 44C+[C/4]+5(y- 1)+[y/4]+ 15,
that is
G = 44C + [C/4] + 5y + [y/4] + 10,(5)
Where y is the last two digits of the year.
Let's list the days of each month:
Month 1, February, March, May, June, July, August, September 10,1,12.
-
Days 3128 (29) 3130313031313031.
Subtract 30
The remaining days are1-2 (-1)1010/.
If we regard October and February of 65438 as March and April of 65438 of the previous year, we can also get the following formula:
d '≦[3 *(M+ 1)/5]+d-2(mod 10)(6)
and
D' ≡ 3 * (m+1)/5)+d-2+I (mod12) (odd months i=0, even months i=6), (7)
Where d' is the cumulative number of days from March 1, m is the month and d is the number of days. Merge (6), (7) and (5)
Get up, and then make appropriate simplification to get the heavenly stems and earthly branches calculation formula for any day in the Gregorian calendar:
g = 4C+[C/4]+5y+[y/4]+[3 *(M+ 1)/5]+d-3; (8)
Z = 8c+[c/4]+5y+[y/4]+[3 * (m+1)/5)+d+7+I (i=0 in odd months and i=6 in even months).
(9)
If g is obtained first, then
Z = g+4C+ 10+i (i=0 for odd months and I = 6 for even months). ( 10)
The single digit of G is the Tiangan serial number, and the remainder of Z divided by 12 is the Earthbranch serial number. It needs to be emphasized again here: 1 and February are.
Calculated as 65438+March and 65438+April of the previous year, so c and y should also be taken according to the year of the previous year.
We can compare (8) and (9) with Chuller's formula:
w =-2C+[C/4]+y+[y/4]+[ 13 *(M+ 1)/5]+d- 1,
It can be seen that their forms are very similar, and the difference is only a few constants.
Although it is no longer necessary to record the daily expenditure in China, it is sometimes necessary to calculate the daily expenditure. For example, calendars are somewhat different.
It is said that "three volts", "entering the plum blossom" and "leaving the plum blossom" are all related to Japanese dry branches. Three volts, including the initial, middle and final volts, refers to summer.
In the hottest time of the day, plum blossom entering plum blossom and plum blossom leaving plum blossom refer to the beginning and end of the rainy season in the south of the Yangtze River, which was originally related to the climate.
Language. However, because there was no accurate weather forecast in ancient times, it was impossible to accurately predict the dog days and the time of entering and leaving Mei, so
In the almanac, it is hard to specify a few days as the date when the dog days begin and when plum blossoms come and go, so as to determine an approximate date for reference.
Testing. Although there is a more accurate weather forecast now, as a traditional calendar, Sanfu and Meiru have been handed down.
Let's go
According to the calendar, the third Geng Day after long summer is the beginning of the first autumn, * * * ten days; The fourth Geng Day starts from Zhongfu and lasts for ten days.
Or twenty days; After beginning of autumn, the first Geng Day started with the last beginning of autumn and lasted for ten days. The reason why the length of the upper abdomen is not fixed is
The dates of summer solstice, beginning of autumn and Geng Day fluctuate year by year, and the first Geng Day after beginning of autumn may be after summer solstice.
The fifth Geng day may also be the sixth Geng day. If it is the former, it will take more than ten days in the middle; If it is the latter, it is medium.
Up to 20 days. Please note that if the day of summer solstice is Geng Day, the first Geng Day after summer refers to the tenth day after summer, and
This is not the day of summer solstice, but the first day of the first autumn is the thirtieth day from summer to the future. Similarly, if that day in beginning of autumn is Geng Day, it will be over.
The first day of Fu was the tenth day after beginning of autumn, not the day in beginning of autumn. Entering plum means after mango comes out on the first day.
Mei refers to the first weekend after the slight summer heat, and there are the same rules.
Knowing this, we can calculate the beginning, middle and end of 2004. This requires a prophet.
Summer solstice and early autumn. If we know that the summer solstice is June 2 1 and beginning of autumn is August 7, then use formula (8), summer solstice.
G this day is:
g = 4 * 20+[20/4]+5 * 4+[4/4]+[3 *(6+ 1)/5]+2 1-3
= 80 + 5 + 20 + 1 + 4 + 2 1 - 3
= 128,
Single digit 8, the sky is dry and the things are dry. Xia Hou's third Geng Day is the 29th day of Xia Hou, that is, July 20th.
That is, the first day of the first night. The first day of Zhongfu is July 30th. You can also count the beginning of Qiuke as this day:
g = 4 * 20+[20/4]+5 * 4+[4/4]+[3 *(8+ 1)/5]+7-3
= 80 + 5 + 20 + 1 + 5 + 7 - 3
= 1 15,
Today is May Day. The first Geng Day after beginning of autumn is the day after beginning of autumn, that is, August 9th, which is the last day.
Jesus Christ. It can be seen that the mid-autumn in 2004 was only ten days. It can also be calculated from the dates of the two solar terms, namely, mango and Xiaoshu.
Plum Blossom Day and Plum Blossom Day in 2004 were June 6th and July 15 respectively.
On the other hand, knowing the year branch and the day branch, it is relatively troublesome to find the corresponding year and day. Because of dryness
Branches are recycled, so you must first know which cycle the main branch corresponding to the year and date belongs to. take for example
We use formula (2) to calculate in advance that 1864, 1924 and 1984 are all Jiazi years. If we want to know where the reform movement in 1898 is,
A year, first of all, must be determined at the end of 19, that is, it belongs to the cycle starting from 1864. that
Yao, we can use the formula (1) to calculate that the serial number of the year of 1898 is 35, so the year of 1898 is (1864-1)+35 =1898.
The reason why we need to subtract one first is because the serial number of Jiazi is 1, so we need to subtract this serial number first.
As for the Japanese dry branch, because the Japanese dry branch in ancient books is always used with the year and month, it is not difficult to determine that it belongs to.
Which cycle? As recorded in the Biography of Emperor Ming Taizu Zhuang Lie, the day when Zhu Youjian hanged himself in Jingshan Park was Chongzhen.
Sixteen years in March, Ding Wei. In the sixteenth year of Chongzhen, AD 1644. Although March is the third month of the lunar calendar, we know agriculture.
Although the dates in the Gregorian calendar are floating, they are not within a certain range. For example, the first day of the third lunar month is always there.
The Gregorian calendar floats from March 22nd to April 19. So, let's first calculate the main branches of March 22nd 1644. We have:
g = 4 * 16+[ 16/4]+5 * 44+[44/4]+[3 *(3+ 1)/5]+22-3
= 64 + 4 + 220 + 1 1 + 2 + 22 - 3
= 320,
The unit number is 0,
z = g + 4C + 10
= 320 + 64 + 10
= 394,
Divided by 12, it is 10, so the main branch of this day is Gui You, and its serial number is 6*0-5* 10+60= 10. Ding Wei's serial number is
6*4-5*8+60=44, which is 34 days after the default, so March must be 34 days after March 22, which is April 25.
Day. That is to say, the date when Chongzhen hanged himself was1April 25, 644, which was consistent with the result of calendar search. The ancients in China adopted the chronology of cadres and branches. Up to now, we have often mentioned what heavenly stems and earthly branches was in a certain year. For example, this year is the year of Wuzi, and last year was the year of Dinghai, in which Zi and Hai respectively represent the zodiac rats and pigs in these two years. So few people don't know what heavenly stems and earthly branches is, but few people understand the close relationship between the main branch and the five elements of Yin and Yang. In fact, every heavenly stems and earthly branches has its own Yin and Yang elements. It is precisely because of the unique attributes of the five elements that the birthdays represented by the branches and branches can be linked with the five elements, and numerology scholars can reason people's fate according to the five elements. Since we are talking about numerology, let's start with the most basic things and get to know the twelve branches in ten days. Branches, as the name implies, mean trunks and branches. There are branches and stems, which are a complete tree, so the heavenly stems branch below the ground, and this combination is a complete whole. The ancients originally named heavenly stems and earthly branches with this meaning, but in the eight-character numerology, the earthly branches are more like the roots of plants growing underground. In order to facilitate the following research, we might as well understand that heavenly stems and earthly branches's combination is like a tree. The heavenly stems are the branches of the trees on the ground, and the earthly branches are the roots of the underground. This metaphor is of great significance in numerology, and everyone will gradually realize it. Ganzhi was born for quite a long time, and the specific situation is unknown, but it is certain that it existed before Shang Dynasty, because we can see that the emperors of Shang Dynasty liked to take some names related to Ganzhi, such as Taijia, Tianyi and so on. There are exactly twelve earthly branches in twelve months of a year, so it is easy to think that the ancients used earthly branches to record the month at first, but later they began to record the year, month, day and hour with sixty jiazi, a combination of earthly branches and earthly branches, and a complete method of geochronology was established. One day every month, take a day to make a branch, and you will have what we usually call a "birthday". There are five elements in ten days, but the fire, water and soil in Jin Mu are divided into yin and yang, so 25 10 is just right for ten days. For example, A is positive wood, B is negative wood, C is positive fire and D is negative fire. Specifically, there is a song that reads: "East, fire in the south, gold in the west, water in the north, and infinite soil in the middle." The attributes of the ten stems are odd-numbered Yang, even-numbered Yin, and Yin and Yang alternate, and the adjacent ten stems are in a five-element relationship. Such as A, B, Mu and Ding Huo, Ding Huo and Wuji, and so on. In this way, the five elements of the ten-day trunk and even the orientation meaning are clear at a glance, which is very simple and clear. But the twelve branches are far more complicated than the heavenly stems. We know that things above the ground are clear and easy to see, but things below the ground are hidden deep. Roots and roots are easily intertwined and difficult to distinguish, so the attributes of earthly branches become complicated and difficult to distinguish. We divided the Twelve Earthly Branches into three groups, four in each group, namely Wang Si, Sisheng and Siwu. Wang Si, this is the simplest group. They are Zi, Wu, Mao and You. Their five elements are very simple, that is, children are yin water, martial arts are yin fire, hair is yin wood, and unitary is yin gold. Because in ten days, decyl means yin water, so we say that decyl is hidden in the child. Similarly, we say that Ding hides in the afternoon, B hides in the base, and Xin hides in the unitary. The word "hidden" has a somewhat implicit meaning. Underground branches are naturally hidden parts. From another angle, we can also think that Zi is the root of Gui Shui, Wu is the root, and Mao is the root of ebony, especially Xinjin. The earthly branch is the root of heavenly stems left underground, but the meridian and the four roots of You Mao are not intertwined, so it is very simple and easy to distinguish. Four students, this group is relatively simple, namely Yin, Si, Shen and Hai. Yin, this root is formed by winding three roots, namely, Yang wood, Yang fire and Yang soil, that is, Jiabingwu, in which the root is relatively thick, and we call it the qi of the ground branch of Yin; Third, it is also formed by winding three roots, namely, yang fire, yang soil and yang gold, namely propyl heptyl, in which three fires are the roots of the three; Shen is also interwoven by Yangtu, Yangjin and Yangshui, that is, the people of the Reform Movement of 1898, in which Geng Jin is Shen's earthly branch and qi; The sea is unique because the two roots are intertwined. They are yang water and yang wood, that is, nonyl, in which nonyl water is the root gas of Hai. We can easily find two laws: first, the Tibetan trunk of this group of earthly branches is positive. Yes, methylprednisolone happens to be all positive five elements. Through calculation, except for bentonite, it appeared three times, and the rest appeared twice. Second, the original gas of these four branches is wood fire and gold water, and there is no soil. Yes, the above two points fully show that soil is a special five elements. Why is it special? Let's look at Siku again. Apart from the four prosperous and four students mentioned above, there are only four ugliness left in the twelve branches, which is what we want to say. These four branches of the earth are all soil, among which the soil in Chen Xu is soil, and ugliness is soil. The basic characteristics of soil are storage, bearing and capacity, so we have the name of four reservoirs. And these four libraries happen to be the other four libraries in the five elements. Chen is the library, Xu is the fire library, and Ugliness is the library, not the wooden library. The library, also called the tomb, is the place where the five elements hide and rest. Since it is a reservoir, there must be water in it, but the water in the tomb is obviously negative, so there is cinnamon water in it. Similarly, fire vaulting horse has yin, ugly vaulting horse has yin Jin Xin, and wooden vaulting horse has yin. Among aquatic trees, there are often some roots and buds of vegetation in the reservoir, so Chen Youshu is also hidden in the tomb. Naturally, it is cloudy. Wood makes a fire, and sporadic sparks often burst out in the wood library. If you miss it, there will be a dangerous fire. Gold begets water, and the ugly library has yin water. The only difference is the fire warehouse. Fire is native, but the original gas of fire is soil, so the soil is getting stronger and stronger, and finally Yin is born from the soil. To sum up, the four libraries all contain three or five elements, namely, morning, middle, middle, ugly, ugly, but not right. Ok, here, the relationship between heavenly stems and earthly branches and the five elements of Yin and Yang is basically clear. Friends who don't understand can continue to ask questions, and I will give you supplementary answers. Interested friends, please continue to pay attention to the next article. Attachment: The original meaning of heavenly stems and earthly branches is 1. Tiangan (A) sprouted like a grass forest, and the sun shaded it. Others think that the armor of armor also highlights everything by breaking through its armor. (b) The vegetation is primary, with soft, elastic and slender branches and leaves. The second one is rolling. (C) C, C, like the bright sun, scorching fire, everything belongs to Ming Che. (d) vigorous, vegetation grows vigorously, just like a person's maturity. (e) Mao Ye symbolizes the lush vegetation on the earth. From (since), discipline is also, everything turns back, tangible and disciplined. (g) More importantly, the autumn harvest should wait until spring. (Xin) Jin Weixin, when things are done, they will taste. Others believe that the new is also new, and they are in awe of all changes and show new achievements. Pregnancy, when everything is pregnant, the sun is an elf lurking underground. (1) Yes, everything is hidden, gestated, underground and budding. 2. The evil of the earth branch (child), the vegetation giving birth to children, absorbing water from the soil, is the beginning of a budding. (Ugly) Cattle fields, where vegetation germinates, bends and leaves the ground. Swallow leaves, gold leaves, flowers and trees that bend in the cold soil protrude from the ground to meet the spring day. (Ye Mao, Rizhao East, everything is thriving. (Chen) The earthquake also extended that everything was born from the earthquake, and the sun was over half. (3) Everything begins to grow, yin disappears, and pure yang has no yin. (noon) Hey, everything is full and full, the yang is full, and the yin is budding. Delicious (not delicious), ripe fruit is delicious. (Shen) Both the body and the object have grown up. You are still alive when you are old, and everything is still shrinking and converging. Extinction, vegetation withers, anger goes out. (sea) illegal, illegal killing, has reached the extreme.
- Related articles
- What eyebrow shape is suitable for your face? A picture tells you.
- Look for three kinds of animals and three kinds of plants
- When is the most effective time to burn incense in the morning?
- A high-quality copy worthy of collection can cure the sober immortal sentences in the world.
- Does anyone know the meaning of 54 cards?
- Are there any meaningful sentences that guard every word of sweetheart? ~~
- What jewelry can bring you good luck?
- Look at the astrolabe. I don't know when it was born.
- What are the flower dictionaries?
- Please help us think of a fun game!