Prime differences

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

If n is the difference between consecutive primes, print the nth prime for the first 100 primes.

i.e.
2, 3 - difference 1, print 1st prime (2)
3, 5 - difference 2, print 2nd prime (3)
...
523, 541 - difference 18, print 18th prime (61)

- Volatility

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

*NOTHING*

Sample output:

2
3
3
7
3
7
3
7
13
3
13
7
3
7
13
13
3
13
7
3
13
7
13
19
7
3
7
3
7
43
7
13
3
29
3
13
13
7
13
13
3
29
3
7
3
37
37
7
3
7
13
3
29
13
13
13
3
13
7
3
29
43
7
3
7
43
13
29
3
7
13
19
13
13
7
13
19
7
19
29
3
29
3
13
7
13
19
7
3
7
37
19
7
19
7
13
37
3
61

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1Histocrat620.02362013/02/22 22:41:490B / 41B / 17B
2jpl740.04632013/03/01 08:09:260B / ?B / ?B

Perl _

RankUserSizeTimeDateStatistics
1teebee590.01122013/03/06 10:58:050B / 21B / 38B
2tails610.04642013/03/05 23:56:510B / 18B / 43B
3brx630.01572013/03/05 21:52:570B / 21B / 41B
4brx(just another Perl ACKer)630.08052013/03/08 03:26:413B / 17B / 42B

Python _

RankUserSizeTimeDateStatistics
1hallvabo680.06692013/02/26 07:09:020B / 38B / 28B
2leonid680.06192013/02/26 08:26:270B / 36B / 28B
3recursive960.03752013/02/23 08:44:190B / 58B / 24B
4Volatility980.04212013/02/23 09:12:141B / 59B / 24B
5leonid640.06492013/03/09 04:00:430B / 34B / 28B

Scheme _

RankUserSizeTimeDateStatistics
1kaki1060.08152013/03/07 13:00:510B / 51B / 45B
2kaki1050.07532013/03/25 04:45:100B / 49B / 47B

Io _

RankUserSizeTimeDateStatistics
1pooq1110.29192013/03/07 20:07:580B / 62B / 47B

Xtal _

RankUserSizeTimeDateStatistics
1pooq970.11972013/03/08 11:09:580B / 50B / 47B

PARI/GP _

RankUserSizeTimeDateStatistics
1teebee410.00962013/02/23 05:48:060B / 24B / 16B
2clock410.00892013/02/23 23:12:110B / 24B / 17B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1060.12772013/03/07 17:27:300B / 64B / 30B

J _

RankUserSizeTimeDateStatistics
1random190.04222013/02/22 23:16:560B / ?B / ?B
2pooq190.01862013/02/22 23:34:010B / 9B / 10B
3Colin Benner230.01692013/02/28 20:33:010B / 9B / 14B
4va300.02112013/02/23 08:57:100B / ?B / ?B
5medialuna270.02012014/08/18 17:46:320B / ?B / ?B

Haskell _

RankUserSizeTimeDateStatistics
1henkma760.02502013/03/02 08:23:190B / 34B / 39B

Maxima _

RankUserSizeTimeDateStatistics
1clock680.08962013/02/24 23:35:090B / 42B / 26B
2teebee680.10642013/02/25 00:21:040B / 42B / 26B
3pooq840.17812013/02/22 23:08:150B / 56B / 24B

Octave _

RankUserSizeTimeDateStatistics
1teebee370.23512013/02/23 21:56:420B / 23B / 14B
2inaniwa370.24892013/02/23 22:44:200B / 23B / 14B
3pooq390.23442013/02/22 22:26:400B / 24B / 15B

Postscript _

RankUserSizeTimeDateStatistics
1rolf (bin)1690.72422013/02/24 00:16:4841B / 77B / 39B
2rolf2860.70052013/02/23 05:28:470B / 171B / 30B

R _

RankUserSizeTimeDateStatistics
1clock480.19552013/03/08 20:08:300B / 25B / 23B
2pooq610.19842013/03/08 20:55:440B / 29B / 32B
3clock420.16852013/03/08 21:15:230B / 24B / 18B

Language Ranking_

RankLangUserSizeScore
1Jrandom1910000
2Octaveteebee375135
3PARI/GPteebee414634
4Rclock424523
5Perlteebee593220
6RubyHistocrat623064
7Pythonleonid642968
8Maximaclock682794
9Haskellhenkma762500
10Xtalpooq971958
11Schemekaki1051809
12BASICpooq1061792
13Iopooq1111711
14Postscriptrolf (bin)1691124

return to the top page