>>357
ピラミッドリストを作らなくてもよいなら、

nextItem([N],N).
nextItem(L,X) :-
    append(_,[Z],L),
    findall(Sub,(
          append(_,[N1,N2|_],L),
          Sub is N2 - N1),
       L1),
    nextItem(L1,Y),
    X is Z + Y.