(1)∵an+1-an是关于x的方程x2+(an+1-2)x-2an+1=0的根
∴(an+1-an)2+(an+1-2)(an+1-an)-2an+1=0
∴(an+1-an-2)(2an+1-an)=0
∴an+1=an+2,或an+1=[1/2]an,
∵a1=4且n≥2时,4≤an≤8,
∴数列{an}为:4,6,8,4,6,8,…,
∴数列{an}的前100项和S100=33(4+6+8)+4=598;
(2)若a1=-8且an<an+1(n∈N*)
∵an+1=an+2,或an+1=[1/2]an,
∴数列{an}的前6项是:-8,-6,-4,-2,0,2或-8,-6,-4,-2,-1,1或:-8,-6,-3,-1,1,3或:-8,-4,-2,0,2,4或-8,-4,-2,-1,1,3
∵a6=1,∴数列{an}的前6项是-8,-6,-4,-2,-1,1,且n>4时,an+1=an+2,
∴数列{an}的通项公式是an=
2n−10,n≤4
2n−11,n≥5;