login
A354422
a(n) is the number of prime dates based on the proleptic Gregorian calendar in YY..YMMDD format in the year AD n, where n = YY..Y.
2
32, 39, 32, 33, 31, 38, 33, 38, 32, 37, 37, 32, 33, 35, 35, 29, 27, 26, 31, 28, 39, 27, 28, 26, 24, 28, 31, 32, 33, 24, 28, 29, 32, 30, 25, 26, 23, 31, 32, 30, 33, 25, 25, 32, 33, 27, 31, 32, 23, 38, 34, 29, 28, 28, 32, 26, 32, 24, 25, 29, 28, 34, 26, 23, 27
OFFSET
1,1
COMMENTS
a(2) = a(21) = 39 seems to be the maximum. a(1220) = a(1342) = 12 is the minimum for n <= 2243. The first year with only one prime date is AD 963034 (on Nov 11), and the first year without any prime date is AD 13446204.
EXAMPLE
a(2022) = 23 because, in the year 2022, there are 23 prime dates: Jan 3, 19, 21 & 27; Feb 17; Mar 7, 11, 23 & 31; Apr 7; May 17; Jun 1 & 19; Jul 13; Aug 17 & 21; Sep 1 & 23; Oct 9 & 27; Nov 27; and Dec 13 & 31.
PROG
(Python)
def A354422(n):
from sympy import isprime; ct = 0
for m in range(1, 13):
d_max = 31 if m in {1, 3, 5, 7, 8, 10, 12} else 30 if m in {4, 6, 9, 11} else 28 if (n%4 or (n%400 and not n%100)) else 29
for d in range(1, d_max + 1, 2):
if isprime(n*10000 + m*100 + d): ct += 1
return ct
CROSSREFS
Cf. A352947.
Sequence in context: A345491 A178099 A039778 * A217060 A326112 A363530
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Jun 04 2022
STATUS
approved