Skip to content

Instantly share code, notes, and snippets.

@xtetsuji
Created June 3, 2016 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xtetsuji/151a0be7ea7a4ce75a41ac8633435307 to your computer and use it in GitHub Desktop.
Save xtetsuji/151a0be7ea7a4ce75a41ac8633435307 to your computer and use it in GitHub Desktop.
Prime days in 2016.
$ for i in {-1..364} ; do ymd=$(date +%Y%m%d -d "2016/01/01 $i days tomorrow") ; if factor $ymd | grep -E "^$ymd: $ymd$" >/dev/null ; then echo $ymd ; fi ; done | cat -n
1 20160319
2 20160401
3 20160403
4 20160529
5 20160601
6 20160607
7 20160611
8 20160709
9 20160727
10 20160809
11 20160817
12 20160821
13 20160923
14 20161007
15 20161013
16 20161019
17 20161021
18 20161027
19 20161103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment