A327846 Full days remaining in the month on the Gregorian calendar starting at n-th day of a non-leap year.
30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6
Offset: 1
Examples
On March 27th, the 86th day of the year where n=86, there are 4 full days left in the month of March, a(86)=4.
Links
- Jinyuan Wang, Table of n, a(n) for n = 1..365
Programs
-
Mathematica
Array[Range[# - 1, 0, -1] &@ Which[MemberQ[{4, 6, 9, 11}, #], 30, # == 2, 28, True, 31] &, 12] // Flatten (* Michael De Vlieger, Sep 30 2019 *)