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-4 of 4 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 *)

A101312 Number of "Friday the 13ths" in year n (starting at 1901).

Original entry on oeis.org

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

Views

Author

Adam M. Kalman (mocha(AT)clarityconnect.com), Dec 22 2004

Keywords

Comments

This sequence is basically periodic with period 28 [example: a(1901) = a(1929) = a(1957)], with "jumps" when it passes a non-leap-year century such as 2100 [all centuries which are not multiples of 400].
At these points [for example, a(2101)], the sequence simply "jumps" to a different point in the same pattern, "dropping back" 12 entries [or equivalently, "skipping ahead" 16 entries], but still continuing with the same repeating [period 28] pattern.
Every year has at least 1 "Friday the 13th," and no year has more than 3.
On average, 171 of every 400 years (42.75%) have 1 "Friday the 13th," 170 of every 400 years (42.5%) have 2 of them and only 59 in 400 years (14.75%) have 3 of them. [Corrected by Pontus von Brömssen, Sep 09 2021]
Conjecture: The same basic repeating pattern results if we seek the number of "Sunday the 22nds" or "Wednesday the 8ths" or anything else similar, with the only difference being that the sequence starts at a different point in the repeating pattern.
Periodic with period 400. (Because the number of days in 400 years is 400*365 + 97 = 146097, which happens to be divisible by 7.) - Pontus von Brömssen, Sep 09 2021

Examples

			a(1902) = 1, since only Jun 13 1902 fell on a Friday.
a(2004) = 2, since there were 2 "Friday the 13ths" that year: Feb 13 2004 and Aug 13 2004 each fell on a Friday.
a(2012) = 3, since Jan 13 2012, Apr 13 2012, and Jul 13 2012 are all Fridays.
		

Crossrefs

Programs

  • Haskell
    a101312 n = f 1 {- January -} where
       f 13                = 0
       f m | h n m 13 == 6 = (f $ succ m) + 1
           | otherwise     = f $ succ m
       h year month day  -- cf. Zeller reference.
         | month <= 2 = h  (year - 1)  (month + 12)  day
         | otherwise  = (day + 26 * (month + 1) `div` 10 + y + y `div` 4
                        + century `div` 4 - 2 * century) `mod` 7
           where (century, y) = divMod year 100
    -- Reinhard Zumkeller, May 16 2011
    
  • Mathematica
    (*Load <
    				
  • Python
    from datetime import date
    def a(n):
        return sum(date.isoweekday(date(n, m, 13)) == 5 for m in range(1, 13))
    print([a(n) for n in range(1901, 2006)]) # Michael S. Branicky, Sep 09 2021

Formula

a(A190651(n)) = 1; a(A190652(n)) = 2; a(A190653(n)) = 3. - Reinhard Zumkeller, May 16 2011
1 <= a(n) <= 3. - Michael S. Branicky, Sep 09 2021
G.f.: x^1900 * p/q with p,q given in Sage file. - Andy Huchala, Mar 06 2022

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

A343015 Decimal expansion of the probability that at least 2 of 23 randomly selected people share a birthday, considering leap years.

Original entry on oeis.org

5, 0, 6, 8, 7, 6, 0, 9, 3, 1, 6, 5, 2, 7, 8, 4, 5, 5, 2, 2, 2, 4, 3, 9, 3, 1, 3, 1, 6, 0, 5, 1, 1, 2, 3, 7, 7, 7, 3, 5, 2, 6, 9, 9, 8, 2, 5, 4, 8, 5, 2, 6, 1, 0, 5, 6, 1, 9, 4, 1, 2, 1, 4, 3, 8, 1, 4, 1, 3, 7, 2, 5, 8, 4, 6, 7, 8, 6, 3, 3, 5, 4, 8, 4, 9, 5, 1
Offset: 0

Views

Author

Amiram Eldar, Apr 02 2021

Keywords

Comments

The usual solution of the Birthday Problem, 1 - ((365!)/((365 - 23)! * 365^23)) = 0.507297... (A333507), is based on the assumption that all the years have 365 days.
The solution given by Nandor (2004) includes leap years, i.e., 97 years of 366 days in each cycle of 400 years of the Gregorian calendar.
With the addition of leap-year days, i.e., the possibility of having a birthday on February 29, the probability is reduced to 0.506876...
This constant is a rational number: its numerator and denominator have 111 and 112 digits, respectively.
The sequence has a period of 7.983424...*10^108.

Examples

			0.50687609316527845522243931316051123777352699825485...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[1 - (365!/((365 - 23)! * 365^23)) * (146000/146097)^23 * (1 + 97 * 365 * 23/146000/(366 - 23)), 10, 100][[1]]

Formula

Equals 1 - (365!/((365 - 23)! * 365^23)) * (146000/146097)^23 * (1 + 97 * 365 * 23/146000/(366 - 23)).
Showing 1-4 of 4 results.