login
A260915
Prime number days: prime numbers that can be interpreted as an ISO date.
1
10000103, 10000121, 10000223, 10000303, 10000511, 10000609, 10000721, 10000723, 10000813, 10000819, 10000831, 10001009, 10001107, 10001119, 10001203, 10001207, 10001209, 10001213, 10001221, 10001227, 10001231, 10010101, 10010113, 10010213, 10010227, 10010311, 10010317, 10010323, 10010401
OFFSET
1,1
COMMENTS
An ISO date is in the format YYYY-MM-DD.
The last term of this sequence is 99991207.
EXAMPLE
20150821 belongs to this sequence because it is prime and represents the 21st of August 2015.
MATHEMATICA
d = Sort@ Join[Flatten[Plus[{100, 300, 500, 700, 800, 1000, 1200}, #] & /@ Select[Range[1, 31, 2], ! Mod[#, 5] == 0 &]], Flatten[Plus[{200, 400, 600, 900, 1100}, #] & /@ Select[Range[1, 29, 2], ! Mod[#, 5] == 0 &]]]; Select[Flatten[Plus[If[Or[Mod[#, 10000000] == 0, Mod[#, 40000] == 0 && ! Mod[#, 1000000] == 0], d, Delete[d, 25]], #] & /@ (10000 Range[1000, 1001])], PrimeQ] (* Michael De Vlieger, Aug 04 2015 *)
PROG
(Python)
import datetime
.
def prime_number_days():
...j = 0
...date = datetime.date(1000, 1, 1)
...while date.year<2100:
......x = int(date.strftime("%Y%m%d"))
......while primes[j]<x:
.........j += 1
......if primes[j]==x:
.........yield x
......date += datetime.timedelta(days=1)
CROSSREFS
Cf. A000040 (prime numbers).
Sequence in context: A017515 A017647 A182749 * A072144 A087510 A173002
KEYWORD
nonn,easy,fini,base
AUTHOR
Christian Perfect, Aug 04 2015
STATUS
approved