login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A377293
Number of days where month plus day equals n, in a non-leap year in the Gregorian calendar.
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 10, 10, 8, 8, 6, 6, 5, 3, 3, 1, 1
OFFSET
2,2
COMMENTS
Sum of all terms gives 365.
EXAMPLE
For n=4 three dates (1st of March, 2nd of February, 3rd of January) sum to n, so a(4) = 3.
MAPLE
(p-> add(coeff(p, x, i), i=2..degree(p)))(add(add(x^(i+j), j=1..
[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][i]), i=1..12)); # Alois P. Heinz, Dec 27 2024
PROG
(Python)
sequence = []
for year in range(2, 43):
current_count = 0
for month, days_in_month in zip(range(1, 13), (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)):
for day in range(1, days_in_month + 1):
if month + day == year:
current_count += 1
sequence += [current_count]
CROSSREFS
Cf. A008685.
Sequence in context: A327886 A331166 A304232 * A357030 A303219 A071523
KEYWORD
nonn,dumb,easy,fini,full,new
AUTHOR
Manuel Biwer, Dec 27 2024
STATUS
approved