login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxA000230 revision 9 of 9

1 2 3 4 5 6 7 8 9
Editor: KSmarts
Time: 2017/10/28 16:58:04 GMT+0
Note:

changed:
-a : (Integer) -> Integer
a: (Integer) -> Integer

changed:
-  if j-i=2*n or n=0 then
  if j-i = 2*n or n = 0 then

fricas
(1) -> a: (Integer) -> Integer
Type: Void
fricas
a(n) ==
 i:=2
 repeat
  j:=nextPrime(i)
  if j-i = 2*n or n = 0 then
   return i
  i:=j
Type: Void
fricas
for n in 0..30 repeat
 output(a(n))
fricas
Compiling function a with type Integer -> Integer 
   2
   3
   7
   23
   89
   139
   199
   113
   1831
   523
   887
   1129
   1669
   2477
   2971
   4297
   5591
   1327
   9551
   30593
   19333
   16141
   15683
   81463
   28229
   31907
   19609
   35617
   82073
   44293
   43331
Type: Void