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.

Showing 1-9 of 9 results.

A119406 Years in which there are five Sundays in the month of February.

Original entry on oeis.org

1756, 1784, 1824, 1852, 1880, 1920, 1948, 1976, 2004, 2032, 2060, 2088, 2128, 2156, 2184, 2224, 2252, 2280, 2320, 2348, 2376, 2404, 2432, 2460, 2488, 2528, 2556, 2584, 2624, 2652, 2680, 2720, 2748, 2776, 2804, 2832, 2860, 2888, 2928, 2956, 2984, 3024
Offset: 1

Views

Author

George G. Szpiro (george(AT)netvision.net.il) and Robert G. Wilson v, Jul 05 2006

Keywords

Comments

"The Gregorian calendar has been in use in the Western world since 1582 by Roman Catholic countries and since 1752 by English speaking countries. The Gregorian calendar counts leap years every year divisible by 4, except for centuries not divisible by 400, which are not leap years." - The Mathematica Book
Because the days of the week of the Gregorian calendar repeat every 400 years, the first differences of this sequence have period 13: [28, 40, 28, 28, 40, 28, 28, 28, 28, 28, 28, 40, 28]. - Nathaniel Johnston, May 30 2011

References

  • George G. Szpiro, The Secret Life Of Numbers, 50 Easy Pieces On How Mathematicians Work And Think, Joseph Henry Press, Washington, D.C., 2006, Chapter 1, "Lopping Leap Years", pages 3-5.

Crossrefs

Cf. A135795 (Mon), A143994 (Tue), A141039 (Wed), A143995 (Thu), A141287 (Fri), A176478 (Sat).

