12345678910111213141516171819202122232425262728 |
- #!/usr/bin/ruby
- # Download graphs for Aliquot sequences from factordb.com.
- # See also:
- # https://oeis.org/A216072
- # https://members.loria.fr/PZimmermann/records/aliquot.html
- var data = [
- 276, 552, 564, 660, 966, 1074, 1134, 1464, 1476, 1488,
- 1512, 1560, 1578, 1632, 1734, 1920, 1992, 2232, 2340,
- 2360, 2484, 2514, 2664, 2712, 2982, 3270, 3366, 3408,
- 3432, 3564, 3678, 3774, 3876, 3906, 4116, 4224, 4290,
- 4350, 4380, 4788, 4800, 4842,
- ]
- var dir = Dir("graphs")
- dir.exists || dir.create
- data.each {|n|
- var file = dir+File("#{n}.png")
- var url = "http://factordb.com/aliquot.php?type=1&aq=#{n}&big=1"
- next if file.exists
- Sys.run('wget', '-O', file, url)
- }
|