kill(all);

van=facebook.com/LearningCalculus;

primeList : [];

n:3000;

for i: 1 thru n do
    if(primep(i)) then¦
    primeList: cons(i, primeList);

primeList:reverse(primeList)$
[length(primeList), first(primeList), last(primeList)];

primeListLength: length(primeList)$

for i: 1 thru primeListLength do
    for j: i+1 thru primeListLength do
    (
        c:(1/(1/primeList[i] + 1/primeList[j])),
        if intp(c) then
            print(i, j, primeList[i], primeList[j],c)
    )$

for i: 1 thru primeListLength do
    for j: i+1 thru primeListLength do
    (
        c:(1/(1/primeList[i] - 1/primeList[j])),
        if intp(c) then
            print(i, j, primeList[i], primeList[j],c)
    )$