Programs

  • Maple
    A119406 := proc(n) local s: s:=[0, 28, 68, 96, 124, 164, 192, 220, 248, 276, 304, 332, 372]: return 1756 + 400*floor((n-1)/13) + s[((n-1) mod 13) + 1]: end: seq(A119406(n),n=1..42); # Nathaniel Johnston, May 30 2011
  • Mathematica
    (* first do *) Needs["Miscellaneous`Calendar`"] (* then *) fQ[y_] := Mod[y, 4] == 0 && Mod[y, 400] ? 0 && DayOfWeek[{y, 2, 1}] == Sunday; Select[ Range[1582, 3051], fQ@# &]
    (* Second program, needing Mma version >= 9.0 *)
    okQ[y_] := Mod[y, 4] == 0 && DayCount[{y, 1, 31}, DatePlus[{y, 3, 1}, -1], Sunday] == 5;
    Select[Range[1752, 3051, 4], okQ] (* Jean-François Alcover, Mar 27 2020 *)

A057349 Leap years in the Hebrew Calendar starting in year 1 (3761 BCE). The leap year has an extra month.

Original entry on oeis.org

3, 6, 8, 11, 14, 17, 19, 22, 25, 27, 30, 33, 36, 38, 41, 44, 46, 49, 52, 55, 57, 60, 63, 65, 68, 71, 74, 76, 79, 82, 84, 87, 90, 93, 95, 98, 101, 103, 106, 109, 112, 114, 117, 120, 122, 125, 128, 131, 133, 136, 139, 141, 144, 147, 150, 152, 155, 158, 160, 163, 166
Offset: 1

Views

Author

Keywords

Comments

A Hebrew year approximates a solar year with 12 and 7/19 lunar months (or 19 years with 235 months, the 19-year Metonic cycle).
Also numbers m such that (1 + 7*m) mod 19 < 7.
In equal musical temperament, when an octave is divided into twelve half steps (a half step involves two notes and a whole step involves three notes, giving a total of thirteen notes including the octave), whole (w) and half (h) step intervals of the major scale follow a pattern of 2w-1h-3w-1h. Assigning the integer 2 (notes) to the half-step and 3 (notes) to the whole-step intervals will result in the same sequence when applied to the major scale. - Gergely Földvári, Jul 28 2024

References

  • N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.

Crossrefs

Cf. A008685, Hebrew month pattern A057350, A057347.
Cf. A350458 (JDN of Tishri 1 each year starting with year 1).
Cf. A083033 (Dorian musical scale), A083089 (Lydian musical scale).

Programs

Formula

a(n) = floor((19*n + 5)/7).
a(n) = A083033(n) + n + 2. - Ralf Stephan, Feb 24 2004
a(n) = A083089(n+1) + n. - Robert B Fowler, Dec 07 2022
G.f.: x*(2*x^6 + 3*x^5 + 3*x^4 + 3*x^3 + 2*x^2 + 3*x + 3)/((x - 1)^2*(x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)). - Colin Barker, Jul 02 2012

A061251 Days in year to end of n-th month starting Jan 01 in a year just following a leap year or millennium.

Original entry on oeis.org

0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 424, 455, 485, 516, 546, 577, 608, 638, 669, 699, 730, 761, 789, 820, 850, 881, 911, 942, 973, 1003, 1034, 1064, 1095, 1126, 1155, 1186, 1216, 1247, 1277, 1308, 1339, 1369, 1400, 1430, 1461
Offset: 0

Views

Author

N. J. A. Sloane, Jun 03 2001

Keywords

Comments

y1=2001 y2=2004 in the PARI code.
In order to define this infinite sequence uniquely one has to fix a starting year. From the given entries this could be any year lying three years before a leap year. In accordance with A008685 let's start with Jan 01 2001, three years before 2004 (following the leap year 2000). - Wolfdieter Lang, May 04 2011

Crossrefs

Partial sums of A008685.

Programs

  • PARI
    dom(y1,y2) = /* days of the year */
    { local(x,y,m,s=0);
      m=ml=vector(12);
      m=[31,28,31,30,31,30,31,31,30,31,30,31]; /* days of month */
      /* May be leap year if year div by 4: */
      for(y=y1,y2, for(x=1,12, s+=m[x]; if(x==2, if(y%4==0,s++);
      /* Adjust if century mod(4)<>0: */
      if(floor(y/100)%4 & y%100==0,s--);
    );
    print1(s",") ) ) }
    \\ Cino Hilliard, Mar 29 2005

A057347 Leap years in the Islamic calendar starting year 1 AH (Anno Hegirae) = 622 CE (Common Era or AD). There are 11 leap years in a 30 year cycle.

Original entry on oeis.org

2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40, 43, 46, 48, 51, 54, 56, 59, 62, 65, 67, 70, 73, 76, 78, 81, 84, 86, 89, 92, 95, 97, 100, 103, 106, 108, 111, 114, 116, 119, 122, 125, 127, 130, 133, 136, 138, 141, 144, 146, 149, 152, 155, 157, 160, 163, 166
Offset: 1

Views

Author

Keywords

Comments

An Islamic year approximates 12 lunar months with 354 11/30 days (or 30 years with 10631 days).
Also, numbers m such that ((14 + 11*m) mod 30) < 11.
Worldwide, five different Islamic leap-year sequences are currently in use; this sequence (called "Fazari") is the most common of the five. See A350539. - Robert B Fowler, Dec 07 2022

References

  • N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.

Crossrefs

Cf. A057349 (Hebrew calendar leap years).
Cf. A057348 (Islamic months lengths), A008685 (Gregorian months lengths),
Cf. A350539 (Islamic New Year JDN and 8 Islamic calendar variants).

Programs

  • Mathematica
    Select[Range[100], LeapYearQ[{#}, CalendarType -> "Islamic"]&] (* Jean-François Alcover, Apr 26 2020 *)

Formula

a(n) = floor((30*n - 4)/11).

A115100 Mayan calendar periods in days.

Original entry on oeis.org

1, 20, 360, 7200, 144000, 1872000
Offset: 1

Views

Author

Jonathan Vos Post, Mar 02 2006

Keywords

Comments

"Mayan primes" may be defined as these periods plus or minus 1, namely: 2, 19, 359, 143999, 1872001. Note also that 361 = 19^2; 144001 = 11 * 13 * 19 * 53.
From the Hermetic Systems" link: "The Mayas used three different calendrical systems (and some variations within the systems). The three systems are known as the tzolkin (the sacred calendar), the haab (the civil calendar) and the long count system. The tzolkin is a cycle of 260 days and the haab is a cycle of 365 days (these cycles are explained in Sections 2 and 3 of this chapter). The tzolkin cycle and the haab cycle were combined to produce a cycle of 18,980 days, known as the calendar round. 18,980 days is a little less than 52 solar years.
"Thus the Mayas could not simply use a tzolkin/haab date to identify a day within a period of several hundred years because there would be several days within this period with the same tzolkin/haab date. The Mayas overcame this problem by using a third dating system which enabled them to identify a day uniquely within a period of 1,872,000 days (approximately 5,125.36 solar years).
"To do this they used a vigesimal (i.e. based on 20) place-value number system, analogous to our decimal place-value number system. The Mayas used a pure vigesimal system for counting objects but modified this when counting days."

Examples

			1 kin = 1 day.
1 uinal = 20 kins = 20 days.
1 tun = 18 uinals = 360 days.
1 katun = 20 tuns = 7200 days.
1 baktun = 20 katuns = 144000 days.
13 baktuns = 1 great cycle or Maya era = 1872000 days (approximately 5125.37 solar years).
		

References

  • Bourgeois, Julia F., The True Calendar-Years of Aztecs and Mayas and the True Mayan Calendar System, Editorial Cultura, Mexico, 1942.
  • Bowditch, C. P., The Numeration, Calendar Systems and Astronomical Knowledge of the Mayas, Cambridge University Press, 1910.
  • Brunhouse, R. L., Sylvanus G. Morley and the World of the Ancient Mayas, University of Oklahoma Press, 1971.

Crossrefs

Fortnight related: A001356, A051121.
Related to names of months: A031139.
A subsequence of A081244.

Extensions

Edited by M. F. Hasler, Dec 23 2012

A259143 Number of distinct digits needed to write the calendar date of n-th day of a non-leap year in decimal representation, without leading zeros.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 19 2015

Keywords

Comments

a(n) <= 4.

Examples

			.      | Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
.      |   1   2   3   4   5   6   7   8   9  10  11  12
.  ----+-------------------------------------------------
.    1 |   1   2   2   2   2   2   2   2   2   2   1   2
.    2 |   2   1   2   2   2   2   2   2   2   3   2   2
.    3 |   2   2   1   2   2   2   2   2   2   3   2   3
.    4 |   2   2   2   1   2   2   2   2   2   3   2   3
.    5 |   2   2   2   2   1   2   2   2   2   3   2   3
.    6 |   2   2   2   2   2   1   2   2   2   3   2   3
.    7 |   2   2   2   2   2   2   1   2   2   3   2   3
.    8 |   2   2   2   2   2   2   2   1   2   3   2   3
.    9 |   2   2   2   2   2   2   2   2   1   3   2   3
.   10 |   2   3   3   3   3   3   3   3   3   2   2   3
.   11 |   1   2   2   2   2   2   2   2   2   2   1   2
.   12 |   2   2   3   3   3   3   3   3   3   3   2   2
.   13 |   2   3   2   3   3   3   3   3   3   3   2   3
.   14 |   2   3   3   2   3   3   3   3   3   3   2   3
.   15 |   2   3   3   3   2   3   3   3   3   3   2   3
.   16 |   2   3   3   3   3   2   3   3   3   3   2   3
.   17 |   2   3   3   3   3   3   2   3   3   3   2   3
.   18 |   2   3   3   3   3   3   3   2   3   3   2   3
.   19 |   2   3   3   3   3   3   3   3   2   3   2   3
.   20 |   3   2   3   3   3   3   3   3   3   3   3   3
.   21 |   2   2   3   3   3   3   3   3   3   3   2   2
.   22 |   2   1   2   2   2   2   2   2   2   3   2   2
.   23 |   3   2   2   3   3   3   3   3   3   4   3   3
.   24 |   3   2   3   2   3   3   3   3   3   4   3   3
.   25 |   3   2   3   3   2   3   3   3   3   4   3   3
.   26 |   3   2   3   3   3   2   3   3   3   4   3   3
.   27 |   3   2   3   3   3   3   2   3   3   4   3   3
.   28 |   3   2   3   3   3   3   3   2   3   4   3   3
.   29 |   3   _   3   3   3   3   3   3   2   4   3   3
.   30 |   3   _   2   3   3   3   3   3   3   3   3   4
.   31 |   2   _   2   _   3   _   3   3   _   3   _   3  .
13 days need just 1 digit: {1, 11, 33, 53, 62, 94, 125, 157, 188, 220, 252, 305, 315} = {Jan 1, Jan 11, Feb 2, Feb 22, Mar 3, Apr 4, May 5, Jun 6, Jul 7, Aug 8, Sep 9, Nov 1, Nov 11};
152 days need 2 digits: the first is the 2nd day = Jan 2, the last one is the 356th day = Dec 22;
192 days need 3 digits: the first is the 20th day = Jan 20, the last one is the last day of the year = Dec 31;
8 days need 4 digits: {296 .. 302, 364} = Oct 23 through Oct 29, and also the penultimate day of the year = Dec 30.
		

Crossrefs

Cf. A008685.

Programs

  • Haskell
    import Data.List (nub)
    a259143 n = a259143_list !! (n-1)
    a259143_list = [length $ nub $ show m ++ show d |
                    m <- [1 .. 12], d <- [1 .. a008685 m]]

A184978 The months of the Gregorian calendar of less than 31 days.

Original entry on oeis.org

2, 4, 6, 9, 11
Offset: 1

Views

Author

Jonathan M. Alexander, Mar 27 2011

Keywords

Crossrefs

Cf. A008685 (lengths of months in Gregorian calendar).

A296008 Number of days for which concat(n,mm,dd) is prime, for mm = 01..12, dd = 01..number of days in month mm of year n, according to the Gregorian calendar.

Original entry on oeis.org

18, 22, 23, 19, 17, 19, 26, 22, 21, 15, 24, 17, 21, 25, 26, 25, 21, 30, 25, 20, 21, 19, 19, 22, 16, 20, 17, 13, 20, 21, 22, 23, 17, 18, 22, 31, 25, 24, 24, 22, 27, 26, 26, 17, 18, 17, 19, 23, 22, 23, 25, 20, 14, 24, 20, 16, 21, 27, 23, 21, 23, 21, 26, 22, 27, 21, 21, 26, 19, 20, 23, 25
Offset: 1582

Views

Author

M. F. Hasler, Dec 02 2017

Keywords

Comments

The Gregorian calendar entered in vigor on October 15, 1582, the day following October 4, 1582 according to the Julian calendar. Therefore a(1582) is tentatively taken to be the count of prime days for that year, subtracting the two inexisting prime days October 9 and 11 (15821009 and 15821011).
It appears that 12 <= a(n) <= 35. a(n) = 12 for 1939, 2244, ... and a(n) = 35 for n = 2384 ; a(n) = 34 for n = 1980. The year 1980 is also the only year between 1582 and 2112 for which yyyymmdd is prime more than 5 times, when dd is taken to be the last day of the respective month.

Examples

			Starting with year 2000, the sequence reads (27, 16, 20, 18, 27, 26, 16, 20, 24, 24, 25, 19, 22, 19, 26, 13, 19, 19, 18, 19, 25, 20, 23, 17, 21, 21, 24, 18, 29, 18, 26,  17, 19, 22, 25, 20, 19, 20, 20, 21, 22, 25, 22, 22, 26, 22, 13, ...)
a(2015) = 13 since the year 2015 had only 13 "prime days", namely: Jan. 11 and 31, Feb. 27, March 3 and 27, April 11, May 13, Aug. 21, Oct. 11 and 31, Nov. 27 and Dec. 21 and 27. These days correspond to the 13 numbers { 2015.01.11, ..., 2015.12.27 }, with dots deleted, which are prime.
		

Crossrefs

Cf. A008685.

Programs

  • PARI
    dom(m,y)=if(m<8==m%2,31,30-2^!(y%4==0 && y%100!=0 || y%400==0));
    a(y)=sum(m=1,12,sum(d=1,dom(m,y),isprime(y*10^4+m*100+d)))

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

Original entry on oeis.org

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

Views

Author

Manuel Biwer, Dec 27 2024

Keywords

Comments

Sum of all terms gives 365.

Examples

			For n=4 three dates (1st of March, 2nd of February, 3rd of January) sum to n, so a(4) = 3.
		

Crossrefs

Cf. A008685.

Programs

  • 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
  • Mathematica
    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 *)
  • 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]
Showing 1-9 of 9 results.