cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A377293 Number of days where month plus day equals n, in a non-leap year in the Gregorian calendar.

This page as a plain text file.
%I A377293 #25 Feb 16 2025 11:02:04
%S A377293 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,
%T A377293 12,12,12,11,11,10,10,8,8,6,6,5,3,3,1,1
%N A377293 Number of days where month plus day equals n, in a non-leap year in the Gregorian calendar.
%C A377293 Sum of all terms gives 365.
%e A377293 For n=4 three dates (1st of March, 2nd of February, 3rd of January) sum to n, so a(4) = 3.
%p A377293 (p-> add(coeff(p, x, i), i=2..degree(p)))(add(add(x^(i+j), j=1..
%p A377293 [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][i]), i=1..12));  # _Alois P. Heinz_, Dec 27 2024
%t A377293 dON[d_]:=With[{d1=Take[DateList[d],3]},d1[[2]]+d1[[3]]]; Tally[dON/@DateRange[{2025,1,1},{2025,12,31}]][[;;,2]] (* _Harvey P. Dale_, Feb 16 2025 *)
%o A377293 (Python)
%o A377293 sequence = []
%o A377293 for year in range(2, 43):
%o A377293     current_count = 0
%o A377293     for month, days_in_month in zip(range(1, 13), (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)):
%o A377293         for day in range(1, days_in_month + 1):
%o A377293             if month + day == year:
%o A377293                 current_count += 1
%o A377293     sequence += [current_count]
%Y A377293 Cf. A008685.
%K A377293 nonn,dumb,easy,fini,full
%O A377293 2,2
%A A377293 _Manuel Biwer_, Dec 27 2024