OFFSET
1,1
PROG
(Pascal) procedure Ndegrees; var a : array[0..16] of extended; aa, ct, bb, cc: longint; n, nh, i, j : integer; ab1, ab2 : extended; begin for i := 0 to 16 do a[i] := 0; N := 7; a[0] := 3167{ FIRST TERM OF PRIME CHAIN}; nh := 1; a[1] := 2753 ; a[2] := 2753 ; a[3] := 1979 ; a[4] := 2357 ; a[5] := 1277 ; a[6] := 1979 ; a[7] := 647 ; a[8] := 1619 ; repeat for i := N downto nh do BEGIN a[i] := a[i] - a[i-1] ; IF NH = 5 THEN A[I] := ABS(A[I]); {******} END; nh := nh + 1; until nh = n + 2; ct := 0; repeat ct := ct + 1; ab1 := a[n] + a[n-1]; for i := N-1 downto 1 do begin IF I = 5 THEN IF ODD(ct) THEN A[i] := -A[i]; {******} ab2 := a[i] + a[i-1] ; a[i] := ab1; ab1 := ab2; end; WRITELN(AB1); READLN; until 1<0; END;
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Aldrich Stevens (aldrichstevens(AT)msn.com), May 29 2008
STATUS
approved