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”).
%I #20 Mar 08 2020 23:25:54
%S 30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,
%T 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,
%U 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
%N Full days remaining in the month on the Gregorian calendar starting at n-th day of a non-leap year.
%H Jinyuan Wang, <a href="/A327846/b327846.txt">Table of n, a(n) for n = 1..365</a>
%e 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.
%t Array[Range[# - 1, 0, -1] &@ Which[MemberQ[{4, 6, 9, 11}, #], 30, # == 2, 28, True, 31] &, 12] // Flatten (* _Michael De Vlieger_, Sep 30 2019 *)
%o (C++)
%o #include <iostream>
%o using namespace std;
%o int main(){
%o int m=1;
%o for(int d=30;m<=12;d--){
%o cout<<d<<",";
%o if(d==0){
%o m++;
%o if(m==4||m==6||m==9||m==11)
%o d=30;
%o else if(m==2)
%o d=28;
%o else
%o d=31;
%o }
%o }
%o }
%Y Cf. A061251, A073304.
%K nonn,fini,full
%O 1,1
%A _Andrew Pham_, Sep 27 2019