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.

A230995 Number of years after which a date can fall on the same day of the week, in the Gregorian calendar.

Original entry on oeis.org

0, 5, 6, 7, 11, 12, 17, 18, 22, 23, 28, 29, 33, 34, 35, 39, 40, 45, 46, 50, 51, 56, 57, 61, 62, 63, 67, 68, 73, 74, 78, 79, 84, 85, 89, 90, 91, 95, 96, 101, 102, 106, 107, 108, 112, 113, 114, 117, 118, 119, 123, 124, 125, 129, 130, 131, 134, 135, 136, 140, 141, 142
Offset: 0

Views

Author

Aswini Vaidyanathan, Nov 02 2013

Keywords

Comments

In the Gregorian calendar, a non-century year is a leap year if and only if it is a multiple of 4 and a century year is a leap year if and only if it is a multiple of 400.
Assuming this fact, this sequence is periodic with a period of 400.

Examples

			5 belongs to this sequence because January 1, 2008 falls on same day as January 1, 2013.
6 belongs to this sequence because January 1, 2009 falls on same day as January 1, 2015.
7 belongs to this sequence because January 1, 2097 falls on same day as January 1, 2104.
		

Crossrefs

Cf. A231000 (Julian calendar).

Programs

  • PARI
    for(i=0,400,for(y=0,400,if(((5*(y\4)+(y%4)-(y\100)+(y\400))%7)==((5*((y+i)\4)+((y+i)%4)-((y+i)\100)+((y+i)\400))%7),print1(i", ");break)))

A231001 Number of years after which an entire year can have the same calendar, in the Julian calendar.

Original entry on oeis.org

0, 6, 11, 17, 22, 28, 34, 39, 45, 50, 56, 62, 67, 73, 78, 84, 90, 95, 101, 106, 112, 118, 123, 129, 134, 140, 146, 151, 157, 162, 168, 174, 179, 185, 190, 196, 202, 207, 213, 218, 224, 230, 235, 241, 246, 252, 258, 263, 269, 274, 280, 286, 291, 297, 302, 308, 314, 319, 325
Offset: 0

Views

Author

Aswini Vaidyanathan, Nov 02 2013

Keywords

Comments

In the Julian calendar, a year is a leap year if and only if it is a multiple of 4 and all century years are leap years.
Assuming this fact, this sequence is periodic with a period of 28.
This is a subsequence of A231000.

Crossrefs

Cf. A230996 (Gregorian calendar).

Programs

  • Mathematica
    LinearRecurrence[{1,0,0,0,1,-1},{0,6,11,17,22,28},60] (* Harvey P. Dale, Jun 19 2023 *)
  • PARI
    for(i=0,420,for(y=0,420,if(((5*(y\4)+(y%4))%7)==((5*((y+i)\4)+((y+i)%4))%7)&&((5*(y\4)+(y%4)-!(y%4))%7)==((5*((y+i)\4)+((y+i)%4)-!((y+i)%4))%7),print1(i", ");break)))
    
  • PARI
    concat(0, Vec(x*(2 + 3*x + 2*x^2)*(3 - 2*x + 3*x^2) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)) + O(x^40))) \\ Colin Barker, Oct 17 2019

Formula

From Colin Barker, Oct 17 2019: (Start)
G.f.: x*(2 + 3*x + 2*x^2)*(3 - 2*x + 3*x^2) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>5.
(End)

A231002 Number of years after which it is possible to have a date falling on same day of the week, but the entire year does not have the same calendar, in the Julian calendar.

Original entry on oeis.org

5, 23, 33, 51, 61, 79, 89, 107, 117, 135, 145, 163, 173, 191, 201, 219, 229, 247, 257, 275, 285, 303, 313, 331, 341, 359, 369, 387, 397, 415, 425, 443, 453, 471, 481, 499, 509, 527, 537, 555, 565, 583, 593, 611, 621, 639, 649, 667, 677, 695, 705, 723, 733, 751, 761, 779, 789
Offset: 1

Views

Author

Aswini Vaidyanathan, Nov 02 2013

Keywords

Comments

In the Julian calendar, a year is a leap year if and only if it is a multiple of 4 and all century years are leap years.
Assuming this fact, this sequence is periodic with a period of 28.
These are the terms of A231000 not in A231001.
The statement about the period is misleading: this is the sequence of (positive) numbers congruent to 5 or -5 (mod 28). It is strictly increasing, not periodic; the sequence a(n) - 28*floor(n/2) is 2-periodic. - M. F. Hasler, Apr 14 2015

Crossrefs

Cf. A230997 (Gregorian calendar).

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{5,23,33},70] (* Harvey P. Dale, May 21 2021 *)
  • PARI
    for(i=0,420,j=0;for(y=0,420,if(((5*(y\4)+(y%4))%7)==((5*((y+i)\4)+((y+i)%4))%7),j=1;break));for(y=0,420,if(((5*(y\4)+(y%4))%7)==((5*((y+i)\4)+((y+i)%4))%7)&&((5*(y\4)+(y%4)-!(y%4))%7)==((5*((y+i)\4)+((y+i)%4)-!((y+i)%4))%7),j=2;break));if(j==1,print1(i", ")))
    
  • PARI
    A231002(n) = n\2*28-5*(-1)^n \\ M. F. Hasler, Apr 14 2015
    
  • PARI
    Vec(x*(5 + 18*x + 5*x^2) / ((1 - x)^2*(1 + x)) + O(x^50)) \\ Colin Barker, Oct 15 2019

Formula

a(n+1) = a(n-1)+28, for all n > 1. - M. F. Hasler, Apr 14 2015
a(2n) = 28n-5 (n>0), a(2n+1) = 28n+5 (n>=0), a(n) = 28*floor(n/2)-5*(-1)^n. - M. F. Hasler, Apr 14 2015
From Colin Barker, Oct 15 2019: (Start)
G.f.: x*(5 + 18*x + 5*x^2) / ((1 - x)^2*(1 + x)).
a(n) = a(n-1) + a(n-2) - a(n-3) for n>3.
a(n) = -7 + 2*(-1)^n + 14*n.
(End)

A231003 Number of years after which it is not possible to have a date falling on the same day of the week, in the Julian calendar.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 24, 25, 26, 27, 29, 30, 31, 32, 35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 52, 53, 54, 55, 57, 58, 59, 60, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 80, 81, 82, 83, 85, 86, 87, 88, 91, 92, 93, 94, 96, 97
Offset: 1

Views

Author

Aswini Vaidyanathan, Nov 02 2013

Keywords

Comments

In the Julian calendar, a year is a leap year if and only if it is a multiple of 4 and all century years are leap years.
Assuming this fact, this sequence is periodic with a period of 28.
This is the complement of A231000.

Crossrefs

Cf. A230998 (Gregorian calendar).

Programs

  • PARI
    for(i=0,420,j=0;for(y=0,420,if(((5*(y\4)+(y%4))%7)==((5*((y+i)\4)+((y+i)%4))%7),j=1));if(j==0,print1(i", ")))

Formula

From Chai Wah Wu, Jun 04 2024: (Start)
a(n) = a(n-1) + a(n-21) - a(n-22) for n > 22.
G.f.: x*(x^21 + x^20 + x^19 + x^18 + 3*x^17 + x^16 + x^15 + x^14 + 2*x^13 + x^12 + x^11 + x^10 + x^9 + 2*x^8 + x^7 + x^6 + x^5 + 3*x^4 + x^3 + x^2 + x + 1)/(x^22 - x^21 - x + 1). (End)
Showing 1-4 of 4 results.